2 * Copyright (c) 2023 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.restconf.server.api;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.eclipse.jdt.annotation.Nullable;
14 import org.opendaylight.restconf.server.api.DatabindPath.OperationPath;
15 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
18 * RESTCONF {@code /operations} content for a {@code POST} operation as per
19 * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-3.6">RFC8040 Operation Resource</a> and
20 * <a href="https://www.rfc-editor.org/rfc/rfc8040#section-4.4.2">RFC8040 Invoke Operation Mode</a>.
22 * @param path associated {@link OperationPath}
23 * @param output Operation output, or {@code null} if output would be empty
25 public record OperationsPostResult(@NonNull OperationPath path, @Nullable ContainerNode output) {
26 public OperationsPostResult {
28 if (output != null && output.isEmpty()) {