• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//
2// Copyright (C) 2010 Google Inc.
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
17syntax = "proto2";
18
19package google.gson.protobuf.generated;
20option java_package = "com.google.gson.protobuf.generated";
21
22import "annotations.proto";
23
24message SimpleProto {
25  optional string msg = 1;
26  optional int32 count = 2;
27}
28
29message ProtoWithDifferentCaseFormat {
30  repeated string name_that_tests_case_format = 1;
31  optional string another_field = 2;
32}
33
34message ProtoWithRepeatedFields {
35  repeated int64 numbers = 1;
36  repeated SimpleProto simples = 2;
37  optional string name = 3;
38}
39
40// -- A more complex message with annotations and nested protos
41
42message OuterMessage {
43  optional int32 month = 1;
44  optional int32 year = 2;
45  optional int64 long_timestamp = 3 [(serialized_name) = "timeStamp"];
46  optional string country_code_5f55 = 4;
47}
48
49message ProtoWithAnnotations {
50  optional string id = 1;
51  optional OuterMessage outer_message = 2 [(serialized_name) = "expiration_date"];
52
53  message InnerMessage {
54    optional int32 n__id_ct = 1;
55
56    enum Type {
57      UNKNOWN = 0;
58      TEXT = 1 [(serialized_value) = "text/plain"];
59      IMAGE = 2 [(serialized_value) = "image/png"];
60    }
61    optional Type content = 2;
62
63    message Data {
64      optional string data = 1;
65      optional int32 width = 2;
66      optional int32 height = 3;
67    }
68    repeated Data data = 3 [(serialized_name) = "$binary_data$"];
69  }
70  optional InnerMessage inner_message_1 = 3;
71  optional InnerMessage inner_message_2 = 4;
72}