2 * Copyright (c) 2020 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.rests.services.impl;
10 import java.util.Collection;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
15 import org.opendaylight.yangtools.yang.model.api.MustDefinition;
16 import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
17 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
18 import org.opendaylight.yangtools.yang.model.api.stmt.LeafEffectiveStatement;
19 import org.opendaylight.yangtools.yang.model.ri.type.BaseTypes;
21 @Deprecated(forRemoval = true, since = "4.0.0")
22 final class OperationsLeafSchemaNode extends AbstractOperationDataSchemaNode implements LeafSchemaNode {
23 private final QName qname;
25 OperationsLeafSchemaNode(final RpcDefinition rpc) {
26 qname = rpc.getQName();
30 public TypeDefinition<?> getType() {
31 return BaseTypes.emptyType();
35 public QName getQName() {
40 public boolean isMandatory() {
41 // This leaf has to be present
46 public Collection<@NonNull MustDefinition> getMustConstraints() {
51 public LeafEffectiveStatement asEffectiveStatement() {
52 throw new UnsupportedOperationException();