a89d1da5345ec4644fc93c4b8e83a2c993ac1499
[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.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
15
16 @Rfc6020AbnfRule("type-stmt")
17 public interface TypeStatement extends DeclaredStatement<QName> {
18
19     @Nonnull String getName();
20
21     @Rfc6020AbnfRule("numerical-restrictions")
22     interface NumericalRestrictions extends TypeStatement {
23
24         @Nonnull RangeStatement getRange();
25
26     }
27
28     @Rfc6020AbnfRule("decimal64-specification")
29     interface Decimal64Specification extends TypeStatement {
30
31         @Nonnull FractionDigitsStatement getFractionDigits();
32
33         @Nullable RangeStatement getRange();
34
35     }
36
37     @Rfc6020AbnfRule("string-restrictions")
38     interface StringRestrictions extends TypeStatement {
39
40         @Nullable LengthStatement getLength();
41
42         @Nonnull Collection<? extends PatternStatement> getPatterns();
43     }
44
45     @Rfc6020AbnfRule("enum-specification")
46     interface EnumSpecification extends TypeStatement {
47
48         @Nonnull Collection<? extends EnumStatement> getEnums();
49
50     }
51
52     @Rfc6020AbnfRule("leafref-specification")
53     interface LeafrefSpecification extends TypeStatement {
54
55         @Nullable PathStatement getPath();
56
57     }
58
59     interface InstanceIdentifierSpecification extends TypeStatement {
60
61         @Nullable RequireInstanceStatement getRequireInstance();
62     }
63
64
65     interface IdentityRefSpecification extends TypeStatement {
66
67     }
68     interface BitsSpecification extends TypeStatement {
69
70         @Nonnull Collection<? extends BitStatement> getBits();
71
72     }
73
74     interface UnionSpecification extends TypeStatement {
75
76         @Nonnull Collection<? extends TypeStatement> getTypes();
77
78     }
79 }