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