diff --git a/sample-extension-plugin/src/main/java/org/opensearch/security/sampleextension/actions/get/GetSampleResourceRequest.java b/sample-extension-plugin/src/main/java/org/opensearch/security/sampleextension/actions/get/GetSampleResourceRequest.java deleted file mode 100644 index 3dbc2e861d..0000000000 --- a/sample-extension-plugin/src/main/java/org/opensearch/security/sampleextension/actions/get/GetSampleResourceRequest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package org.opensearch.security.sampleextension.actions.get; - -import java.io.IOException; - -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; - -/** - * Request object for GetSampleResource transport action - */ -public class GetSampleResourceRequest extends ActionRequest { - - private String resourceId; - - public GetSampleResourceRequest(String resourceId) { - this.resourceId = resourceId; - } - - public String getResourceId() { - return resourceId; - } - - /** - * Constructor with stream input - * @param in the stream input - * @throws IOException IOException - */ - public GetSampleResourceRequest(final StreamInput in) throws IOException {} - - @Override - public void writeTo(final StreamOutput out) throws IOException {} - - @Override - public ActionRequestValidationException validate() { - return null; - } -} diff --git a/sample-extension-plugin/src/main/java/org/opensearch/security/sampleextension/actions/get/GetSampleResourceResponse.java b/sample-extension-plugin/src/main/java/org/opensearch/security/sampleextension/actions/get/GetSampleResourceResponse.java deleted file mode 100644 index 77e926d916..0000000000 --- a/sample-extension-plugin/src/main/java/org/opensearch/security/sampleextension/actions/get/GetSampleResourceResponse.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - */ - -package org.opensearch.security.sampleextension.actions.get; - -import java.io.IOException; - -import org.opensearch.core.action.ActionResponse; -import org.opensearch.core.common.io.stream.StreamInput; -import org.opensearch.core.common.io.stream.StreamOutput; -import org.opensearch.core.xcontent.ToXContentObject; -import org.opensearch.core.xcontent.XContentBuilder; -import org.opensearch.security.sampleextension.resource.SampleResource; - -/** - * Response to a ListSampleResourceRequest - */ -public class GetSampleResourceResponse extends ActionResponse implements ToXContentObject { - private final SampleResource resource; - - /** - * Default constructor - * - * @param resource The resource - */ - public GetSampleResourceResponse(SampleResource resource) { - this.resource = resource; - } - - @Override - public void writeTo(StreamOutput out) throws IOException { - resource.writeTo(out); - } - - /** - * Constructor with StreamInput - * - * @param in the stream input - */ - public GetSampleResourceResponse(final StreamInput in) throws IOException { - resource = SampleResource.from(in); - } - - @Override - public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { - builder.startObject(); - builder.field("resource", resource); - builder.endObject(); - return builder; - } -}