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;
11 import java.util.List;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
16 import org.opendaylight.yangtools.yang.model.api.MustDefinition;
17 import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
18 import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
19 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
20 import org.opendaylight.yangtools.yang.model.api.stmt.LeafEffectiveStatement;
21 import org.opendaylight.yangtools.yang.model.api.stmt.LeafStatement;
22 import org.opendaylight.yangtools.yang.model.ri.type.BaseTypes;
24 @Deprecated(forRemoval = true, since = "4.0.0")
25 final class OperationsLeafSchemaNode extends AbstractOperationDataSchemaNode<LeafStatement>
26 implements LeafSchemaNode, LeafEffectiveStatement {
27 private final QName qname;
29 OperationsLeafSchemaNode(final RpcDefinition rpc) {
30 qname = rpc.getQName();
34 public TypeDefinition<?> getType() {
35 return BaseTypes.emptyType();
39 public QName argument() {
44 public boolean isMandatory() {
45 // This leaf has to be present
50 public Collection<@NonNull MustDefinition> getMustConstraints() {
55 public LeafEffectiveStatement asEffectiveStatement() {
60 public List<EffectiveStatement<?, ?>> effectiveSubstatements() {
61 // FIXME: a 'type empty; mandatory true;' substatements, actually