From 2faffcfd374dd55c1c8f1bb410682c681c774f0a Mon Sep 17 00:00:00 2001 From: bowenlan-amzn Date: Thu, 13 Jul 2023 11:39:29 +0800 Subject: [PATCH 1/3] Fix after core #8157 Signed-off-by: bowenlan-amzn --- .../org/opensearch/commons/ConfigConstants.java | 2 +- .../java/org/opensearch/commons/authuser/User.java | 8 ++++---- .../destination/message/LegacyBaseMessage.java | 6 +++--- .../destination/message/LegacyChimeMessage.java | 2 +- .../message/LegacyCustomWebhookMessage.java | 4 ++-- .../destination/message/LegacyEmailMessage.java | 4 ++-- .../destination/message/LegacySNSMessage.java | 4 ++-- .../destination/message/LegacySlackMessage.java | 2 +- .../destination/response/LegacyBaseResponse.java | 6 +++--- .../response/LegacyDestinationResponse.java | 4 ++-- .../commons/alerting/AlertingPluginInterface.kt | 4 ++-- .../alerting/action/AcknowledgeAlertRequest.kt | 4 ++-- .../alerting/action/AcknowledgeAlertResponse.kt | 4 ++-- .../action/AcknowledgeChainedAlertRequest.kt | 4 ++-- .../alerting/action/DeleteMonitorRequest.kt | 4 ++-- .../alerting/action/DeleteMonitorResponse.kt | 4 ++-- .../alerting/action/DeleteWorkflowRequest.kt | 4 ++-- .../alerting/action/DeleteWorkflowResponse.kt | 4 ++-- .../commons/alerting/action/GetAlertsRequest.kt | 4 ++-- .../commons/alerting/action/GetAlertsResponse.kt | 4 ++-- .../commons/alerting/action/GetFindingsRequest.kt | 4 ++-- .../commons/alerting/action/GetFindingsResponse.kt | 6 +++--- .../alerting/action/GetWorkflowAlertsRequest.kt | 4 ++-- .../alerting/action/GetWorkflowAlertsResponse.kt | 4 ++-- .../commons/alerting/action/GetWorkflowRequest.kt | 4 ++-- .../commons/alerting/action/GetWorkflowResponse.kt | 6 +++--- .../commons/alerting/action/IndexMonitorRequest.kt | 4 ++-- .../alerting/action/IndexMonitorResponse.kt | 4 ++-- .../alerting/action/IndexWorkflowRequest.kt | 4 ++-- .../alerting/action/IndexWorkflowResponse.kt | 4 ++-- .../alerting/action/PublishFindingsRequest.kt | 4 ++-- .../alerting/action/SubscribeFindingsResponse.kt | 6 +++--- .../BucketSelectorExtAggregationBuilder.kt | 6 +++--- .../BucketSelectorExtAggregator.kt | 2 +- .../bucketselectorext/BucketSelectorExtFilter.kt | 6 +++--- .../bucketselectorext/BucketSelectorIndices.kt | 2 +- .../commons/alerting/alerts/AlertError.kt | 8 ++++---- .../alerting/model/ActionExecutionResult.kt | 8 ++++---- .../alerting/model/AggregationResultBucket.kt | 10 +++++----- .../org/opensearch/commons/alerting/model/Alert.kt | 8 ++++---- .../commons/alerting/model/BucketLevelTrigger.kt | 6 +++--- .../commons/alerting/model/ChainedAlertTrigger.kt | 6 +++--- .../alerting/model/ChainedMonitorFindings.kt | 6 +++--- .../commons/alerting/model/ClusterMetricsInput.kt | 6 +++--- .../commons/alerting/model/CompositeInput.kt | 6 +++--- .../commons/alerting/model/DataSources.kt | 8 ++++---- .../opensearch/commons/alerting/model/Delegate.kt | 6 +++--- .../commons/alerting/model/DocLevelMonitorInput.kt | 6 +++--- .../commons/alerting/model/DocLevelQuery.kt | 6 +++--- .../commons/alerting/model/DocumentLevelTrigger.kt | 6 +++--- .../opensearch/commons/alerting/model/Finding.kt | 8 ++++---- .../commons/alerting/model/FindingDocument.kt | 8 ++++---- .../commons/alerting/model/FindingWithDocs.kt | 8 ++++---- .../org/opensearch/commons/alerting/model/Input.kt | 4 ++-- .../opensearch/commons/alerting/model/Monitor.kt | 6 +++--- .../commons/alerting/model/NoOpTrigger.kt | 6 +++--- .../commons/alerting/model/QueryLevelTrigger.kt | 6 +++--- .../opensearch/commons/alerting/model/Schedule.kt | 6 +++--- .../commons/alerting/model/ScheduledJob.kt | 2 +- .../commons/alerting/model/SearchInput.kt | 6 +++--- .../opensearch/commons/alerting/model/Sequence.kt | 6 +++--- .../org/opensearch/commons/alerting/model/Table.kt | 6 +++--- .../opensearch/commons/alerting/model/Trigger.kt | 4 ++-- .../opensearch/commons/alerting/model/Workflow.kt | 6 +++--- .../commons/alerting/model/WorkflowInput.kt | 4 ++-- .../commons/alerting/model/action/Action.kt | 6 +++--- .../alerting/model/action/ActionExecutionPolicy.kt | 6 +++--- .../alerting/model/action/ActionExecutionScope.kt | 6 +++--- .../commons/alerting/model/action/Throttle.kt | 6 +++--- .../opensearch/commons/alerting/util/IndexUtils.kt | 4 ++-- .../notifications/NotificationsPluginInterface.kt | 2 +- .../commons/notifications/action/BaseResponse.kt | 4 ++-- .../action/CreateNotificationConfigRequest.kt | 8 ++++---- .../action/CreateNotificationConfigResponse.kt | 8 ++++---- .../action/DeleteNotificationConfigRequest.kt | 8 ++++---- .../action/DeleteNotificationConfigResponse.kt | 10 +++++----- .../notifications/action/GetChannelListRequest.kt | 8 ++++---- .../notifications/action/GetChannelListResponse.kt | 6 +++--- .../action/GetNotificationConfigRequest.kt | 8 ++++---- .../action/GetNotificationConfigResponse.kt | 6 +++--- .../action/GetPluginFeaturesRequest.kt | 8 ++++---- .../action/GetPluginFeaturesResponse.kt | 8 ++++---- .../action/LegacyPublishNotificationRequest.kt | 6 +++--- .../action/LegacyPublishNotificationResponse.kt | 6 +++--- .../action/SendNotificationRequest.kt | 8 ++++---- .../action/SendNotificationResponse.kt | 6 +++--- .../action/UpdateNotificationConfigRequest.kt | 8 ++++---- .../action/UpdateNotificationConfigResponse.kt | 8 ++++---- .../commons/notifications/model/Attachment.kt | 8 ++++---- .../commons/notifications/model/BaseModel.kt | 2 +- .../commons/notifications/model/Channel.kt | 8 ++++---- .../commons/notifications/model/ChannelList.kt | 2 +- .../commons/notifications/model/ChannelMessage.kt | 8 ++++---- .../commons/notifications/model/Chime.kt | 8 ++++---- .../commons/notifications/model/DeliveryStatus.kt | 8 ++++---- .../commons/notifications/model/Email.kt | 8 ++++---- .../commons/notifications/model/EmailGroup.kt | 8 ++++---- .../commons/notifications/model/EmailRecipient.kt | 8 ++++---- .../notifications/model/EmailRecipientStatus.kt | 8 ++++---- .../commons/notifications/model/EventSource.kt | 8 ++++---- .../commons/notifications/model/EventStatus.kt | 8 ++++---- .../notifications/model/NotificationConfig.kt | 8 ++++---- .../notifications/model/NotificationConfigInfo.kt | 8 ++++---- .../model/NotificationConfigSearchResult.kt | 2 +- .../notifications/model/NotificationEvent.kt | 8 ++++---- .../commons/notifications/model/SearchResults.kt | 8 ++++---- .../commons/notifications/model/SesAccount.kt | 8 ++++---- .../commons/notifications/model/Slack.kt | 8 ++++---- .../commons/notifications/model/SmtpAccount.kt | 8 ++++---- .../opensearch/commons/notifications/model/Sns.kt | 8 ++++---- .../commons/notifications/model/Webhook.kt | 8 ++++---- .../model/config/ConfigDataProperties.kt | 2 +- .../org/opensearch/commons/utils/EnumHelpers.kt | 6 +++--- .../opensearch/commons/utils/TransportHelpers.kt | 14 +++++++------- .../opensearch/commons/utils/XContentHelpers.kt | 4 ++-- .../org/opensearch/commons/authuser/UserTest.java | 2 +- .../message/LegacyChimeMessageTest.java | 2 +- .../message/LegacyCustomWebhookMessageTest.java | 2 +- .../message/LegacyEmailMessageTest.java | 2 +- .../message/LegacySlackMessageTest.java | 2 +- .../response/LegacyDestinationResponseTest.java | 2 +- .../alerting/AlertingPluginInterfaceTests.kt | 4 ++-- .../action/AcknowledgeAlertRequestTests.kt | 2 +- .../action/AcknowledgeAlertResponseTests.kt | 2 +- .../action/AcknowledgeChainedAlertRequestTests.kt | 2 +- .../alerting/action/DeleteMonitorRequestTests.kt | 2 +- .../alerting/action/DeleteWorkflowRequestTests.kt | 2 +- .../alerting/action/DeleteWorkflowResponseTests.kt | 2 +- .../alerting/action/GetAlertsRequestTests.kt | 2 +- .../alerting/action/GetAlertsResponseTests.kt | 2 +- .../alerting/action/GetFindingsRequestTests.kt | 2 +- .../alerting/action/GetFindingsResponseTests.kt | 4 ++-- .../action/GetWorkflowAlertsRequestTests.kt | 2 +- .../action/GetWorkflowAlertsResponseTests.kt | 2 +- .../alerting/action/GetWorkflowRequestTests.kt | 2 +- .../alerting/action/GetWorkflowResponseTests.kt | 4 ++-- .../alerting/action/IndexMonitorRequestTests.kt | 6 +++--- .../alerting/action/IndexMonitorResponseTests.kt | 2 +- .../alerting/action/IndexWorkflowRequestTests.kt | 6 +++--- .../alerting/action/IndexWorkflowResponseTests.kt | 2 +- .../alerting/action/PublishFindingsRequestTests.kt | 2 +- .../commons/alerting/model/MockScheduledJob.kt | 2 +- .../commons/alerting/model/WriteableTests.kt | 2 +- .../NotificationsPluginInterfaceTests.kt | 2 +- .../DeleteNotificationConfigResponseTests.kt | 2 +- 145 files changed, 377 insertions(+), 377 deletions(-) diff --git a/src/main/java/org/opensearch/commons/ConfigConstants.java b/src/main/java/org/opensearch/commons/ConfigConstants.java index d10dd005..2fcf9dae 100644 --- a/src/main/java/org/opensearch/commons/ConfigConstants.java +++ b/src/main/java/org/opensearch/commons/ConfigConstants.java @@ -6,8 +6,8 @@ package org.opensearch.commons; import org.opensearch.common.settings.SecureSetting; -import org.opensearch.common.settings.SecureString; import org.opensearch.common.settings.Setting; +import org.opensearch.core.common.settings.SecureString; public class ConfigConstants { diff --git a/src/main/java/org/opensearch/commons/authuser/User.java b/src/main/java/org/opensearch/commons/authuser/User.java index de8a66a6..43f0ba57 100644 --- a/src/main/java/org/opensearch/commons/authuser/User.java +++ b/src/main/java/org/opensearch/commons/authuser/User.java @@ -5,7 +5,7 @@ package org.opensearch.commons.authuser; -import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken; +import static org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken; import java.io.IOException; import java.util.ArrayList; @@ -19,9 +19,9 @@ import org.opensearch.client.Response; import org.opensearch.common.Nullable; import org.opensearch.common.inject.internal.ToStringBuilder; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.json.JsonXContent; import org.opensearch.core.common.Strings; diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java index f08d33b2..164531f0 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java @@ -11,9 +11,9 @@ import java.util.Map; import org.apache.hc.core5.net.URIBuilder; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; import org.opensearch.core.common.Strings; /** diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java index 52e18903..32fad6d1 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java @@ -7,7 +7,7 @@ import java.io.IOException; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.Strings; /** diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java index 077d901e..f9fd9a07 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java @@ -12,8 +12,8 @@ import org.apache.hc.client5.http.classic.methods.HttpPatch; import org.apache.hc.client5.http.classic.methods.HttpPost; import org.apache.hc.client5.http.classic.methods.HttpPut; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.common.Strings; /** diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java index 480ae76b..c37c6d77 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java @@ -9,8 +9,8 @@ import java.net.URI; import java.util.List; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.commons.notifications.model.MethodType; import org.opensearch.core.common.Strings; diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java index afef192c..7f4c598f 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java @@ -7,8 +7,8 @@ import java.io.IOException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.commons.destination.util.Util; import org.opensearch.core.common.Strings; diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java index b42bd87e..27b8849f 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java @@ -7,7 +7,7 @@ import java.io.IOException; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.Strings; /** diff --git a/src/main/java/org/opensearch/commons/destination/response/LegacyBaseResponse.java b/src/main/java/org/opensearch/commons/destination/response/LegacyBaseResponse.java index 4d34b67f..218cb89a 100644 --- a/src/main/java/org/opensearch/commons/destination/response/LegacyBaseResponse.java +++ b/src/main/java/org/opensearch/commons/destination/response/LegacyBaseResponse.java @@ -7,9 +7,9 @@ import java.io.IOException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; /** * This class holds the generic response attributes diff --git a/src/main/java/org/opensearch/commons/destination/response/LegacyDestinationResponse.java b/src/main/java/org/opensearch/commons/destination/response/LegacyDestinationResponse.java index d55f5f3d..fd6467f6 100644 --- a/src/main/java/org/opensearch/commons/destination/response/LegacyDestinationResponse.java +++ b/src/main/java/org/opensearch/commons/destination/response/LegacyDestinationResponse.java @@ -7,8 +7,8 @@ import java.io.IOException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; /** * This class is a place holder for destination response metadata diff --git a/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt b/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt index ea2f1391..9780a758 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt @@ -7,8 +7,8 @@ package org.opensearch.commons.alerting import org.opensearch.action.ActionListener import org.opensearch.action.ActionResponse import org.opensearch.client.node.NodeClient -import org.opensearch.common.io.stream.NamedWriteableRegistry -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.alerting.action.AcknowledgeAlertRequest import org.opensearch.commons.alerting.action.AcknowledgeAlertResponse import org.opensearch.commons.alerting.action.AcknowledgeChainedAlertRequest diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertRequest.kt index 2576458e..01f3fdd2 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertRequest.kt @@ -8,8 +8,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.WriteRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import java.io.IOException import java.util.Collections diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponse.kt index 2198574d..10c5f576 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponse.kt @@ -4,8 +4,8 @@ */ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeChainedAlertRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeChainedAlertRequest.kt index a89c6332..2c482f26 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeChainedAlertRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeChainedAlertRequest.kt @@ -7,8 +7,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import java.io.IOException import java.util.Collections diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorRequest.kt index 2d236c36..b0bd9992 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorRequest.kt @@ -3,8 +3,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.WriteRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import java.io.IOException class DeleteMonitorRequest : ActionRequest { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorResponse.kt index 3d9b9920..ba4b68d3 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorResponse.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.util.IndexUtils import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowRequest.kt index 4990f497..10189e89 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowRequest.kt @@ -2,8 +2,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import java.io.IOException class DeleteWorkflowRequest : ActionRequest { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponse.kt index 8da62c5e..391ba418 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponse.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.util.IndexUtils import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequest.kt index bfebdb2b..5b8f0c78 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequest.kt @@ -2,8 +2,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Table import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponse.kt index 37ffaf61..560647fe 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponse.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt index ae65ca26..d0dab6c8 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt @@ -2,8 +2,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Table import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponse.kt index e0e0d06d..bf5d5ce1 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponse.kt @@ -1,12 +1,12 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.FindingWithDocs import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.io.IOException class GetFindingsResponse : BaseResponse { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequest.kt index 9e2c8b2b..b95a4cd1 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequest.kt @@ -2,8 +2,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Table import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponse.kt index b426f7e0..2748ebbc 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponse.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowRequest.kt index 1b7948cd..cff81206 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowRequest.kt @@ -7,8 +7,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.rest.RestRequest import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponse.kt index f18550c5..21245a27 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponse.kt @@ -5,8 +5,8 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Workflow import org.opensearch.commons.alerting.util.IndexUtils.Companion._ID import org.opensearch.commons.alerting.util.IndexUtils.Companion._PRIMARY_TERM @@ -15,7 +15,7 @@ import org.opensearch.commons.alerting.util.IndexUtils.Companion._VERSION import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.io.IOException class GetWorkflowResponse : BaseResponse { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequest.kt index 8a7f4b87..d61046bd 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequest.kt @@ -3,8 +3,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.WriteRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Monitor import org.opensearch.rest.RestRequest import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponse.kt index f0ddda17..c100ae84 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponse.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.util.IndexUtils.Companion._ID import org.opensearch.commons.alerting.util.IndexUtils.Companion._PRIMARY_TERM diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt index 15a895ca..af589cfc 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt @@ -4,8 +4,8 @@ import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions import org.opensearch.action.support.WriteRequest -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.CompositeInput import org.opensearch.commons.alerting.model.Workflow import org.opensearch.rest.RestRequest diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponse.kt index 89863ba5..10ca1cd5 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponse.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Workflow import org.opensearch.commons.alerting.util.IndexUtils import org.opensearch.commons.notifications.action.BaseResponse diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequest.kt index 7118ec44..76686f21 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequest.kt @@ -2,8 +2,8 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Finding import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/SubscribeFindingsResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/SubscribeFindingsResponse.kt index 494cb701..26025608 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/SubscribeFindingsResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/SubscribeFindingsResponse.kt @@ -1,11 +1,11 @@ package org.opensearch.commons.alerting.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.io.IOException class SubscribeFindingsResponse : BaseResponse { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregationBuilder.kt b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregationBuilder.kt index 37c13350..80bb91b9 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregationBuilder.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregationBuilder.kt @@ -1,11 +1,11 @@ package org.opensearch.commons.alerting.aggregation.bucketselectorext -import org.opensearch.common.ParsingException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.aggregation.bucketselectorext.BucketSelectorExtFilter.Companion.BUCKET_SELECTOR_COMPOSITE_AGG_FILTER import org.opensearch.commons.alerting.aggregation.bucketselectorext.BucketSelectorExtFilter.Companion.BUCKET_SELECTOR_FILTER import org.opensearch.core.ParseField +import org.opensearch.core.common.ParsingException import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregator.kt b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregator.kt index a56e01c3..9003102e 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregator.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregator.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.aggregation.bucketselectorext import org.apache.lucene.util.BytesRef -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.script.BucketAggregationSelectorScript import org.opensearch.script.Script import org.opensearch.search.DocValueFormat diff --git a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtFilter.kt b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtFilter.kt index e9bddfa3..49b45ba0 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtFilter.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtFilter.kt @@ -1,8 +1,8 @@ package org.opensearch.commons.alerting.aggregation.bucketselectorext -import org.opensearch.common.ParsingException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.ParsingException +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.ParseField import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorIndices.kt b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorIndices.kt index 94790987..e2352be9 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorIndices.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorIndices.kt @@ -1,6 +1,6 @@ package org.opensearch.commons.alerting.aggregation.bucketselectorext -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.search.aggregations.InternalAggregation diff --git a/src/main/kotlin/org/opensearch/commons/alerting/alerts/AlertError.kt b/src/main/kotlin/org/opensearch/commons/alerting/alerts/AlertError.kt index ff6040e8..c26f5c61 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/alerts/AlertError.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/alerts/AlertError.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.alerts -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import org.opensearch.commons.alerting.util.instant import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ActionExecutionResult.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ActionExecutionResult.kt index 84fd292b..ca4410e8 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ActionExecutionResult.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ActionExecutionResult.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.util.instant import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/AggregationResultBucket.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/AggregationResultBucket.kt index d6e227d6..b2f2a80d 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/AggregationResultBucket.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/AggregationResultBucket.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.ParsingException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken +import org.opensearch.core.common.ParsingException +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt index 4c63a07c..6e0e4110 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.common.lucene.uid.Versions -import org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken +import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import org.opensearch.commons.alerting.alerts.AlertError import org.opensearch.commons.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION import org.opensearch.commons.alerting.util.instant diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/BucketLevelTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/BucketLevelTrigger.kt index 689c1692..835ebe30 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/BucketLevelTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/BucketLevelTrigger.kt @@ -2,9 +2,8 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.aggregation.bucketselectorext.BucketSelectorExtAggregationBuilder import org.opensearch.commons.alerting.model.Trigger.Companion.ACTIONS_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.ID_FIELD @@ -16,6 +15,7 @@ import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException data class BucketLevelTrigger( diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedAlertTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedAlertTrigger.kt index debc4ca6..912d8a6e 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedAlertTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedAlertTrigger.kt @@ -2,9 +2,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.Trigger.Companion.ACTIONS_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.ID_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.NAME_FIELD diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedMonitorFindings.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedMonitorFindings.kt index cf2bafd6..52486bc6 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedMonitorFindings.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedMonitorFindings.kt @@ -1,8 +1,8 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.commons.utils.validateId import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInput.kt index 65ed29fd..11d9dc39 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInput.kt @@ -3,9 +3,9 @@ package org.opensearch.commons.alerting.model import org.apache.commons.validator.routines.UrlValidator import org.apache.hc.core5.net.URIBuilder import org.opensearch.common.CheckedFunction -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/CompositeInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/CompositeInput.kt index 229f20e2..b54812f3 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/CompositeInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/CompositeInput.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DataSources.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DataSources.kt index 87257905..43e0c0d1 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DataSources.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DataSources.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Delegate.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Delegate.kt index 65158a68..ae311d9d 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Delegate.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Delegate.kt @@ -1,8 +1,8 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.commons.utils.validateId import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelMonitorInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelMonitorInput.kt index 0b34a4cd..fa7aa6a0 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelMonitorInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelMonitorInput.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt index 36a37026..921a5b42 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt @@ -1,8 +1,8 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DocumentLevelTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DocumentLevelTrigger.kt index 6f5b9935..a5b7e88a 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DocumentLevelTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DocumentLevelTrigger.kt @@ -2,9 +2,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.Trigger.Companion.ACTIONS_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.ID_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.NAME_FIELD diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt index d4e69498..a4a055cb 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import org.opensearch.commons.alerting.util.instant import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/FindingDocument.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/FindingDocument.kt index 9fc6e6b5..84302920 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/FindingDocument.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/FindingDocument.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.model import org.apache.logging.log4j.LogManager -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/FindingWithDocs.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/FindingWithDocs.kt index 69505fc2..a7c921cb 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/FindingWithDocs.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/FindingWithDocs.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.model import org.apache.logging.log4j.LogManager -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Input.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Input.kt index 927cb7e8..e305cf61 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Input.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Input.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.ClusterMetricsInput.Companion.URI_FIELD import org.opensearch.commons.alerting.model.DocLevelMonitorInput.Companion.DOC_LEVEL_INPUT_FIELD import org.opensearch.commons.alerting.model.SearchInput.Companion.SEARCH_FIELD diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Monitor.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Monitor.kt index a7e7b639..c959373b 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Monitor.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Monitor.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.util.IndexUtils.Companion.MONITOR_MAX_INPUTS import org.opensearch.commons.alerting.util.IndexUtils.Companion.MONITOR_MAX_TRIGGERS import org.opensearch.commons.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/NoOpTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/NoOpTrigger.kt index 92456492..f832c4f2 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/NoOpTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/NoOpTrigger.kt @@ -2,9 +2,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.action.Action import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/QueryLevelTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/QueryLevelTrigger.kt index d4246f64..36b355d0 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/QueryLevelTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/QueryLevelTrigger.kt @@ -2,9 +2,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.Trigger.Companion.ACTIONS_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.ID_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.NAME_FIELD diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Schedule.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Schedule.kt index d3869c46..b20249ae 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Schedule.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Schedule.kt @@ -4,9 +4,9 @@ import com.cronutils.model.CronType import com.cronutils.model.definition.CronDefinitionBuilder import com.cronutils.model.time.ExecutionTime import com.cronutils.parser.CronParser -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ScheduledJob.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ScheduledJob.kt index 3df83609..e93b5076 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ScheduledJob.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ScheduledJob.kt @@ -1,6 +1,6 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/SearchInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/SearchInput.kt index 53d20e6e..75995b8d 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/SearchInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/SearchInput.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Sequence.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Sequence.kt index 108f4004..ee8720d8 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Sequence.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Sequence.kt @@ -1,8 +1,8 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Table.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Table.kt index 66074d21..56d8a575 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Table.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Table.kt @@ -1,8 +1,8 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import java.io.IOException data class Table( diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Trigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Trigger.kt index fdc7ae80..5762adbc 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Trigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Trigger.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.action.Action import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Workflow.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Workflow.kt index a509f8d7..32d1098e 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Workflow.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Workflow.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION import org.opensearch.commons.alerting.util.IndexUtils.Companion.WORKFLOW_MAX_INPUTS import org.opensearch.commons.alerting.util.IndexUtils.Companion._ID diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/WorkflowInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/WorkflowInput.kt index bdead75a..fcf7a94f 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/WorkflowInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/WorkflowInput.kt @@ -1,7 +1,7 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.XContentParser import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/action/Action.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/action/Action.kt index ea0812a2..652dabcd 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/action/Action.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/action/Action.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model.action import org.opensearch.common.UUIDs -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionPolicy.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionPolicy.kt index 214f49f4..516dba09 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionPolicy.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionPolicy.kt @@ -1,8 +1,8 @@ package org.opensearch.commons.alerting.model.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionScope.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionScope.kt index 656cb849..4f849b81 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionScope.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionScope.kt @@ -1,8 +1,8 @@ package org.opensearch.commons.alerting.model.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/action/Throttle.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/action/Throttle.kt index 2150d60f..f0041d4a 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/action/Throttle.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/action/Throttle.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model.action import org.apache.commons.codec.binary.StringUtils -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/util/IndexUtils.kt b/src/main/kotlin/org/opensearch/commons/alerting/util/IndexUtils.kt index 51f9be52..91c42e67 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/util/IndexUtils.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/util/IndexUtils.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.util -import org.opensearch.common.bytes.BytesReference -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.settings.SupportedClusterMetricsSettings import org.opensearch.commons.authuser.User +import org.opensearch.core.common.bytes.BytesReference import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import java.time.Instant diff --git a/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt b/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt index c3baa938..a2c03468 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt @@ -7,7 +7,7 @@ package org.opensearch.commons.notifications import org.opensearch.action.ActionListener import org.opensearch.action.ActionResponse import org.opensearch.client.node.NodeClient -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.commons.notifications.action.CreateNotificationConfigRequest diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/BaseResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/BaseResponse.kt index 8632d9ab..5b2e4a6c 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/BaseResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/BaseResponse.kt @@ -6,9 +6,9 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionResponse -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.ToXContentObject -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigRequest.kt index 29d08084..d23ca33a 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigRequest.kt @@ -6,10 +6,10 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TAG import org.opensearch.commons.notifications.model.NotificationConfig diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigResponse.kt index f91fb89f..cbd4eeb0 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigResponse.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigRequest.kt index 699274f1..8df55b49 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigRequest.kt @@ -7,10 +7,10 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_LIST_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.stringList diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponse.kt index 71b1e7d9..7e846410 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponse.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.DELETE_RESPONSE_LIST_TAG import org.opensearch.commons.utils.STRING_READER import org.opensearch.commons.utils.STRING_WRITER @@ -17,7 +17,7 @@ import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListRequest.kt index 8be96bfd..f7376331 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListRequest.kt @@ -6,10 +6,10 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.COMPACT_TAG import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListResponse.kt index d91b4b77..35e1e3cc 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListResponse.kt @@ -4,9 +4,9 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.notifications.model.ChannelList import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt index c5ff31d8..ee0c1328 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt @@ -7,10 +7,10 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_LIST_TAG import org.opensearch.commons.notifications.NotificationConstants.DEFAULT_MAX_ITEMS import org.opensearch.commons.notifications.NotificationConstants.FILTER_PARAM_LIST_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigResponse.kt index 8240d767..a7203cf7 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigResponse.kt @@ -4,9 +4,9 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.notifications.model.NotificationConfigSearchResult import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesRequest.kt index 5e9b930d..bd861178 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesRequest.kt @@ -6,10 +6,10 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.COMPACT_TAG import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt index 6601ef67..fa10185e 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.ALLOWED_CONFIG_TYPE_LIST_TAG import org.opensearch.commons.notifications.NotificationConstants.PLUGIN_FEATURES_TAG import org.opensearch.commons.utils.STRING_READER diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationRequest.kt index a4f8024d..e8b26530 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationRequest.kt @@ -7,9 +7,9 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.destination.message.LegacyBaseMessage import org.opensearch.commons.destination.message.LegacyChimeMessage import org.opensearch.commons.destination.message.LegacyCustomWebhookMessage diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationResponse.kt index b32f9ac2..14b8096a 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationResponse.kt @@ -5,9 +5,9 @@ package org.opensearch.commons.notifications.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.destination.response.LegacyDestinationResponse import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt index da30648f..d23ae9c2 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt @@ -7,10 +7,10 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CHANNEL_ID_LIST_TAG import org.opensearch.commons.notifications.NotificationConstants.CHANNEL_MESSAGE_TAG import org.opensearch.commons.notifications.NotificationConstants.EVENT_SOURCE_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationResponse.kt index 8feeed8d..142a38ad 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationResponse.kt @@ -4,9 +4,9 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.notifications.model.NotificationEvent import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigRequest.kt index 865e54f7..5fea0cde 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigRequest.kt @@ -7,10 +7,10 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TAG import org.opensearch.commons.notifications.model.NotificationConfig diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigResponse.kt index 9d1f94ca..9c83d845 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigResponse.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt index 8c035071..e7e8e4f9 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt @@ -5,10 +5,10 @@ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.FILE_CONTENT_TYPE_TAG import org.opensearch.commons.notifications.NotificationConstants.FILE_DATA_TAG import org.opensearch.commons.notifications.NotificationConstants.FILE_ENCODING_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/BaseModel.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/BaseModel.kt index 2f9e267c..2271fa7f 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/BaseModel.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/BaseModel.kt @@ -4,7 +4,7 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContentObject /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Channel.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Channel.kt index 3eb307bd..857dd529 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Channel.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Channel.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TYPE_TAG import org.opensearch.commons.notifications.NotificationConstants.DESCRIPTION_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelList.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelList.kt index b7d3c5a7..92833602 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelList.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelList.kt @@ -7,7 +7,7 @@ package org.opensearch.commons.notifications.model import org.apache.lucene.search.TotalHits import org.opensearch.action.search.SearchResponse -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.notifications.NotificationConstants.CHANNEL_LIST_TAG import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt index 2d0c6412..e98fa467 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt @@ -5,10 +5,10 @@ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.ATTACHMENT_TAG import org.opensearch.commons.notifications.NotificationConstants.HTML_DESCRIPTION_TAG import org.opensearch.commons.notifications.NotificationConstants.TEXT_DESCRIPTION_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Chime.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Chime.kt index 64ab4973..e515a848 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Chime.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Chime.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.URL_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateUrl diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt index 7b4a427d..8b7be64d 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.STATUS_CODE_TAG import org.opensearch.commons.notifications.NotificationConstants.STATUS_TEXT_TAG import org.opensearch.commons.utils.logger diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Email.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Email.kt index ab6b95e6..c2fbf3fa 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Email.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Email.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.EMAIL_ACCOUNT_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.EMAIL_GROUP_ID_LIST_TAG import org.opensearch.commons.notifications.NotificationConstants.RECIPIENT_LIST_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailGroup.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailGroup.kt index 036f47ed..400760f9 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailGroup.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailGroup.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.RECIPIENT_LIST_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.objectList diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipient.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipient.kt index 732614e6..d41d3b28 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipient.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipient.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.RECIPIENT_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateEmail diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipientStatus.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipientStatus.kt index 9f70ba89..cd7561c9 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipientStatus.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipientStatus.kt @@ -5,10 +5,10 @@ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.DELIVERY_STATUS_TAG import org.opensearch.commons.notifications.NotificationConstants.RECIPIENT_TAG import org.opensearch.commons.utils.logger diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt index 5d634d89..33c41129 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.REFERENCE_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.SEVERITY_TAG import org.opensearch.commons.notifications.NotificationConstants.TAGS_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt index 1fc0be11..81e34bb5 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt @@ -5,10 +5,10 @@ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_NAME_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TYPE_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt index cfbc8fa8..8579435d 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TYPE_TAG import org.opensearch.commons.notifications.NotificationConstants.DESCRIPTION_TAG import org.opensearch.commons.notifications.NotificationConstants.IS_ENABLED_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt index e7126f1a..7b16ecde 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt @@ -5,10 +5,10 @@ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TAG import org.opensearch.commons.notifications.NotificationConstants.CREATED_TIME_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigSearchResult.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigSearchResult.kt index 50d18e07..29f28ab1 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigSearchResult.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigSearchResult.kt @@ -7,7 +7,7 @@ package org.opensearch.commons.notifications.model import org.apache.lucene.search.TotalHits import org.opensearch.action.search.SearchResponse -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.notifications.NotificationConstants.CONFIG_LIST_TAG import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt index a03e0c52..200505a9 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt @@ -4,11 +4,11 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.common.xcontent.XContentHelper -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType import org.opensearch.commons.notifications.NotificationConstants.EVENT_SOURCE_TAG import org.opensearch.commons.notifications.NotificationConstants.STATUS_LIST_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/SearchResults.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/SearchResults.kt index a193f9a8..42511c6f 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/SearchResults.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/SearchResults.kt @@ -9,10 +9,10 @@ import org.apache.lucene.search.TotalHits.Relation import org.apache.lucene.search.TotalHits.Relation.EQUAL_TO import org.apache.lucene.search.TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO import org.opensearch.action.search.SearchResponse -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.START_INDEX_TAG import org.opensearch.commons.notifications.NotificationConstants.TOTAL_HITS_TAG import org.opensearch.commons.notifications.NotificationConstants.TOTAL_HIT_RELATION_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt index f45f217f..83b92e3e 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt @@ -5,10 +5,10 @@ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.FROM_ADDRESS_TAG import org.opensearch.commons.notifications.NotificationConstants.REGION_TAG import org.opensearch.commons.notifications.NotificationConstants.ROLE_ARN_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Slack.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Slack.kt index da0d46a3..103baeaa 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Slack.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Slack.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.URL_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateUrl diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt index 2fd8aac2..1f3d996e 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.FROM_ADDRESS_TAG import org.opensearch.commons.notifications.NotificationConstants.HOST_TAG import org.opensearch.commons.notifications.NotificationConstants.METHOD_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Sns.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Sns.kt index 82585ae6..e1d66c86 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Sns.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Sns.kt @@ -5,10 +5,10 @@ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.ROLE_ARN_TAG import org.opensearch.commons.notifications.NotificationConstants.TOPIC_ARN_TAG import org.opensearch.commons.utils.fieldIfNotNull diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Webhook.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Webhook.kt index 40d71790..b1cdc883 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Webhook.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Webhook.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.HEADER_PARAMS_TAG import org.opensearch.commons.notifications.NotificationConstants.METHOD_TAG import org.opensearch.commons.notifications.NotificationConstants.URL_TAG diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/config/ConfigDataProperties.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/config/ConfigDataProperties.kt index 1fe4cae6..1019b345 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/config/ConfigDataProperties.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/config/ConfigDataProperties.kt @@ -4,7 +4,7 @@ */ package org.opensearch.commons.notifications.model.config -import org.opensearch.common.io.stream.Writeable.Reader +import org.opensearch.core.common.io.stream.Writeable.Reader import org.opensearch.commons.notifications.model.BaseConfigData import org.opensearch.commons.notifications.model.Chime import org.opensearch.commons.notifications.model.ConfigType diff --git a/src/main/kotlin/org/opensearch/commons/utils/EnumHelpers.kt b/src/main/kotlin/org/opensearch/commons/utils/EnumHelpers.kt index bb57dc50..6d5b9e49 100644 --- a/src/main/kotlin/org/opensearch/commons/utils/EnumHelpers.kt +++ b/src/main/kotlin/org/opensearch/commons/utils/EnumHelpers.kt @@ -4,9 +4,9 @@ */ package org.opensearch.commons.utils -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser import java.util.EnumSet diff --git a/src/main/kotlin/org/opensearch/commons/utils/TransportHelpers.kt b/src/main/kotlin/org/opensearch/commons/utils/TransportHelpers.kt index cec7ba81..07d1ddb4 100644 --- a/src/main/kotlin/org/opensearch/commons/utils/TransportHelpers.kt +++ b/src/main/kotlin/org/opensearch/commons/utils/TransportHelpers.kt @@ -5,13 +5,13 @@ package org.opensearch.commons.utils -import org.opensearch.common.io.stream.InputStreamStreamInput -import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput -import org.opensearch.common.io.stream.NamedWriteableRegistry -import org.opensearch.common.io.stream.OutputStreamStreamOutput -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.io.stream.StreamOutput -import org.opensearch.common.io.stream.Writeable +import org.opensearch.core.common.io.stream.InputStreamStreamInput +import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput +import org.opensearch.core.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.OutputStreamStreamOutput +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream diff --git a/src/main/kotlin/org/opensearch/commons/utils/XContentHelpers.kt b/src/main/kotlin/org/opensearch/commons/utils/XContentHelpers.kt index a049aefc..50317fd9 100644 --- a/src/main/kotlin/org/opensearch/commons/utils/XContentHelpers.kt +++ b/src/main/kotlin/org/opensearch/commons/utils/XContentHelpers.kt @@ -5,8 +5,8 @@ package org.opensearch.commons.utils -import org.opensearch.common.io.stream.StreamInput -import org.opensearch.common.xcontent.XContentParserUtils +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType import org.opensearch.core.xcontent.DeprecationHandler import org.opensearch.core.xcontent.NamedXContentRegistry diff --git a/src/test/java/org/opensearch/commons/authuser/UserTest.java b/src/test/java/org/opensearch/commons/authuser/UserTest.java index 3453d802..6600e339 100644 --- a/src/test/java/org/opensearch/commons/authuser/UserTest.java +++ b/src/test/java/org/opensearch/commons/authuser/UserTest.java @@ -16,7 +16,7 @@ import org.junit.jupiter.api.Test; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.core.common.Strings; diff --git a/src/test/java/org/opensearch/commons/destination/message/LegacyChimeMessageTest.java b/src/test/java/org/opensearch/commons/destination/message/LegacyChimeMessageTest.java index 191fef30..b5f57b46 100644 --- a/src/test/java/org/opensearch/commons/destination/message/LegacyChimeMessageTest.java +++ b/src/test/java/org/opensearch/commons/destination/message/LegacyChimeMessageTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.api.Test; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; public class LegacyChimeMessageTest { diff --git a/src/test/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessageTest.java b/src/test/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessageTest.java index 855e2cbc..dba1b65d 100644 --- a/src/test/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessageTest.java +++ b/src/test/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessageTest.java @@ -16,7 +16,7 @@ import org.apache.hc.client5.http.classic.methods.HttpPost; import org.junit.jupiter.api.Test; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; public class LegacyCustomWebhookMessageTest { diff --git a/src/test/java/org/opensearch/commons/destination/message/LegacyEmailMessageTest.java b/src/test/java/org/opensearch/commons/destination/message/LegacyEmailMessageTest.java index 06625053..bc4546fd 100644 --- a/src/test/java/org/opensearch/commons/destination/message/LegacyEmailMessageTest.java +++ b/src/test/java/org/opensearch/commons/destination/message/LegacyEmailMessageTest.java @@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; public class LegacyEmailMessageTest { diff --git a/src/test/java/org/opensearch/commons/destination/message/LegacySlackMessageTest.java b/src/test/java/org/opensearch/commons/destination/message/LegacySlackMessageTest.java index 6b04d651..2ea3ea59 100644 --- a/src/test/java/org/opensearch/commons/destination/message/LegacySlackMessageTest.java +++ b/src/test/java/org/opensearch/commons/destination/message/LegacySlackMessageTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.api.Test; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; public class LegacySlackMessageTest { diff --git a/src/test/java/org/opensearch/commons/destination/response/LegacyDestinationResponseTest.java b/src/test/java/org/opensearch/commons/destination/response/LegacyDestinationResponseTest.java index e9189d24..dc7cc079 100644 --- a/src/test/java/org/opensearch/commons/destination/response/LegacyDestinationResponseTest.java +++ b/src/test/java/org/opensearch/commons/destination/response/LegacyDestinationResponseTest.java @@ -12,7 +12,7 @@ import org.junit.jupiter.api.Test; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; public class LegacyDestinationResponseTest { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt index 5d78dd51..616855c8 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt @@ -12,7 +12,7 @@ import org.mockito.junit.jupiter.MockitoExtension import org.opensearch.action.ActionListener import org.opensearch.action.ActionType import org.opensearch.client.node.NodeClient -import org.opensearch.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.NamedWriteableRegistry import org.opensearch.common.settings.Settings import org.opensearch.commons.alerting.action.AcknowledgeAlertRequest import org.opensearch.commons.alerting.action.AcknowledgeAlertResponse @@ -40,7 +40,7 @@ import org.opensearch.commons.alerting.model.FindingWithDocs import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.model.Workflow import org.opensearch.index.seqno.SequenceNumbers -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import org.opensearch.search.SearchModule @Suppress("UNCHECKED_CAST") diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertRequestTests.kt index a3be117a..cbd9e98a 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertRequestTests.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput class AcknowledgeAlertRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponseTests.kt index 7e22a1a3..86e41c1c 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponseTests.kt @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.alerts.AlertError import org.opensearch.commons.alerting.model.ActionExecutionResult import org.opensearch.commons.alerting.model.Alert diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeChainedAlertRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeChainedAlertRequestTests.kt index 3d571198..b624edfa 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeChainedAlertRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeChainedAlertRequestTests.kt @@ -10,7 +10,7 @@ import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput class AcknowledgeChainedAlertRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorRequestTests.kt index 0abd9d88..38c89fc5 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorRequestTests.kt @@ -5,7 +5,7 @@ import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput class DeleteMonitorRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowRequestTests.kt index 8ebe91f3..a92ee17e 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowRequestTests.kt @@ -3,7 +3,7 @@ package org.opensearch.commons.alerting.action import org.junit.Assert import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput class DeleteWorkflowRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponseTests.kt index 299925f4..b3d82b90 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponseTests.kt @@ -3,7 +3,7 @@ package org.opensearch.commons.alerting.action import org.junit.Assert import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput class DeleteWorkflowResponseTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequestTests.kt index a56a0f02..3cd32be7 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequestTests.kt @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.Table internal class GetAlertsRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponseTests.kt index dc0aac1e..270cccea 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponseTests.kt @@ -5,7 +5,7 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.builder import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.alerting.randomUser diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt index f83cb8de..71c1fc41 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.Table internal class GetFindingsRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponseTests.kt index e5b391bb..81bae90d 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponseTests.kt @@ -3,12 +3,12 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.DocLevelQuery import org.opensearch.commons.alerting.model.Finding import org.opensearch.commons.alerting.model.FindingDocument import org.opensearch.commons.alerting.model.FindingWithDocs -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.time.Instant internal class GetFindingsResponseTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequestTests.kt index da480fbc..1c1490ff 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequestTests.kt @@ -6,7 +6,7 @@ import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.Table internal class GetWorkflowAlertsRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponseTests.kt index fd656d67..17e9f019 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponseTests.kt @@ -5,7 +5,7 @@ import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.builder import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.alerting.randomAlert diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowRequestTests.kt index c9e8ebca..e7c4be06 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowRequestTests.kt @@ -3,7 +3,7 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.rest.RestRequest class GetWorkflowRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponseTests.kt index e1977357..95017489 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponseTests.kt @@ -3,14 +3,14 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.CompositeInput import org.opensearch.commons.alerting.model.IntervalSchedule import org.opensearch.commons.alerting.model.Workflow import org.opensearch.commons.alerting.randomDelegate import org.opensearch.commons.alerting.randomUser import org.opensearch.commons.alerting.randomWorkflow -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.time.Instant import java.time.temporal.ChronoUnit diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequestTests.kt index 34a1c334..c34677fb 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequestTests.kt @@ -4,9 +4,9 @@ import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput -import org.opensearch.common.io.stream.NamedWriteableRegistry -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput +import org.opensearch.core.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.common.settings.Settings import org.opensearch.commons.alerting.model.SearchInput import org.opensearch.commons.alerting.randomBucketLevelMonitor diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponseTests.kt index f9332649..7982e104 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponseTests.kt @@ -3,7 +3,7 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.CronSchedule import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.randomUser diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequestTests.kt index bb4c453a..43555451 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequestTests.kt @@ -5,9 +5,9 @@ import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput -import org.opensearch.common.io.stream.NamedWriteableRegistry -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput +import org.opensearch.core.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.common.settings.Settings import org.opensearch.commons.alerting.model.ChainedMonitorFindings import org.opensearch.commons.alerting.model.CompositeInput diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponseTests.kt index 8565d093..8d5e0857 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponseTests.kt @@ -3,7 +3,7 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.ChainedAlertTrigger import org.opensearch.commons.alerting.model.CronSchedule import org.opensearch.commons.alerting.model.Workflow diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequestTests.kt index c3d69ace..94f89116 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequestTests.kt @@ -4,7 +4,7 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.randomFinding class PublishFindingsRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/model/MockScheduledJob.kt b/src/test/kotlin/org/opensearch/commons/alerting/model/MockScheduledJob.kt index bf2ddfa3..59f3771b 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/model/MockScheduledJob.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/model/MockScheduledJob.kt @@ -1,6 +1,6 @@ package org.opensearch.commons.alerting.model -import org.opensearch.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import java.io.IOException diff --git a/src/test/kotlin/org/opensearch/commons/alerting/model/WriteableTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/model/WriteableTests.kt index 0c6c1b07..40b70c92 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/model/WriteableTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/model/WriteableTests.kt @@ -3,7 +3,7 @@ package org.opensearch.commons.alerting.model import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.action.Action import org.opensearch.commons.alerting.model.action.ActionExecutionPolicy import org.opensearch.commons.alerting.model.action.Throttle diff --git a/src/test/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterfaceTests.kt b/src/test/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterfaceTests.kt index 61cbca7a..2e09db60 100644 --- a/src/test/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterfaceTests.kt +++ b/src/test/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterfaceTests.kt @@ -49,7 +49,7 @@ import org.opensearch.commons.notifications.model.NotificationConfigSearchResult import org.opensearch.commons.notifications.model.NotificationEvent import org.opensearch.commons.notifications.model.SeverityType import org.opensearch.commons.notifications.model.Slack -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus import java.time.Instant @Suppress("UNCHECKED_CAST") diff --git a/src/test/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponseTests.kt b/src/test/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponseTests.kt index fb574114..a05fbca5 100644 --- a/src/test/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponseTests.kt @@ -11,7 +11,7 @@ import org.junit.jupiter.api.assertThrows import org.opensearch.commons.utils.createObjectFromJsonString import org.opensearch.commons.utils.getJsonString import org.opensearch.commons.utils.recreateObject -import org.opensearch.rest.RestStatus +import org.opensearch.core.rest.RestStatus internal class DeleteNotificationConfigResponseTests { From aacdaa874abe9ca1c11007b456d3f541a183f951 Mon Sep 17 00:00:00 2001 From: bowenlan-amzn Date: Thu, 13 Jul 2023 12:53:26 +0800 Subject: [PATCH 2/3] Fix ktlint issue Signed-off-by: bowenlan-amzn --- build.gradle | 10 ++++++---- .../commons/alerting/AlertingPluginInterface.kt | 4 ++-- .../alerting/action/AcknowledgeAlertResponse.kt | 4 ++-- .../commons/alerting/action/DeleteMonitorResponse.kt | 4 ++-- .../commons/alerting/action/DeleteWorkflowResponse.kt | 4 ++-- .../commons/alerting/action/GetAlertsRequest.kt | 2 +- .../commons/alerting/action/GetAlertsResponse.kt | 4 ++-- .../commons/alerting/action/GetFindingsRequest.kt | 2 +- .../commons/alerting/action/GetFindingsResponse.kt | 6 +++--- .../alerting/action/GetWorkflowAlertsRequest.kt | 2 +- .../alerting/action/GetWorkflowAlertsResponse.kt | 4 ++-- .../commons/alerting/action/GetWorkflowResponse.kt | 6 +++--- .../commons/alerting/action/IndexMonitorRequest.kt | 2 +- .../commons/alerting/action/IndexMonitorResponse.kt | 4 ++-- .../commons/alerting/action/IndexWorkflowRequest.kt | 4 ++-- .../commons/alerting/action/IndexWorkflowResponse.kt | 4 ++-- .../commons/alerting/action/PublishFindingsRequest.kt | 2 +- .../alerting/action/SubscribeFindingsResponse.kt | 4 ++-- .../BucketSelectorExtAggregationBuilder.kt | 4 ++-- .../bucketselectorext/BucketSelectorExtFilter.kt | 4 ++-- .../opensearch/commons/alerting/alerts/AlertError.kt | 6 +++--- .../commons/alerting/model/ActionExecutionResult.kt | 6 +++--- .../commons/alerting/model/AggregationResultBucket.kt | 2 +- .../org/opensearch/commons/alerting/model/Alert.kt | 8 ++++---- .../commons/alerting/model/BucketLevelTrigger.kt | 4 ++-- .../commons/alerting/model/ChainedAlertTrigger.kt | 6 +++--- .../commons/alerting/model/ChainedMonitorFindings.kt | 6 +++--- .../commons/alerting/model/ClusterMetricsInput.kt | 4 ++-- .../commons/alerting/model/CompositeInput.kt | 4 ++-- .../opensearch/commons/alerting/model/DataSources.kt | 2 +- .../org/opensearch/commons/alerting/model/Delegate.kt | 6 +++--- .../commons/alerting/model/DocLevelMonitorInput.kt | 4 ++-- .../opensearch/commons/alerting/model/DocLevelQuery.kt | 4 ++-- .../commons/alerting/model/DocumentLevelTrigger.kt | 6 +++--- .../org/opensearch/commons/alerting/model/Finding.kt | 4 ++-- .../commons/alerting/model/FindingDocument.kt | 2 +- .../commons/alerting/model/FindingWithDocs.kt | 2 +- .../org/opensearch/commons/alerting/model/Input.kt | 4 ++-- .../org/opensearch/commons/alerting/model/Monitor.kt | 6 +++--- .../opensearch/commons/alerting/model/NoOpTrigger.kt | 6 +++--- .../commons/alerting/model/QueryLevelTrigger.kt | 6 +++--- .../org/opensearch/commons/alerting/model/Schedule.kt | 4 ++-- .../opensearch/commons/alerting/model/ScheduledJob.kt | 2 +- .../opensearch/commons/alerting/model/SearchInput.kt | 4 ++-- .../org/opensearch/commons/alerting/model/Sequence.kt | 4 ++-- .../org/opensearch/commons/alerting/model/Trigger.kt | 4 ++-- .../org/opensearch/commons/alerting/model/Workflow.kt | 6 +++--- .../opensearch/commons/alerting/model/WorkflowInput.kt | 4 ++-- .../opensearch/commons/alerting/model/action/Action.kt | 4 ++-- .../alerting/model/action/ActionExecutionPolicy.kt | 4 ++-- .../alerting/model/action/ActionExecutionScope.kt | 4 ++-- .../commons/alerting/model/action/Throttle.kt | 4 ++-- .../org/opensearch/commons/alerting/util/IndexUtils.kt | 2 +- .../notifications/NotificationsPluginInterface.kt | 2 +- .../commons/notifications/action/BaseResponse.kt | 2 +- .../action/CreateNotificationConfigRequest.kt | 8 ++++---- .../action/CreateNotificationConfigResponse.kt | 6 +++--- .../action/DeleteNotificationConfigRequest.kt | 8 ++++---- .../action/DeleteNotificationConfigResponse.kt | 10 +++++----- .../notifications/action/GetChannelListRequest.kt | 6 +++--- .../notifications/action/GetChannelListResponse.kt | 2 +- .../action/GetNotificationConfigRequest.kt | 8 ++++---- .../action/GetNotificationConfigResponse.kt | 2 +- .../notifications/action/GetPluginFeaturesRequest.kt | 6 +++--- .../notifications/action/GetPluginFeaturesResponse.kt | 8 ++++---- .../action/LegacyPublishNotificationRequest.kt | 6 +++--- .../action/LegacyPublishNotificationResponse.kt | 2 +- .../notifications/action/SendNotificationRequest.kt | 8 ++++---- .../notifications/action/SendNotificationResponse.kt | 2 +- .../action/UpdateNotificationConfigRequest.kt | 8 ++++---- .../action/UpdateNotificationConfigResponse.kt | 6 +++--- .../commons/notifications/model/Attachment.kt | 8 ++++---- .../opensearch/commons/notifications/model/Channel.kt | 8 ++++---- .../commons/notifications/model/ChannelList.kt | 2 +- .../commons/notifications/model/ChannelMessage.kt | 8 ++++---- .../opensearch/commons/notifications/model/Chime.kt | 8 ++++---- .../commons/notifications/model/DeliveryStatus.kt | 8 ++++---- .../opensearch/commons/notifications/model/Email.kt | 8 ++++---- .../commons/notifications/model/EmailGroup.kt | 8 ++++---- .../commons/notifications/model/EmailRecipient.kt | 8 ++++---- .../notifications/model/EmailRecipientStatus.kt | 8 ++++---- .../commons/notifications/model/EventSource.kt | 8 ++++---- .../commons/notifications/model/EventStatus.kt | 8 ++++---- .../commons/notifications/model/NotificationConfig.kt | 8 ++++---- .../notifications/model/NotificationConfigInfo.kt | 8 ++++---- .../model/NotificationConfigSearchResult.kt | 2 +- .../commons/notifications/model/NotificationEvent.kt | 8 ++++---- .../commons/notifications/model/SearchResults.kt | 8 ++++---- .../commons/notifications/model/SesAccount.kt | 8 ++++---- .../opensearch/commons/notifications/model/Slack.kt | 8 ++++---- .../commons/notifications/model/SmtpAccount.kt | 8 ++++---- .../org/opensearch/commons/notifications/model/Sns.kt | 8 ++++---- .../opensearch/commons/notifications/model/Webhook.kt | 8 ++++---- .../notifications/model/config/ConfigDataProperties.kt | 2 +- .../kotlin/org/opensearch/commons/utils/EnumHelpers.kt | 2 +- .../org/opensearch/commons/utils/XContentHelpers.kt | 4 ++-- .../commons/alerting/AlertingPluginInterfaceTests.kt | 4 ++-- .../alerting/action/AcknowledgeAlertResponseTests.kt | 2 +- .../commons/alerting/action/GetAlertsRequestTests.kt | 2 +- .../commons/alerting/action/GetAlertsResponseTests.kt | 2 +- .../commons/alerting/action/GetFindingsRequestTests.kt | 2 +- .../alerting/action/GetFindingsResponseTests.kt | 2 +- .../alerting/action/GetWorkflowAlertsRequestTests.kt | 2 +- .../alerting/action/GetWorkflowAlertsResponseTests.kt | 2 +- .../alerting/action/GetWorkflowResponseTests.kt | 2 +- .../alerting/action/IndexMonitorRequestTests.kt | 6 +++--- .../alerting/action/IndexMonitorResponseTests.kt | 2 +- .../alerting/action/IndexWorkflowRequestTests.kt | 6 +++--- .../alerting/action/IndexWorkflowResponseTests.kt | 2 +- .../alerting/action/PublishFindingsRequestTests.kt | 2 +- .../commons/alerting/model/WriteableTests.kt | 2 +- 111 files changed, 269 insertions(+), 267 deletions(-) diff --git a/build.gradle b/build.gradle index 03d2d5a8..12936ba9 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") isSnapshot = "true" == System.getProperty("build.snapshot", "true") buildVersionQualifier = System.getProperty("build.version_qualifier", "") - kotlin_version = System.getProperty("kotlin.version", "1.6.10") + kotlin_version = System.getProperty("kotlin.version", "1.8.21") } repositories { @@ -114,7 +114,7 @@ spotless { buildUponDefaultConfig = true }*/ -task ktlint(type: JavaExec, group: "verification") { +tasks.register('ktlint', JavaExec) { description = "Check Kotlin code style." main = "com.pinterest.ktlint.Main" classpath = configurations.ktlint @@ -126,10 +126,12 @@ task ktlint(type: JavaExec, group: "verification") { check.dependsOn ktlint -task ktlintFormat(type: JavaExec, group: "formatting") { +tasks.register('ktlintFormat', JavaExec) { description = "Fix Kotlin code style deviations." - main = "com.pinterest.ktlint.Main" classpath = configurations.ktlint + // https://github.com/pinterest/ktlint/issues/1391#issuecomment-1251287020 + jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED" + setProperty("mainClass", "com.pinterest.ktlint.Main") args "-F", "src/**/*.kt" } diff --git a/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt b/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt index 9780a758..c905d2b3 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/AlertingPluginInterface.kt @@ -7,8 +7,6 @@ package org.opensearch.commons.alerting import org.opensearch.action.ActionListener import org.opensearch.action.ActionResponse import org.opensearch.client.node.NodeClient -import org.opensearch.core.common.io.stream.NamedWriteableRegistry -import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.alerting.action.AcknowledgeAlertRequest import org.opensearch.commons.alerting.action.AcknowledgeAlertResponse import org.opensearch.commons.alerting.action.AcknowledgeChainedAlertRequest @@ -33,6 +31,8 @@ import org.opensearch.commons.alerting.action.PublishFindingsRequest import org.opensearch.commons.alerting.action.SubscribeFindingsResponse import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.commons.utils.recreateObject +import org.opensearch.core.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.Writeable /** * All the transport action plugin interfaces for the Alerting plugin diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponse.kt index 10c5f576..53fc2f21 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponse.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorResponse.kt index ba4b68d3..90ac17ba 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteMonitorResponse.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.util.IndexUtils import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponse.kt index 391ba418..3ccb9f41 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/DeleteWorkflowResponse.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.util.IndexUtils import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequest.kt index 5b8f0c78..8b8a5a1f 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequest.kt @@ -2,9 +2,9 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException +import org.opensearch.commons.alerting.model.Table import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.commons.alerting.model.Table import java.io.IOException class GetAlertsRequest : ActionRequest { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponse.kt index 560647fe..50a4ec53 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponse.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt index d0dab6c8..0004d4f1 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequest.kt @@ -2,9 +2,9 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException +import org.opensearch.commons.alerting.model.Table import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.commons.alerting.model.Table import java.io.IOException class GetFindingsRequest : ActionRequest { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponse.kt index bf5d5ce1..9caeebde 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponse.kt @@ -1,12 +1,12 @@ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.FindingWithDocs import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.core.rest.RestStatus import java.io.IOException class GetFindingsResponse : BaseResponse { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequest.kt index b95a4cd1..bfa80044 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequest.kt @@ -2,9 +2,9 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException +import org.opensearch.commons.alerting.model.Table import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.commons.alerting.model.Table import java.io.IOException class GetWorkflowAlertsRequest : ActionRequest { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponse.kt index 2748ebbc..4856d747 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponse.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponse.kt index 21245a27..67bad9d0 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponse.kt @@ -5,17 +5,17 @@ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Workflow import org.opensearch.commons.alerting.util.IndexUtils.Companion._ID import org.opensearch.commons.alerting.util.IndexUtils.Companion._PRIMARY_TERM import org.opensearch.commons.alerting.util.IndexUtils.Companion._SEQ_NO import org.opensearch.commons.alerting.util.IndexUtils.Companion._VERSION import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.core.rest.RestStatus import java.io.IOException class GetWorkflowResponse : BaseResponse { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequest.kt index d61046bd..34e8d314 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequest.kt @@ -3,9 +3,9 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.support.WriteRequest +import org.opensearch.commons.alerting.model.Monitor import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.commons.alerting.model.Monitor import org.opensearch.rest.RestRequest import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponse.kt index c100ae84..0464bff8 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponse.kt @@ -1,13 +1,13 @@ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.util.IndexUtils.Companion._ID import org.opensearch.commons.alerting.util.IndexUtils.Companion._PRIMARY_TERM import org.opensearch.commons.alerting.util.IndexUtils.Companion._SEQ_NO import org.opensearch.commons.alerting.util.IndexUtils.Companion._VERSION import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt index af589cfc..bad2de2f 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt @@ -4,10 +4,10 @@ import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions import org.opensearch.action.support.WriteRequest -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.CompositeInput import org.opensearch.commons.alerting.model.Workflow +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.rest.RestRequest import java.io.IOException import java.util.stream.Collectors diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponse.kt index 10ca1cd5..b54d0d85 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponse.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.model.Workflow import org.opensearch.commons.alerting.util.IndexUtils import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequest.kt index 76686f21..6e8f78f1 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequest.kt @@ -2,9 +2,9 @@ package org.opensearch.commons.alerting.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException +import org.opensearch.commons.alerting.model.Finding import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.commons.alerting.model.Finding import java.io.IOException class PublishFindingsRequest : ActionRequest { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/SubscribeFindingsResponse.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/SubscribeFindingsResponse.kt index 26025608..58419d7c 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/SubscribeFindingsResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/SubscribeFindingsResponse.kt @@ -1,11 +1,11 @@ package org.opensearch.commons.alerting.action +import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.commons.notifications.action.BaseResponse +import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder -import org.opensearch.core.rest.RestStatus import java.io.IOException class SubscribeFindingsResponse : BaseResponse { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregationBuilder.kt b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregationBuilder.kt index 80bb91b9..75d1f3ae 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregationBuilder.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtAggregationBuilder.kt @@ -1,11 +1,11 @@ package org.opensearch.commons.alerting.aggregation.bucketselectorext -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.aggregation.bucketselectorext.BucketSelectorExtFilter.Companion.BUCKET_SELECTOR_COMPOSITE_AGG_FILTER import org.opensearch.commons.alerting.aggregation.bucketselectorext.BucketSelectorExtFilter.Companion.BUCKET_SELECTOR_FILTER import org.opensearch.core.ParseField import org.opensearch.core.common.ParsingException +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtFilter.kt b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtFilter.kt index 49b45ba0..55dac69d 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtFilter.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/aggregation/bucketselectorext/BucketSelectorExtFilter.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.aggregation.bucketselectorext +import org.opensearch.commons.notifications.model.BaseModel +import org.opensearch.core.ParseField import org.opensearch.core.common.ParsingException import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.commons.notifications.model.BaseModel -import org.opensearch.core.ParseField import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/alerting/alerts/AlertError.kt b/src/main/kotlin/org/opensearch/commons/alerting/alerts/AlertError.kt index c26f5c61..b53ff4a4 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/alerts/AlertError.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/alerts/AlertError.kt @@ -1,14 +1,14 @@ package org.opensearch.commons.alerting.alerts +import org.opensearch.commons.alerting.util.instant +import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken -import org.opensearch.commons.alerting.util.instant -import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import java.io.IOException import java.time.Instant diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ActionExecutionResult.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ActionExecutionResult.kt index ca4410e8..6d4614e8 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ActionExecutionResult.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ActionExecutionResult.kt @@ -1,15 +1,15 @@ package org.opensearch.commons.alerting.model +import org.opensearch.commons.alerting.util.instant +import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.alerting.util.instant -import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.time.Instant diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/AggregationResultBucket.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/AggregationResultBucket.kt index b2f2a80d..caee50f8 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/AggregationResultBucket.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/AggregationResultBucket.kt @@ -4,12 +4,12 @@ import org.opensearch.core.common.ParsingException import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser import org.opensearch.core.xcontent.XContentParser.Token +import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import java.io.IOException import java.util.Locale diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt index 6e0e4110..af9b0141 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Alert.kt @@ -1,19 +1,19 @@ package org.opensearch.commons.alerting.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable import org.opensearch.common.lucene.uid.Versions -import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import org.opensearch.commons.alerting.alerts.AlertError import org.opensearch.commons.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION import org.opensearch.commons.alerting.util.instant import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.commons.alerting.util.optionalUserField import org.opensearch.commons.authuser.User +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import java.io.IOException import java.time.Instant diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/BucketLevelTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/BucketLevelTrigger.kt index 835ebe30..11782318 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/BucketLevelTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/BucketLevelTrigger.kt @@ -2,8 +2,6 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.commons.alerting.aggregation.bucketselectorext.BucketSelectorExtAggregationBuilder import org.opensearch.commons.alerting.model.Trigger.Companion.ACTIONS_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.ID_FIELD @@ -11,6 +9,8 @@ import org.opensearch.commons.alerting.model.Trigger.Companion.NAME_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.SEVERITY_FIELD import org.opensearch.commons.alerting.model.action.Action import org.opensearch.core.ParseField +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedAlertTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedAlertTrigger.kt index 912d8a6e..c56ce856 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedAlertTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedAlertTrigger.kt @@ -2,19 +2,19 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.Trigger.Companion.ACTIONS_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.ID_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.NAME_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.SEVERITY_FIELD import org.opensearch.commons.alerting.model.action.Action import org.opensearch.core.ParseField +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.script.Script import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedMonitorFindings.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedMonitorFindings.kt index 52486bc6..dbc15e34 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedMonitorFindings.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ChainedMonitorFindings.kt @@ -1,13 +1,13 @@ package org.opensearch.commons.alerting.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.commons.utils.validateId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInput.kt index 11d9dc39..89be9f07 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ClusterMetricsInput.kt @@ -3,14 +3,14 @@ package org.opensearch.commons.alerting.model import org.apache.commons.validator.routines.UrlValidator import org.apache.hc.core5.net.URIBuilder import org.opensearch.common.CheckedFunction +import org.opensearch.core.ParseField import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.net.URI import java.net.URISyntaxException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/CompositeInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/CompositeInput.kt index b54812f3..7487232b 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/CompositeInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/CompositeInput.kt @@ -1,14 +1,14 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction +import org.opensearch.core.ParseField import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException data class CompositeInput( diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DataSources.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DataSources.kt index 43e0c0d1..b6beb6a1 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DataSources.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DataSources.kt @@ -3,11 +3,11 @@ package org.opensearch.commons.alerting.model import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException data class DataSources( diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Delegate.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Delegate.kt index ae311d9d..7b36ed88 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Delegate.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Delegate.kt @@ -1,13 +1,13 @@ package org.opensearch.commons.alerting.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.commons.utils.validateId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelMonitorInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelMonitorInput.kt index fa7aa6a0..44eeb65d 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelMonitorInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelMonitorInput.kt @@ -1,14 +1,14 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction +import org.opensearch.core.ParseField import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException data class DocLevelMonitorInput( diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt index 921a5b42..83dab26a 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DocLevelQuery.kt @@ -1,12 +1,12 @@ package org.opensearch.commons.alerting.model +import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.lang.IllegalArgumentException import java.util.UUID diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/DocumentLevelTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/DocumentLevelTrigger.kt index a5b7e88a..c06374cf 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/DocumentLevelTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/DocumentLevelTrigger.kt @@ -2,19 +2,19 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.Trigger.Companion.ACTIONS_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.ID_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.NAME_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.SEVERITY_FIELD import org.opensearch.commons.alerting.model.action.Action import org.opensearch.core.ParseField +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.script.Script import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt index a4a055cb..716fa0d3 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt @@ -1,13 +1,13 @@ package org.opensearch.commons.alerting.model +import org.opensearch.commons.alerting.util.instant import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken -import org.opensearch.commons.alerting.util.instant import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken import java.io.IOException import java.time.Instant diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/FindingDocument.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/FindingDocument.kt index 84302920..9e6d4b83 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/FindingDocument.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/FindingDocument.kt @@ -4,10 +4,10 @@ import org.apache.logging.log4j.LogManager import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException private val log = LogManager.getLogger(FindingDocument::class.java) diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/FindingWithDocs.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/FindingWithDocs.kt index a7c921cb..057e2214 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/FindingWithDocs.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/FindingWithDocs.kt @@ -4,10 +4,10 @@ import org.apache.logging.log4j.LogManager import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException private val log = LogManager.getLogger(Finding::class.java) diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Input.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Input.kt index e305cf61..b3472f8a 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Input.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Input.kt @@ -1,12 +1,12 @@ package org.opensearch.commons.alerting.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.ClusterMetricsInput.Companion.URI_FIELD import org.opensearch.commons.alerting.model.DocLevelMonitorInput.Companion.DOC_LEVEL_INPUT_FIELD import org.opensearch.commons.alerting.model.SearchInput.Companion.SEARCH_FIELD import org.opensearch.commons.notifications.model.BaseModel +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException interface Input : BaseModel { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Monitor.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Monitor.kt index c959373b..1af3ac37 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Monitor.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Monitor.kt @@ -1,9 +1,6 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.util.IndexUtils.Companion.MONITOR_MAX_INPUTS import org.opensearch.commons.alerting.util.IndexUtils.Companion.MONITOR_MAX_TRIGGERS import org.opensearch.commons.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION @@ -16,10 +13,13 @@ import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.commons.alerting.util.optionalUserField import org.opensearch.commons.authuser.User import org.opensearch.core.ParseField +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.time.Instant import java.util.Locale diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/NoOpTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/NoOpTrigger.kt index f832c4f2..f0d08cbb 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/NoOpTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/NoOpTrigger.kt @@ -2,15 +2,15 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.action.Action import org.opensearch.core.ParseField +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException data class NoOpTrigger( diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/QueryLevelTrigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/QueryLevelTrigger.kt index 36b355d0..d16b85db 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/QueryLevelTrigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/QueryLevelTrigger.kt @@ -2,19 +2,19 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction import org.opensearch.common.UUIDs -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.Trigger.Companion.ACTIONS_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.ID_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.NAME_FIELD import org.opensearch.commons.alerting.model.Trigger.Companion.SEVERITY_FIELD import org.opensearch.commons.alerting.model.action.Action import org.opensearch.core.ParseField +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.script.Script import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Schedule.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Schedule.kt index b20249ae..1f8d8b7f 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Schedule.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Schedule.kt @@ -4,13 +4,13 @@ import com.cronutils.model.CronType import com.cronutils.model.definition.CronDefinitionBuilder import com.cronutils.model.time.ExecutionTime import com.cronutils.parser.CronParser +import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.time.DateTimeException import java.time.Duration diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/ScheduledJob.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/ScheduledJob.kt index e93b5076..cf8417c2 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/ScheduledJob.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/ScheduledJob.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.model -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.time.Instant diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/SearchInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/SearchInput.kt index 75995b8d..0eb87c15 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/SearchInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/SearchInput.kt @@ -1,14 +1,14 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction +import org.opensearch.core.ParseField import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.core.ParseField import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.search.builder.SearchSourceBuilder import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Sequence.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Sequence.kt index ee8720d8..22d4683b 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Sequence.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Sequence.kt @@ -1,12 +1,12 @@ package org.opensearch.commons.alerting.model +import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** Delegate monitors passed as input for composite monitors. */ diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Trigger.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Trigger.kt index 5762adbc..1834f3b7 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Trigger.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Trigger.kt @@ -1,10 +1,10 @@ package org.opensearch.commons.alerting.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.action.Action import org.opensearch.commons.notifications.model.BaseModel +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException interface Trigger : BaseModel { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Workflow.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Workflow.kt index 32d1098e..2038edfb 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Workflow.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Workflow.kt @@ -1,9 +1,6 @@ package org.opensearch.commons.alerting.model import org.opensearch.common.CheckedFunction -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.util.IndexUtils.Companion.NO_SCHEMA_VERSION import org.opensearch.commons.alerting.util.IndexUtils.Companion.WORKFLOW_MAX_INPUTS import org.opensearch.commons.alerting.util.IndexUtils.Companion._ID @@ -13,10 +10,13 @@ import org.opensearch.commons.alerting.util.optionalTimeField import org.opensearch.commons.alerting.util.optionalUserField import org.opensearch.commons.authuser.User import org.opensearch.core.ParseField +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.time.Instant import java.util.Locale diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/WorkflowInput.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/WorkflowInput.kt index fcf7a94f..d9fd2129 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/WorkflowInput.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/WorkflowInput.kt @@ -1,9 +1,9 @@ package org.opensearch.commons.alerting.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.model.BaseModel +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException interface WorkflowInput : BaseModel { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/action/Action.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/action/Action.kt index 652dabcd..2d02385f 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/action/Action.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/action/Action.kt @@ -1,13 +1,13 @@ package org.opensearch.commons.alerting.model.action import org.opensearch.common.UUIDs +import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.script.Script import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionPolicy.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionPolicy.kt index 516dba09..024d9cb2 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionPolicy.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionPolicy.kt @@ -1,12 +1,12 @@ package org.opensearch.commons.alerting.model.action +import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException data class ActionExecutionPolicy( diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionScope.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionScope.kt index 4f849b81..6342c33e 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionScope.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/action/ActionExecutionScope.kt @@ -1,12 +1,12 @@ package org.opensearch.commons.alerting.model.action +import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException sealed class ActionExecutionScope : BaseModel { diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/action/Throttle.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/action/Throttle.kt index f0041d4a..79bdb6e3 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/action/Throttle.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/action/Throttle.kt @@ -1,13 +1,13 @@ package org.opensearch.commons.alerting.model.action import org.apache.commons.codec.binary.StringUtils +import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.model.BaseModel import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.time.temporal.ChronoUnit import java.util.Locale diff --git a/src/main/kotlin/org/opensearch/commons/alerting/util/IndexUtils.kt b/src/main/kotlin/org/opensearch/commons/alerting/util/IndexUtils.kt index 91c42e67..2dbda47b 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/util/IndexUtils.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/util/IndexUtils.kt @@ -1,12 +1,12 @@ package org.opensearch.commons.alerting.util -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.settings.SupportedClusterMetricsSettings import org.opensearch.commons.authuser.User import org.opensearch.core.common.bytes.BytesReference import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.time.Instant class IndexUtils { diff --git a/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt b/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt index a2c03468..59b25054 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/NotificationsPluginInterface.kt @@ -7,7 +7,6 @@ package org.opensearch.commons.notifications import org.opensearch.action.ActionListener import org.opensearch.action.ActionResponse import org.opensearch.client.node.NodeClient -import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT import org.opensearch.commons.notifications.action.BaseResponse import org.opensearch.commons.notifications.action.CreateNotificationConfigRequest @@ -38,6 +37,7 @@ import org.opensearch.commons.notifications.model.ChannelMessage import org.opensearch.commons.notifications.model.EventSource import org.opensearch.commons.utils.SecureClientWrapper import org.opensearch.commons.utils.recreateObject +import org.opensearch.core.common.io.stream.Writeable /** * All the transport action plugin interfaces for the Notification plugin diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/BaseResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/BaseResponse.kt index 5b2e4a6c..68837e9c 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/BaseResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/BaseResponse.kt @@ -7,8 +7,8 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionResponse import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.rest.RestStatus +import org.opensearch.core.xcontent.ToXContentObject import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigRequest.kt index d23ca33a..dea36ef0 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigRequest.kt @@ -6,20 +6,20 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TAG import org.opensearch.commons.notifications.model.NotificationConfig import org.opensearch.commons.utils.fieldIfNotNull import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateId +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigResponse.kt index cbd4eeb0..3e32a49b 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/CreateNotificationConfigResponse.kt @@ -4,15 +4,15 @@ */ package org.opensearch.commons.notifications.action +import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG +import org.opensearch.commons.utils.logger import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG -import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigRequest.kt index 8df55b49..6dd78923 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigRequest.kt @@ -7,17 +7,17 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_LIST_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.stringList +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponse.kt index 7e846410..2337355f 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/DeleteNotificationConfigResponse.kt @@ -4,20 +4,20 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.DELETE_RESPONSE_LIST_TAG import org.opensearch.commons.utils.STRING_READER import org.opensearch.commons.utils.STRING_WRITER import org.opensearch.commons.utils.enumReader import org.opensearch.commons.utils.enumWriter import org.opensearch.commons.utils.logger +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable +import org.opensearch.core.rest.RestStatus import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser -import org.opensearch.core.rest.RestStatus +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListRequest.kt index f7376331..c62f38a7 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListRequest.kt @@ -6,16 +6,16 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException +import org.opensearch.commons.notifications.NotificationConstants.COMPACT_TAG +import org.opensearch.commons.utils.logger import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.NotificationConstants.COMPACT_TAG -import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListResponse.kt index 35e1e3cc..57a94a4e 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetChannelListResponse.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.action +import org.opensearch.commons.notifications.model.ChannelList import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.commons.notifications.model.ChannelList import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt index ee0c1328..34485a3c 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigRequest.kt @@ -7,10 +7,6 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_LIST_TAG import org.opensearch.commons.notifications.NotificationConstants.DEFAULT_MAX_ITEMS import org.opensearch.commons.notifications.NotificationConstants.FILTER_PARAM_LIST_TAG @@ -24,10 +20,14 @@ import org.opensearch.commons.utils.enumReader import org.opensearch.commons.utils.fieldIfNotNull import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.stringList +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.search.sort.SortOrder import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigResponse.kt index a7203cf7..6723c015 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetNotificationConfigResponse.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.action +import org.opensearch.commons.notifications.model.NotificationConfigSearchResult import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.commons.notifications.model.NotificationConfigSearchResult import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesRequest.kt index bd861178..0eb0d14d 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesRequest.kt @@ -6,16 +6,16 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException +import org.opensearch.commons.notifications.NotificationConstants.COMPACT_TAG +import org.opensearch.commons.utils.logger import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.NotificationConstants.COMPACT_TAG -import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt index fa10185e..41a80875 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/GetPluginFeaturesResponse.kt @@ -4,19 +4,19 @@ */ package org.opensearch.commons.notifications.action -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.ALLOWED_CONFIG_TYPE_LIST_TAG import org.opensearch.commons.notifications.NotificationConstants.PLUGIN_FEATURES_TAG import org.opensearch.commons.utils.STRING_READER import org.opensearch.commons.utils.STRING_WRITER import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.stringList +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationRequest.kt index e8b26530..7d8cf391 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationRequest.kt @@ -7,9 +7,6 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable import org.opensearch.commons.destination.message.LegacyBaseMessage import org.opensearch.commons.destination.message.LegacyChimeMessage import org.opensearch.commons.destination.message.LegacyCustomWebhookMessage @@ -17,6 +14,9 @@ import org.opensearch.commons.destination.message.LegacyDestinationType import org.opensearch.commons.destination.message.LegacyEmailMessage import org.opensearch.commons.destination.message.LegacySNSMessage import org.opensearch.commons.destination.message.LegacySlackMessage +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationResponse.kt index 14b8096a..c6084358 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/LegacyPublishNotificationResponse.kt @@ -5,10 +5,10 @@ package org.opensearch.commons.notifications.action +import org.opensearch.commons.destination.response.LegacyDestinationResponse import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.commons.destination.response.LegacyDestinationResponse import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import java.io.IOException diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt index d23ae9c2..060ae545 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationRequest.kt @@ -7,10 +7,6 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CHANNEL_ID_LIST_TAG import org.opensearch.commons.notifications.NotificationConstants.CHANNEL_MESSAGE_TAG import org.opensearch.commons.notifications.NotificationConstants.EVENT_SOURCE_TAG @@ -20,10 +16,14 @@ import org.opensearch.commons.notifications.model.EventSource import org.opensearch.commons.utils.fieldIfNotNull import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.stringList +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationResponse.kt index 142a38ad..e3642e1b 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/SendNotificationResponse.kt @@ -4,10 +4,10 @@ */ package org.opensearch.commons.notifications.action +import org.opensearch.commons.notifications.model.NotificationEvent import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.commons.notifications.model.NotificationEvent import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigRequest.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigRequest.kt index 5fea0cde..d28060aa 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigRequest.kt @@ -7,19 +7,19 @@ package org.opensearch.commons.notifications.action import org.opensearch.action.ActionRequest import org.opensearch.action.ActionRequestValidationException import org.opensearch.action.ValidateActions -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TAG import org.opensearch.commons.notifications.model.NotificationConfig import org.opensearch.commons.utils.logger import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigResponse.kt b/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigResponse.kt index 9c83d845..42e71a13 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigResponse.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/action/UpdateNotificationConfigResponse.kt @@ -4,15 +4,15 @@ */ package org.opensearch.commons.notifications.action +import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG +import org.opensearch.commons.utils.logger import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils -import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG -import org.opensearch.commons.utils.logger import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt index e7e8e4f9..ff650a20 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Attachment.kt @@ -5,19 +5,19 @@ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.FILE_CONTENT_TYPE_TAG import org.opensearch.commons.notifications.NotificationConstants.FILE_DATA_TAG import org.opensearch.commons.notifications.NotificationConstants.FILE_ENCODING_TAG import org.opensearch.commons.notifications.NotificationConstants.FILE_NAME_TAG import org.opensearch.commons.utils.fieldIfNotNull import org.opensearch.commons.utils.logger +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils /** * Data class for storing attachment of channel message. diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Channel.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Channel.kt index 857dd529..68f42b27 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Channel.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Channel.kt @@ -4,10 +4,6 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TYPE_TAG import org.opensearch.commons.notifications.NotificationConstants.DESCRIPTION_TAG @@ -15,9 +11,13 @@ import org.opensearch.commons.notifications.NotificationConstants.IS_ENABLED_TAG import org.opensearch.commons.notifications.NotificationConstants.NAME_TAG import org.opensearch.commons.utils.logger import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelList.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelList.kt index 92833602..b92b8425 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelList.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelList.kt @@ -7,8 +7,8 @@ package org.opensearch.commons.notifications.model import org.apache.lucene.search.TotalHits import org.opensearch.action.search.SearchResponse -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.notifications.NotificationConstants.CHANNEL_LIST_TAG +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.XContentParser /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt index e98fa467..3fb16981 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/ChannelMessage.kt @@ -5,19 +5,19 @@ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.ATTACHMENT_TAG import org.opensearch.commons.notifications.NotificationConstants.HTML_DESCRIPTION_TAG import org.opensearch.commons.notifications.NotificationConstants.TEXT_DESCRIPTION_TAG import org.opensearch.commons.utils.fieldIfNotNull import org.opensearch.commons.utils.logger import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Chime.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Chime.kt index e515a848..ee1c5aa8 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Chime.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Chime.kt @@ -4,17 +4,17 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.URL_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateUrl import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt index 8b7be64d..2e25cc70 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/DeliveryStatus.kt @@ -4,17 +4,17 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.STATUS_CODE_TAG import org.opensearch.commons.notifications.NotificationConstants.STATUS_TEXT_TAG import org.opensearch.commons.utils.logger import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Email.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Email.kt index c2fbf3fa..a67619b0 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Email.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Email.kt @@ -4,10 +4,6 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.EMAIL_ACCOUNT_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.EMAIL_GROUP_ID_LIST_TAG import org.opensearch.commons.notifications.NotificationConstants.RECIPIENT_LIST_TAG @@ -15,9 +11,13 @@ import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.objectList import org.opensearch.commons.utils.stringList import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailGroup.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailGroup.kt index 400760f9..c5377530 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailGroup.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailGroup.kt @@ -4,16 +4,16 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.RECIPIENT_LIST_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.objectList +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipient.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipient.kt index d41d3b28..c601e840 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipient.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipient.kt @@ -4,16 +4,16 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.RECIPIENT_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateEmail +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipientStatus.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipientStatus.kt index cd7561c9..d1d78165 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipientStatus.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EmailRecipientStatus.kt @@ -5,17 +5,17 @@ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.DELIVERY_STATUS_TAG import org.opensearch.commons.notifications.NotificationConstants.RECIPIENT_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateEmail +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt index 33c41129..91deb445 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EventSource.kt @@ -4,10 +4,6 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.REFERENCE_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.SEVERITY_TAG import org.opensearch.commons.notifications.NotificationConstants.TAGS_TAG @@ -15,9 +11,13 @@ import org.opensearch.commons.notifications.NotificationConstants.TITLE_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.stringList import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt index 81e34bb5..afb023ce 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/EventStatus.kt @@ -5,10 +5,6 @@ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_NAME_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TYPE_TAG @@ -18,9 +14,13 @@ import org.opensearch.commons.utils.fieldIfNotNull import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.objectList import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt index 8579435d..5b0b8a90 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfig.kt @@ -4,10 +4,6 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TYPE_TAG import org.opensearch.commons.notifications.NotificationConstants.DESCRIPTION_TAG import org.opensearch.commons.notifications.NotificationConstants.IS_ENABLED_TAG @@ -18,9 +14,13 @@ import org.opensearch.commons.notifications.model.config.ConfigDataProperties.va import org.opensearch.commons.utils.fieldIfNotNull import org.opensearch.commons.utils.logger import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt index 7b16ecde..34b6285b 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigInfo.kt @@ -5,19 +5,19 @@ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.CONFIG_ID_TAG import org.opensearch.commons.notifications.NotificationConstants.CONFIG_TAG import org.opensearch.commons.notifications.NotificationConstants.CREATED_TIME_TAG import org.opensearch.commons.notifications.NotificationConstants.UPDATED_TIME_TAG import org.opensearch.commons.utils.logger import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.time.Instant diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigSearchResult.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigSearchResult.kt index 29f28ab1..7a44836e 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigSearchResult.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationConfigSearchResult.kt @@ -7,8 +7,8 @@ package org.opensearch.commons.notifications.model import org.apache.lucene.search.TotalHits import org.opensearch.action.search.SearchResponse -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.notifications.NotificationConstants.CONFIG_LIST_TAG +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.XContentParser /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt index 200505a9..87f637b0 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/NotificationEvent.kt @@ -4,20 +4,20 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable import org.opensearch.common.xcontent.XContentHelper -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType import org.opensearch.commons.notifications.NotificationConstants.EVENT_SOURCE_TAG import org.opensearch.commons.notifications.NotificationConstants.STATUS_LIST_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.objectList +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContent.EMPTY_PARAMS import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/SearchResults.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/SearchResults.kt index 42511c6f..f6b3a295 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/SearchResults.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/SearchResults.kt @@ -9,17 +9,17 @@ import org.apache.lucene.search.TotalHits.Relation import org.apache.lucene.search.TotalHits.Relation.EQUAL_TO import org.apache.lucene.search.TotalHits.Relation.GREATER_THAN_OR_EQUAL_TO import org.opensearch.action.search.SearchResponse -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.START_INDEX_TAG import org.opensearch.commons.notifications.NotificationConstants.TOTAL_HITS_TAG import org.opensearch.commons.notifications.NotificationConstants.TOTAL_HIT_RELATION_TAG import org.opensearch.commons.utils.logger +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent.Params import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.search.SearchHit abstract class SearchResults : BaseModel { diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt index 83b92e3e..13370ed9 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/SesAccount.kt @@ -5,10 +5,6 @@ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.FROM_ADDRESS_TAG import org.opensearch.commons.notifications.NotificationConstants.REGION_TAG import org.opensearch.commons.notifications.NotificationConstants.ROLE_ARN_TAG @@ -17,9 +13,13 @@ import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateEmail import org.opensearch.commons.utils.validateIamRoleArn import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Slack.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Slack.kt index 103baeaa..b4433b95 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Slack.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Slack.kt @@ -4,17 +4,17 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.URL_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateUrl import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt index 1f3d996e..ca3a762a 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/SmtpAccount.kt @@ -4,10 +4,6 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.FROM_ADDRESS_TAG import org.opensearch.commons.notifications.NotificationConstants.HOST_TAG import org.opensearch.commons.notifications.NotificationConstants.METHOD_TAG @@ -15,9 +11,13 @@ import org.opensearch.commons.notifications.NotificationConstants.PORT_TAG import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateEmail import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Sns.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Sns.kt index e1d66c86..d0809f9f 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Sns.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Sns.kt @@ -5,18 +5,18 @@ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.ROLE_ARN_TAG import org.opensearch.commons.notifications.NotificationConstants.TOPIC_ARN_TAG import org.opensearch.commons.utils.fieldIfNotNull import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateIamRoleArn +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException import java.util.regex.Pattern diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/Webhook.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/Webhook.kt index b1cdc883..e48f29f4 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/Webhook.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/Webhook.kt @@ -4,10 +4,6 @@ */ package org.opensearch.commons.notifications.model -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.common.io.stream.StreamOutput -import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.commons.notifications.NotificationConstants.HEADER_PARAMS_TAG import org.opensearch.commons.notifications.NotificationConstants.METHOD_TAG import org.opensearch.commons.notifications.NotificationConstants.URL_TAG @@ -16,9 +12,13 @@ import org.opensearch.commons.utils.STRING_WRITER import org.opensearch.commons.utils.logger import org.opensearch.commons.utils.validateUrl import org.opensearch.core.common.Strings +import org.opensearch.core.common.io.stream.StreamInput +import org.opensearch.core.common.io.stream.StreamOutput +import org.opensearch.core.common.io.stream.Writeable import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.io.IOException /** diff --git a/src/main/kotlin/org/opensearch/commons/notifications/model/config/ConfigDataProperties.kt b/src/main/kotlin/org/opensearch/commons/notifications/model/config/ConfigDataProperties.kt index 1019b345..4d70b18f 100644 --- a/src/main/kotlin/org/opensearch/commons/notifications/model/config/ConfigDataProperties.kt +++ b/src/main/kotlin/org/opensearch/commons/notifications/model/config/ConfigDataProperties.kt @@ -4,7 +4,6 @@ */ package org.opensearch.commons.notifications.model.config -import org.opensearch.core.common.io.stream.Writeable.Reader import org.opensearch.commons.notifications.model.BaseConfigData import org.opensearch.commons.notifications.model.Chime import org.opensearch.commons.notifications.model.ConfigType @@ -16,6 +15,7 @@ import org.opensearch.commons.notifications.model.SmtpAccount import org.opensearch.commons.notifications.model.Sns import org.opensearch.commons.notifications.model.Webhook import org.opensearch.commons.notifications.model.XParser +import org.opensearch.core.common.io.stream.Writeable.Reader import org.opensearch.core.xcontent.XContentParser internal object ConfigDataProperties { diff --git a/src/main/kotlin/org/opensearch/commons/utils/EnumHelpers.kt b/src/main/kotlin/org/opensearch/commons/utils/EnumHelpers.kt index 6d5b9e49..6ffcdaed 100644 --- a/src/main/kotlin/org/opensearch/commons/utils/EnumHelpers.kt +++ b/src/main/kotlin/org/opensearch/commons/utils/EnumHelpers.kt @@ -6,8 +6,8 @@ package org.opensearch.commons.utils import org.opensearch.core.common.io.stream.StreamOutput import org.opensearch.core.common.io.stream.Writeable -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import java.util.EnumSet inline fun > XContentParser.enumSet(enumParser: EnumParser): EnumSet { diff --git a/src/main/kotlin/org/opensearch/commons/utils/XContentHelpers.kt b/src/main/kotlin/org/opensearch/commons/utils/XContentHelpers.kt index 50317fd9..e2fe0ddf 100644 --- a/src/main/kotlin/org/opensearch/commons/utils/XContentHelpers.kt +++ b/src/main/kotlin/org/opensearch/commons/utils/XContentHelpers.kt @@ -5,15 +5,15 @@ package org.opensearch.commons.utils -import org.opensearch.core.common.io.stream.StreamInput -import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.common.xcontent.XContentType +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.DeprecationHandler import org.opensearch.core.xcontent.NamedXContentRegistry import org.opensearch.core.xcontent.ToXContent import org.opensearch.core.xcontent.ToXContentObject import org.opensearch.core.xcontent.XContentBuilder import org.opensearch.core.xcontent.XContentParser +import org.opensearch.core.xcontent.XContentParserUtils import org.opensearch.rest.RestRequest fun StreamInput.createJsonParser(): XContentParser { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt index 616855c8..ca07168d 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/AlertingPluginInterfaceTests.kt @@ -12,7 +12,6 @@ import org.mockito.junit.jupiter.MockitoExtension import org.opensearch.action.ActionListener import org.opensearch.action.ActionType import org.opensearch.client.node.NodeClient -import org.opensearch.core.common.io.stream.NamedWriteableRegistry import org.opensearch.common.settings.Settings import org.opensearch.commons.alerting.action.AcknowledgeAlertRequest import org.opensearch.commons.alerting.action.AcknowledgeAlertResponse @@ -39,8 +38,9 @@ import org.opensearch.commons.alerting.model.FindingDocument import org.opensearch.commons.alerting.model.FindingWithDocs import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.model.Workflow -import org.opensearch.index.seqno.SequenceNumbers +import org.opensearch.core.common.io.stream.NamedWriteableRegistry import org.opensearch.core.rest.RestStatus +import org.opensearch.index.seqno.SequenceNumbers import org.opensearch.search.SearchModule @Suppress("UNCHECKED_CAST") diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponseTests.kt index 86e41c1c..5733c550 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/AcknowledgeAlertResponseTests.kt @@ -4,11 +4,11 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.alerts.AlertError import org.opensearch.commons.alerting.model.ActionExecutionResult import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.alerting.randomUser +import org.opensearch.core.common.io.stream.StreamInput import java.time.Instant class AcknowledgeAlertResponseTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequestTests.kt index 3cd32be7..bf301f74 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsRequestTests.kt @@ -6,8 +6,8 @@ import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.Table +import org.opensearch.core.common.io.stream.StreamInput internal class GetAlertsRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponseTests.kt index 270cccea..6a1cb877 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetAlertsResponseTests.kt @@ -5,11 +5,11 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.builder import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.alerting.randomUser import org.opensearch.commons.alerting.util.string +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.ToXContent import java.time.Instant import java.util.Collections diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt index 71c1fc41..253f4708 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsRequestTests.kt @@ -6,8 +6,8 @@ import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.Table +import org.opensearch.core.common.io.stream.StreamInput internal class GetFindingsRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponseTests.kt index 81bae90d..8d40492a 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetFindingsResponseTests.kt @@ -3,11 +3,11 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.DocLevelQuery import org.opensearch.commons.alerting.model.Finding import org.opensearch.commons.alerting.model.FindingDocument import org.opensearch.commons.alerting.model.FindingWithDocs +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.rest.RestStatus import java.time.Instant diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequestTests.kt index 1c1490ff..1cf50eec 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsRequestTests.kt @@ -6,8 +6,8 @@ import org.junit.jupiter.api.Assertions.assertNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.Table +import org.opensearch.core.common.io.stream.StreamInput internal class GetWorkflowAlertsRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponseTests.kt index 17e9f019..947fead8 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowAlertsResponseTests.kt @@ -5,13 +5,13 @@ import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.builder import org.opensearch.commons.alerting.model.Alert import org.opensearch.commons.alerting.randomAlert import org.opensearch.commons.alerting.randomChainedAlert import org.opensearch.commons.alerting.randomUser import org.opensearch.commons.alerting.util.string +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.xcontent.ToXContent import java.time.Instant import java.util.Collections diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponseTests.kt index 95017489..8e78b61f 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/GetWorkflowResponseTests.kt @@ -3,13 +3,13 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.CompositeInput import org.opensearch.commons.alerting.model.IntervalSchedule import org.opensearch.commons.alerting.model.Workflow import org.opensearch.commons.alerting.randomDelegate import org.opensearch.commons.alerting.randomUser import org.opensearch.commons.alerting.randomWorkflow +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.core.rest.RestStatus import java.time.Instant import java.time.temporal.ChronoUnit diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequestTests.kt index c34677fb..20381c9b 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorRequestTests.kt @@ -4,14 +4,14 @@ import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput -import org.opensearch.core.common.io.stream.NamedWriteableRegistry -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.common.settings.Settings import org.opensearch.commons.alerting.model.SearchInput import org.opensearch.commons.alerting.randomBucketLevelMonitor import org.opensearch.commons.alerting.randomQueryLevelMonitor import org.opensearch.commons.utils.recreateObject +import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput +import org.opensearch.core.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.rest.RestRequest import org.opensearch.search.SearchModule import org.opensearch.search.builder.SearchSourceBuilder diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponseTests.kt index 7982e104..2b5ee04d 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexMonitorResponseTests.kt @@ -3,10 +3,10 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.CronSchedule import org.opensearch.commons.alerting.model.Monitor import org.opensearch.commons.alerting.randomUser +import org.opensearch.core.common.io.stream.StreamInput import java.time.Instant import java.time.ZoneId diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequestTests.kt index 43555451..8ff08738 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequestTests.kt @@ -5,9 +5,6 @@ import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.action.support.WriteRequest import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput -import org.opensearch.core.common.io.stream.NamedWriteableRegistry -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.common.settings.Settings import org.opensearch.commons.alerting.model.ChainedMonitorFindings import org.opensearch.commons.alerting.model.CompositeInput @@ -16,6 +13,9 @@ import org.opensearch.commons.alerting.model.Sequence import org.opensearch.commons.alerting.randomWorkflow import org.opensearch.commons.alerting.randomWorkflowWithDelegates import org.opensearch.commons.utils.recreateObject +import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput +import org.opensearch.core.common.io.stream.NamedWriteableRegistry +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.rest.RestRequest import org.opensearch.search.SearchModule import java.lang.Exception diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponseTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponseTests.kt index 8d5e0857..6594010e 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponseTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowResponseTests.kt @@ -3,12 +3,12 @@ package org.opensearch.commons.alerting.action import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.ChainedAlertTrigger import org.opensearch.commons.alerting.model.CronSchedule import org.opensearch.commons.alerting.model.Workflow import org.opensearch.commons.alerting.randomChainedAlertTrigger import org.opensearch.commons.alerting.randomUser +import org.opensearch.core.common.io.stream.StreamInput import java.time.Instant import java.time.ZoneId diff --git a/src/test/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequestTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequestTests.kt index 94f89116..d29ef7c6 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequestTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/action/PublishFindingsRequestTests.kt @@ -4,8 +4,8 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.randomFinding +import org.opensearch.core.common.io.stream.StreamInput class PublishFindingsRequestTests { diff --git a/src/test/kotlin/org/opensearch/commons/alerting/model/WriteableTests.kt b/src/test/kotlin/org/opensearch/commons/alerting/model/WriteableTests.kt index 40b70c92..9454aa48 100644 --- a/src/test/kotlin/org/opensearch/commons/alerting/model/WriteableTests.kt +++ b/src/test/kotlin/org/opensearch/commons/alerting/model/WriteableTests.kt @@ -3,7 +3,6 @@ package org.opensearch.commons.alerting.model import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import org.opensearch.common.io.stream.BytesStreamOutput -import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.commons.alerting.model.action.Action import org.opensearch.commons.alerting.model.action.ActionExecutionPolicy import org.opensearch.commons.alerting.model.action.Throttle @@ -19,6 +18,7 @@ import org.opensearch.commons.alerting.randomUser import org.opensearch.commons.alerting.randomUserEmpty import org.opensearch.commons.alerting.randomWorkflow import org.opensearch.commons.authuser.User +import org.opensearch.core.common.io.stream.StreamInput import org.opensearch.search.builder.SearchSourceBuilder class WriteableTests { From 9751fa9e57f49a830b0f8d1787095d19d43617a6 Mon Sep 17 00:00:00 2001 From: bowenlan-amzn Date: Thu, 13 Jul 2023 13:01:56 +0800 Subject: [PATCH 3/3] Fix spotless java check Signed-off-by: bowenlan-amzn --- src/main/java/org/opensearch/commons/authuser/User.java | 6 +++--- .../commons/destination/message/LegacyBaseMessage.java | 2 +- .../commons/destination/message/LegacyChimeMessage.java | 2 +- .../destination/message/LegacyCustomWebhookMessage.java | 2 +- .../commons/destination/message/LegacyEmailMessage.java | 4 ++-- .../commons/destination/message/LegacySNSMessage.java | 4 ++-- .../commons/destination/message/LegacySlackMessage.java | 2 +- .../commons/alerting/action/IndexWorkflowRequest.kt | 8 ++++---- .../org/opensearch/commons/alerting/model/Finding.kt | 2 +- .../java/org/opensearch/commons/authuser/UserTest.java | 2 +- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/main/java/org/opensearch/commons/authuser/User.java b/src/main/java/org/opensearch/commons/authuser/User.java index 43f0ba57..79242559 100644 --- a/src/main/java/org/opensearch/commons/authuser/User.java +++ b/src/main/java/org/opensearch/commons/authuser/User.java @@ -19,12 +19,12 @@ import org.opensearch.client.Response; import org.opensearch.common.Nullable; import org.opensearch.common.inject.internal.ToStringBuilder; -import org.opensearch.core.common.io.stream.StreamInput; -import org.opensearch.core.common.io.stream.StreamOutput; -import org.opensearch.core.common.io.stream.Writeable; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.json.JsonXContent; import org.opensearch.core.common.Strings; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.core.xcontent.XContentParser; diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java index 164531f0..ab274c54 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyBaseMessage.java @@ -11,10 +11,10 @@ import java.util.Map; import org.apache.hc.core5.net.URIBuilder; +import org.opensearch.core.common.Strings; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.common.io.stream.Writeable; -import org.opensearch.core.common.Strings; /** * This class holds the generic parameters required for a diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java index 32fad6d1..cbdadb65 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyChimeMessage.java @@ -7,8 +7,8 @@ import java.io.IOException; -import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.Strings; +import org.opensearch.core.common.io.stream.StreamInput; /** * This class holds the contents of an Chime message diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java index f9fd9a07..874a583a 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyCustomWebhookMessage.java @@ -12,9 +12,9 @@ import org.apache.hc.client5.http.classic.methods.HttpPatch; import org.apache.hc.client5.http.classic.methods.HttpPost; import org.apache.hc.client5.http.classic.methods.HttpPut; +import org.opensearch.core.common.Strings; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.io.stream.StreamOutput; -import org.opensearch.core.common.Strings; /** * This class holds the content of an CustomWebhook message diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java index c37c6d77..b0fbc7ec 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacyEmailMessage.java @@ -9,10 +9,10 @@ import java.net.URI; import java.util.List; -import org.opensearch.core.common.io.stream.StreamInput; -import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.commons.notifications.model.MethodType; import org.opensearch.core.common.Strings; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; /** * This class holds the content of an CustomWebhook message diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java index 7f4c598f..8fc7a554 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacySNSMessage.java @@ -7,10 +7,10 @@ import java.io.IOException; -import org.opensearch.core.common.io.stream.StreamInput; -import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.commons.destination.util.Util; import org.opensearch.core.common.Strings; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; /** * This class holds the content of an SNS message diff --git a/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java b/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java index 27b8849f..48cc842a 100644 --- a/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java +++ b/src/main/java/org/opensearch/commons/destination/message/LegacySlackMessage.java @@ -7,8 +7,8 @@ import java.io.IOException; -import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.Strings; +import org.opensearch.core.common.io.stream.StreamInput; /** * This class holds the content of an Slack message diff --git a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt index bad2de2f..dc2b0936 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/action/IndexWorkflowRequest.kt @@ -105,17 +105,17 @@ class IndexWorkflowRequest : ActionRequest { val monitorIdOrderMap: Map = delegates.associate { it.monitorId to it.order } delegates.forEach { if (it.chainedMonitorFindings != null) { - if (monitorIdOrderMap.containsKey(it.chainedMonitorFindings!!.monitorId) == false) { + if (monitorIdOrderMap.containsKey(it.chainedMonitorFindings.monitorId) == false) { validationException = ValidateActions.addValidationError( - "Chained Findings Monitor ${it.chainedMonitorFindings!!.monitorId} doesn't exist in sequence", + "Chained Findings Monitor ${it.chainedMonitorFindings.monitorId} doesn't exist in sequence", validationException ) // Break the flow because next check will generate the NPE return validationException } - if (it.order <= monitorIdOrderMap[it.chainedMonitorFindings!!.monitorId]!!) { + if (it.order <= monitorIdOrderMap[it.chainedMonitorFindings.monitorId]!!) { validationException = ValidateActions.addValidationError( - "Chained Findings Monitor ${it.chainedMonitorFindings!!.monitorId} should be executed before monitor ${it.monitorId}", + "Chained Findings Monitor ${it.chainedMonitorFindings.monitorId} should be executed before monitor ${it.monitorId}", validationException ) } diff --git a/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt b/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt index 716fa0d3..673fad96 100644 --- a/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt +++ b/src/main/kotlin/org/opensearch/commons/alerting/model/Finding.kt @@ -116,7 +116,7 @@ class Finding( const val EXECUTION_ID_FIELD = "execution_id" const val NO_ID = "" - @JvmStatic @JvmOverloads + @JvmStatic @Throws(IOException::class) fun parse(xcp: XContentParser): Finding { var id: String = NO_ID diff --git a/src/test/java/org/opensearch/commons/authuser/UserTest.java b/src/test/java/org/opensearch/commons/authuser/UserTest.java index 6600e339..56152477 100644 --- a/src/test/java/org/opensearch/commons/authuser/UserTest.java +++ b/src/test/java/org/opensearch/commons/authuser/UserTest.java @@ -16,10 +16,10 @@ import org.junit.jupiter.api.Test; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.core.common.Strings; +import org.opensearch.core.common.io.stream.StreamInput; public class UserTest {