Bug 2366 - Effective statments impl merge, retest & bugfix
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / stmt / TypeStatement.java
1 /*
2  * Copyright (c) 2015 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.stmt;
9
10 import java.util.Collection;
11 import javax.annotation.Nonnull;
12 import javax.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
14
15 @Rfc6020AbnfRule("type-stmt")
16 public interface TypeStatement extends DeclaredStatement<String> {
17
18     @Nonnull String getName();
19
20     @Rfc6020AbnfRule("numerical-restrictions")
21     interface NumericalRestrictions extends TypeStatement {
22
23         @Nonnull RangeStatement getRange();
24
25     }
26
27     @Rfc6020AbnfRule("decimal64-specification")
28     interface Decimal64Specification extends TypeStatement {
29
30         @Nonnull FractionDigitsStatement getFractionDigits();
31
32         @Nullable RangeStatement getRange();
33
34     }
35
36     @Rfc6020AbnfRule("string-restrictions")
37     interface StringRestrictions extends TypeStatement {
38
39         @Nullable LengthStatement getLength();
40
41         @Nonnull Collection<? extends PatternStatement> getPatterns();
42     }
43
44     @Rfc6020AbnfRule("enum-specification")
45     interface EnumSpecification extends TypeStatement {
46
47         @Nonnull Collection<? extends EnumStatement> getEnums();
48
49     }
50
51     @Rfc6020AbnfRule("leafref-specification")
52     interface LeafrefSpecification extends TypeStatement {
53
54         @Nonnull PathStatement getPath();
55
56     }
57
58     @Rfc6020AbnfRule("instanceidentifier-specification")
59     interface InstanceIdentifierSpecification extends TypeStatement {
60
61         @Nullable RequireInstanceStatement getRequireInstance();
62     }
63
64     @Rfc6020AbnfRule("identityref-specification")
65     interface IdentityRefSpecification extends TypeStatement {
66
67         @Nonnull BaseStatement getBase();
68
69     }
70
71     @Rfc6020AbnfRule("bits-specification")
72     interface BitsSpecification extends TypeStatement {
73
74         @Nonnull Collection<? extends BitStatement> getBits();
75
76     }
77
78     @Rfc6020AbnfRule("union-specification")
79     interface UnionSpecification extends TypeStatement {
80
81         @Nonnull Collection<? extends TypeStatement> getTypes();
82
83     }
84
85     @Rfc6020AbnfRule("binary-specification")
86     interface BinarySpecification extends TypeStatement {
87
88         @Nullable LengthStatement getLength();
89     }
90 }