Cleanup whitespace
[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     @Rfc6020AbnfRule("decimal64-specification")
27     interface Decimal64Specification extends TypeStatement {
28
29         @Nonnull FractionDigitsStatement getFractionDigits();
30
31         @Nullable RangeStatement getRange();
32     }
33
34     @Rfc6020AbnfRule("string-restrictions")
35     interface StringRestrictions extends TypeStatement {
36
37         @Nullable LengthStatement getLength();
38
39         @Nonnull Collection<? extends PatternStatement> getPatterns();
40     }
41
42     @Rfc6020AbnfRule("enum-specification")
43     interface EnumSpecification extends TypeStatement {
44
45         @Nonnull Collection<? extends EnumStatement> getEnums();
46     }
47
48     @Rfc6020AbnfRule("leafref-specification")
49     interface LeafrefSpecification extends TypeStatement {
50
51         @Nonnull PathStatement getPath();
52     }
53
54     @Rfc6020AbnfRule("instanceidentifier-specification")
55     interface InstanceIdentifierSpecification extends TypeStatement {
56
57         @Nullable RequireInstanceStatement getRequireInstance();
58     }
59
60     @Rfc6020AbnfRule("identityref-specification")
61     interface IdentityRefSpecification extends TypeStatement {
62
63         @Nonnull BaseStatement getBase();
64     }
65
66     @Rfc6020AbnfRule("bits-specification")
67     interface BitsSpecification extends TypeStatement {
68
69         @Nonnull Collection<? extends BitStatement> getBits();
70     }
71
72     @Rfc6020AbnfRule("union-specification")
73     interface UnionSpecification extends TypeStatement {
74
75         @Nonnull Collection<? extends TypeStatement> getTypes();
76     }
77
78     @Rfc6020AbnfRule("binary-specification")
79     interface BinarySpecification extends TypeStatement {
80
81         @Nullable LengthStatement getLength();
82     }
83 }