diff --git a/server/src/main/java/org/opensearch/search/ResourceType.java b/server/src/main/java/org/opensearch/search/ResourceType.java index 957b5d014bbbb..e1e0d91223573 100644 --- a/server/src/main/java/org/opensearch/search/ResourceType.java +++ b/server/src/main/java/org/opensearch/search/ResourceType.java @@ -42,9 +42,11 @@ public static ResourceType fromName(String s) { } throw new IllegalArgumentException("Unknown resource type: [" + s + "]"); } + public static void writeTo(StreamOutput out, ResourceType resourceType) throws IOException { out.writeString(resourceType.getName()); } + public String getName() { return name; }