54034d5244e3aac5c087e86137c7997b1e7edddc
[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 package org.opendaylight.yangtools.yang.model.api;
9
10 import com.google.common.annotations.Beta;
11 import java.util.Collection;
12 import org.opendaylight.yangtools.yang.model.api.stmt.DeviateEffectiveStatement;
13
14 /**
15  * Interface describing YANG 'deviate' statement.
16  *
17  * <p>
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 extends EffectiveStatementEquivalent<DeviateEffectiveStatement> {
24     /**
25      * Return deviation kind.
26      *
27      * @return enum which describes the type of this deviate statement
28      */
29     DeviateKind getDeviateType();
30
31     /**
32      * Returns deviated config value.
33      *
34      * @return value of the deviated config statement or null if it is not deviated
35      */
36     Boolean getDeviatedConfig();
37
38     /**
39      * Returns deviated default value.
40      *
41      * @return value of the deviated default statement or null if it is not deviated
42      */
43     String getDeviatedDefault();
44
45     /**
46      * Returns deviated mandatory value.
47      *
48      * @return value of the deviated mandatory statement or null if it is not deviated
49      */
50     Boolean getDeviatedMandatory();
51
52     /**
53      * Returns deviated max-elements.
54      *
55      * @return value of the deviated max-elements statement or null if it is not deviated
56      */
57     Integer getDeviatedMaxElements();
58
59     /**
60      * Returns deviated min-elements.
61      *
62      * @return value of the deviated min-elements statement or null if it is not deviated
63      */
64     Integer getDeviatedMinElements();
65
66     /**
67      * Returns deviated must statements.
68      *
69      * @return set of the deviated must statements
70      */
71     Collection<? extends MustDefinition> getDeviatedMusts();
72
73     /**
74      * Returns deviated type statement.
75      *
76      * @return deviated type statement or null if it is not deviated
77      */
78     TypeDefinition<?> getDeviatedType();
79
80     /**
81      * Returns deviated unique statements.
82      *
83      * @return collection of the deviated unique statements
84      */
85     Collection<? extends UniqueConstraint> getDeviatedUniques();
86
87     /**
88      * Returns deviated units statement.
89      *
90      * @return value of the deviated units statement or null if it is not deviated
91      */
92     String getDeviatedUnits();
93 }