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 WithDefaultsParam implements RestconfQueryParam<WithDefaultsParam> {
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 WithDefaultsParam(final String uriValue) {
43 this.uriValue = requireNonNull(uriValue);
47 public Class<@NonNull WithDefaultsParam> javaClass() {
48 return WithDefaultsParam.class;
52 public String paramName() {
57 public String paramValue() {
61 public static @NonNull String uriName() {
62 return "with-defaults";
65 public static @Nullable WithDefaultsParam forUriValue(final String uriValue) {
71 case "report-all-tagged":
72 return REPORT_ALL_TAGGED;
80 public static @NonNull URI capabilityUri() {