Refactor pretty printing
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / server / api / DataPostResult.java
index a78f842053259ecea304e22beb27ef2cb0a9f0c6..349c5b20a451527c191fab6ae2c81a2c2204451c 100644 (file)
@@ -17,7 +17,7 @@ import org.eclipse.jdt.annotation.Nullable;
  * Result of a {@code POST} request as defined in
  * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-4.4">RFC8040 section 4.4</a>.
  */
-public sealed interface DataPostResult {
+public sealed interface DataPostResult permits DataPostResult.CreateResource, InvokeResult {
     /**
      * Result of a {@code POST} request in as defined in
      * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-4.4.1">RFC8040 Create Resource Mode</a>.
@@ -39,14 +39,4 @@ public sealed interface DataPostResult {
             this(createdPath, null, null);
         }
     }
-
-    /**
-     * Result of a {@code POST} request as defined in
-     * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-4.4.2">RFC8040 Invoke Operation Mode</a>.
-     *
-     * @param output Non-empty operation output, or {@code null}
-     */
-    record InvokeOperation(@Nullable OperationOutputBody output) implements DataPostResult {
-        public static final @NonNull InvokeOperation EMPTY = new InvokeOperation(null);
-    }
 }