Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.yang.model; |
| 18 | |
| 19 | /** |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 20 | * Represents mapping of java data types with corresponding yang leaf's data |
| 21 | * type. |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 22 | */ |
| 23 | public enum LeafType { |
| 24 | |
| 25 | /** |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 26 | * Represents INT8. |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 27 | */ |
| 28 | BYTE, |
| 29 | |
| 30 | /** |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 31 | * Represents INT16, UINT8. |
| 32 | */ |
| 33 | SHORT, |
| 34 | |
| 35 | /** |
| 36 | * Represents UINT16, INT32. |
| 37 | */ |
| 38 | INT, |
| 39 | |
| 40 | /** |
| 41 | * Represents UINT32, INT64. |
| 42 | */ |
| 43 | LONG, |
| 44 | |
| 45 | /** |
| 46 | * Represents BOOLEAN, EMPTY. |
| 47 | */ |
| 48 | BOOLEAN, |
| 49 | |
| 50 | /** |
| 51 | * Represents BITS, IDENTITYREF, ENUMERATION, STRING. |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 52 | */ |
| 53 | STRING, |
| 54 | |
| 55 | /** |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 56 | * Represents UINT64. |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 57 | */ |
| 58 | BIG_INTEGER, |
| 59 | |
| 60 | /** |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 61 | * Represents BASE64. |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 62 | */ |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 63 | BYTE_ARRAY, |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 64 | |
| 65 | /** |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 66 | * Represents DECIMAL64. |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 67 | * The decimal64 type represents a subset of the real numbers, which can |
| 68 | * be represented by decimal numerals. The value space of decimal64 is |
| 69 | * the set of numbers that can be obtained by multiplying a 64-bit |
| 70 | * signed integer by a negative power of ten, i.e., expressible as |
| 71 | * "i x 10^-n" where i is an integer64 and n is an integer between 1 and |
| 72 | * 18, inclusively. |
| 73 | */ |
| 74 | BIG_DECIMAL, |
| 75 | |
| 76 | /** |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 77 | * Represents union. |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 78 | */ |
sonugupta-huawei | aa6791e | 2017-02-09 12:38:43 +0530 | [diff] [blame] | 79 | UNION |
Gaurav Agrawal | c4105fe | 2017-01-20 17:12:28 +0530 | [diff] [blame] | 80 | } |