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;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.eclipse.jdt.annotation.Nullable;
16 * Enumeration of possible {@code content} values as defined by
17 * <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-4.8.1">RFC8040, section 4.8.1</a>.
19 public enum ContentParam implements RestconfQueryParam<ContentParam> {
21 * Return all descendant data nodes.
25 * Return only configuration descendant data nodes.
29 * Return only non-configuration descendant data nodes.
31 NONCONFIG("nonconfig");
33 private final @NonNull String uriValue;
35 ContentParam(final String uriValue) {
36 this.uriValue = requireNonNull(uriValue);
40 public final Class<@NonNull ContentParam> javaClass() {
41 return ContentParam.class;
45 public final String paramName() {
50 public String paramValue() {
54 public static @NonNull String uriName() {
58 // Note: returns null of unknowns
59 public static @Nullable ContentParam forUriValue(final String uriValue) {