2 * Copyright (c) 2019 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.yangtools.rfc6241.model.api;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.annotations.Beta;
13 import java.util.Optional;
14 import org.eclipse.jdt.annotation.NonNullByDefault;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.model.api.meta.ArgumentDefinition;
17 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
18 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
19 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
22 * {@link StatementDefinition}s for statements defined by RFC6241.
24 * @author Robert Varga
28 public enum NetconfStatements implements StatementDefinition {
29 GET_FILTER_ELEMENT_ATTRIBUTES(QName.create(NetconfConstants.RFC6241_MODULE, "get-filter-element-attributes"),
30 GetFilterElementAttributesStatement.class, GetFilterElementAttributesEffectiveStatement.class);
32 private final Class<? extends EffectiveStatement<?, ?>> effectiveRepresentation;
33 private final Class<? extends DeclaredStatement<?>> declaredRepresentation;
34 private final QName statementName;
36 NetconfStatements(final QName statementName, final Class<? extends DeclaredStatement<?>> declaredRepresentation,
37 final Class<? extends EffectiveStatement<?, ?>> effectiveRepresentation) {
38 this.statementName = statementName.intern();
39 this.declaredRepresentation = requireNonNull(declaredRepresentation);
40 this.effectiveRepresentation = requireNonNull(effectiveRepresentation);
44 public Optional<ArgumentDefinition> getArgumentDefinition() {
45 return Optional.empty();
49 public QName getStatementName() {
54 public Class<? extends EffectiveStatement<?, ?>> getEffectiveRepresentationClass() {
55 return effectiveRepresentation;
59 public Class<? extends DeclaredStatement<?>> getDeclaredRepresentationClass() {
60 return declaredRepresentation;