2 * Copyright (c) 2021 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.nb.rfc8040;
10 import static java.util.Objects.requireNonNull;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.eclipse.jdt.annotation.Nullable;
17 * Enumeration of possible {@code with-defaults} parameter values as defined by
18 * <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-4.8.9">RFC8040, section 4.8.9</a>.
20 public enum WithDefaultsParameter {
22 * Data nodes set to the YANG default by the client are reported.
26 * All data nodes are reported.
28 REPORT_ALL("report-all"),
30 * All data nodes are reported, and defaults are tagged.
32 REPORT_ALL_TAGGED("report-all-tagged"),
34 * Data nodes set to the YANG default are not reported.
38 private static final @NonNull URI CAPABILITY = URI.create("urn:ietf:params:restconf:capability:with-defaults:1.0");
40 private final @NonNull String uriValue;
42 WithDefaultsParameter(final String uriValue) {
43 this.uriValue = requireNonNull(uriValue);
46 public static @NonNull String uriName() {
47 return "with-defaults";
50 public @NonNull String uriValue() {
54 public static @Nullable WithDefaultsParameter forUriValue(final String uriValue) {
60 case "report-all-tagged":
61 return REPORT_ALL_TAGGED;
69 public static @NonNull URI capabilityUri() {