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 insert} 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 InsertParam implements RestconfQueryParam<InsertParam> {
21 * Insert the new data after the insertion point, as specified by the value of the "point" parameter.
25 * Insert the new data before the insertion point, as specified by the value of the "point" parameter.
29 * Insert the new data as the new first entry.
33 * Insert the new data as the new last entry.
37 private @NonNull String uriValue;
39 InsertParam(final String uriValue) {
40 this.uriValue = requireNonNull(uriValue);
44 public Class<@NonNull InsertParam> javaClass() {
45 return InsertParam.class;
49 public String paramName() {
54 public String paramValue() {
58 public static @NonNull String uriName() {
62 // Note: returns null of unknowns
63 public static @Nullable InsertParam forUriValue(final String uriValue) {