blob: 5ff2ed66ec2b70c5e6427b8b4fee2b7bb867285f [file] [log] [blame]
Khen Nursimulu7626ce12016-12-21 11:51:46 -05001// Copyright (c) 2015, Google Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15// This file contains annotation definitions that can be used to describe
16// a configuration tree.
17
18syntax = "proto3";
19
20package voltha;
21
22import "google/protobuf/descriptor.proto";
23
24enum MessageParserOption {
25 // Move any enclosing child enum/message definition to the same level
26 // as the parent (this message) in the yang generated file
27 MOVE_TO_PARENT_LEVEL= 0;
28
29 // Create both a grouping and a container for this message. The container
30 // name will be the message name. The grouping name will be the message
31 // name prefixed with "grouping_"
32 CREATE_BOTH_GROUPING_AND_CONTAINER = 1;
33}
34
35message InlineNode {
36 string id = 1;
37 string type = 2;
38}
39
40extend google.protobuf.MessageOptions {
41 // This annotation is used to indicate how a message is parsed when
42 // converting from proto to yang format.
43 MessageParserOption yang_child_rule = 7761774;
44
45 MessageParserOption yang_message_rule = 7761775;
46}
47
48extend google.protobuf.FieldOptions {
49 // If present, the field (a message reference) should be replaced by the
50 // message itself. For now, this applies only to non-repeated fields.
51 InlineNode yang_inline_node = 7761776;
52}