Populate model/ hierarchy
[yangtools.git] / model / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / DeviateDefinition.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. 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.yangtools.yang.model.api;
9
10 import com.google.common.annotations.Beta;
11 import java.util.Collection;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.model.api.stmt.DeviateEffectiveStatement;
14 import org.opendaylight.yangtools.yang.model.api.stmt.UniqueEffectiveStatement;
15
16 /**
17  * Interface describing YANG 'deviate' statement.
18  *
19  * <p>
20  * The 'deviate' statement defines how the device's implementation of
21  * the target node deviates from its original definition.
22  * The argument is one of the strings "not-supported", "add", "replace", or "delete".
23  */
24 @Beta
25 public interface DeviateDefinition extends EffectiveStatementEquivalent<DeviateEffectiveStatement> {
26     /**
27      * Return deviation kind.
28      *
29      * @return enum which describes the type of this deviate statement
30      */
31     DeviateKind getDeviateType();
32
33     /**
34      * Returns deviated config value.
35      *
36      * @return value of the deviated config statement or null if it is not deviated
37      */
38     Boolean getDeviatedConfig();
39
40     /**
41      * Returns deviated default value.
42      *
43      * @return value of the deviated default statement or null if it is not deviated
44      */
45     String getDeviatedDefault();
46
47     /**
48      * Returns deviated mandatory value.
49      *
50      * @return value of the deviated mandatory statement or null if it is not deviated
51      */
52     Boolean getDeviatedMandatory();
53
54     /**
55      * Returns deviated max-elements.
56      *
57      * @return value of the deviated max-elements statement or null if it is not deviated
58      */
59     Integer getDeviatedMaxElements();
60
61     /**
62      * Returns deviated min-elements.
63      *
64      * @return value of the deviated min-elements statement or null if it is not deviated
65      */
66     Integer getDeviatedMinElements();
67
68     /**
69      * Returns deviated must statements.
70      *
71      * @return set of the deviated must statements
72      */
73     Collection<? extends @NonNull MustDefinition> getDeviatedMusts();
74
75     /**
76      * Returns deviated type statement.
77      *
78      * @return deviated type statement or null if it is not deviated
79      */
80     TypeDefinition<?> getDeviatedType();
81
82     /**
83      * Returns deviated unique statements.
84      *
85      * @return collection of the deviated unique statements
86      */
87     Collection<? extends @NonNull UniqueEffectiveStatement> getDeviatedUniques();
88
89     /**
90      * Returns deviated units statement.
91      *
92      * @return value of the deviated units statement or null if it is not deviated
93      */
94     String getDeviatedUnits();
95 }