Add RestconfQueryParam
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / RestconfQueryParam.java
1 /*
2  * Copyright (c) 2021 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.restconf.nb.rfc8040;
9
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.concepts.Immutable;
12
13 /**
14  * Interface implemented by all Java classes which represent a
15  * <a href="https://datatracker.ietf.org/doc/html/rfc8040#section-4.8">RESTCONF query parameter</a>.
16  */
17 // FIXME: sealed when we have JDK17+?
18 public interface RestconfQueryParam<T extends RestconfQueryParam<T>> extends Immutable {
19     /**
20      * Return the Java representation class.
21      *
22      * @return the Java representation class
23      */
24     @NonNull Class<@NonNull T> javaClass();
25
26     /**
27      * Return the URI Request parameter name.
28      *
29      * @return the URI Request parameter name.
30      */
31     @NonNull String paramName();
32
33     /**
34      * Return the URI Request parameter value.
35      *
36      * @return the URI Request parameter value.
37      */
38     @NonNull String paramValue();
39 }