-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
Signed-off-by: Subhobrata Dey <[email protected]> (cherry picked from commit 0dd9787)
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
package org.opensearch.securityanalytics.threatIntel.action; | ||
|
||
import org.opensearch.core.action.ActionResponse; | ||
import org.opensearch.core.common.io.stream.StreamInput; | ||
import org.opensearch.core.common.io.stream.StreamOutput; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
public class ThreatIntelIndicesResponse extends ActionResponse { | ||
|
||
private Boolean isAcknowledged; | ||
|
||
private List<String> indices; | ||
|
||
public ThreatIntelIndicesResponse(Boolean isAcknowledged, List<String> indices) { | ||
super(); | ||
this.isAcknowledged = isAcknowledged; | ||
this.indices = indices; | ||
} | ||
Check warning on line 24 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L21-L24
|
||
|
||
public ThreatIntelIndicesResponse(StreamInput sin) throws IOException { | ||
this(sin.readBoolean(), sin.readStringList()); | ||
} | ||
Check warning on line 28 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L27-L28
|
||
|
||
@Override | ||
public void writeTo(StreamOutput out) throws IOException { | ||
out.writeBoolean(isAcknowledged); | ||
out.writeStringCollection(indices); | ||
} | ||
Check warning on line 34 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L32-L34
|
||
|
||
public Boolean isAcknowledged() { | ||
return isAcknowledged; | ||
Check warning on line 37 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L37
|
||
} | ||
|
||
public List<String> getIndices() { | ||
return indices; | ||
Check warning on line 41 in src/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java Codecov / codecov/patchsrc/main/java/org/opensearch/securityanalytics/threatIntel/action/ThreatIntelIndicesResponse.java#L41
|
||
} | ||
} |