Bug 6022: Deviation statement is not fully available in the YANG parser output
[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  * The 'deviate' statement defines how the device's implementation of
19  * the target node deviates from its original definition.
20  * The argument is one of the strings "not-supported", "add", "replace", or "delete".
21  */
22 @Beta
23 public interface DeviateDefinition {
24
25     /**
26      *
27      * @return enum which describes the type of this deviate statement
28      */
29     DeviateKind getDeviateType();
30
31     /**
32      *
33      * @return value of the deviated config statement or null if it is not deviated
34      */
35     Boolean getDeviatedConfig();
36
37     /**
38      *
39      * @return value of the deviated default statement or null if it is not deviated
40      */
41     String getDeviatedDefault();
42
43     /**
44      *
45      * @return value of the deviated mandatory statement or null if it is not deviated
46      */
47     Boolean getDeviatedMandatory();
48
49     /**
50      *
51      * @return value of the deviated max-elements statement or null if it is not deviated
52      */
53     Integer getDeviatedMaxElements();
54
55     /**
56      *
57      * @return value of the deviated min-elements statement or null if it is not deviated
58      */
59     Integer getDeviatedMinElements();
60
61     /**
62      *
63      * @return set of the deviated must statements
64      */
65     Set<MustDefinition> getDeviatedMusts();
66
67     /**
68      *
69      * @return deviated type statement or null if it is not deviated
70      */
71     TypeDefinition<?> getDeviatedType();
72
73     /**
74      *
75      * @return collection of the deviated unique statements
76      */
77     Collection<UniqueConstraint> getDeviatedUniques();
78
79     /**
80      *
81      * @return value of the deviated units statement or null if it is not deviated
82      */
83     String getDeviatedUnits();
84 }