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;
11 import org.eclipse.jdt.annotation.NonNull;
14 * OpenDaylight extension parameter. When used as {@code odl-skip-notification-data=true}, it will instruct the listener
15 * streams to prune data from notifications.
17 public final class SkipNotificationDataParam implements RestconfQueryParam<SkipNotificationDataParam> {
18 // API consistency: must not be confused with enum constants
19 @SuppressWarnings("checkstyle:ConstantName")
20 public static final String uriName = "odl-skip-notification-data";
22 private static final @NonNull URI CAPABILITY =
23 URI.create("urn:opendaylight:params:restconf:capability:skip-notification-data:1.0");
24 private static final @NonNull SkipNotificationDataParam FALSE = new SkipNotificationDataParam(false);
25 private static final @NonNull SkipNotificationDataParam TRUE = new SkipNotificationDataParam(true);
27 private final boolean value;
29 private SkipNotificationDataParam(final boolean value) {
33 public static @NonNull SkipNotificationDataParam of(final boolean value) {
34 return value ? TRUE : FALSE;
37 public static @NonNull SkipNotificationDataParam forUriValue(final String uriValue) {
44 throw new IllegalArgumentException("Value can be 'false' or 'true', not '" + uriValue + "'");
49 public Class<@NonNull SkipNotificationDataParam> javaClass() {
50 return SkipNotificationDataParam.class;
54 public String paramName() {
59 public String paramValue() {
60 return String.valueOf(value);
63 public boolean value() {
67 public static @NonNull URI capabilityUri() {