• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2020 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4//
5// These protos are only for use in tests of the PublicReplication logic. This
6// allows testing different cases, e.g. invalid PublicReplication schemas,
7// without relying on actual protos.
8
9syntax = "proto3";
10
11package chromiumos.config.public_replication.testdata;
12
13option go_package = "go.chromium.org/chromiumos/config/go/public_replication/testdata";
14
15import "chromiumos/config/public_replication/public_replication.proto";
16
17message PublicReplicationTestdata {
18    chromiumos.config.public_replication.PublicReplication public_replication = 1;
19
20    string str1 = 2;
21    string str2 = 3;
22
23    map<string, int32> map1 = 4;
24
25    SimpleTestdata simple1 = 5;
26
27    OneofTestdata oneof1 = 6;
28}
29
30message SimpleTestdata {
31    string str1 = 1;
32}
33
34message NestedTestdata {
35    SimpleTestdata simple1 = 1;
36}
37
38message OneofTestdata {
39    oneof messages {
40        NestedTestdata nested1 = 1;
41        NestedTestdata nested2 = 2;
42        NestedTestdata nested3 = 3;
43    }
44}
45
46message WrapperTestdata1 {
47    int32 n1 = 1;
48
49    PublicReplicationTestdata pr_testdata = 2;
50
51    repeated PublicReplicationTestdata repeated_pr_testdata = 3;
52}
53
54message WrapperTestdata2 {
55    WrapperTestdata1 wrapper_testdata1 = 1;
56}
57
58message WrapperTestdata3 {
59    chromiumos.config.public_replication.PublicReplication public_replication = 1;
60
61    bool b1 = 2;
62
63    PublicReplicationTestdata pr_testdata = 3;
64}
65
66message RecursiveMessage {
67    bool b1 = 1;
68
69    RecursiveMessage recursive_message = 2;
70}
71
72message PrivateMessage {
73    message Config {
74        message Test {
75           bool bools = 1;
76        }
77        repeated Test payload = 1;
78    }
79    Config config = 1;
80}
81
82message NestedPrivateMessage {
83    PrivateMessage nested_messages = 1;
84}
85
86message NestedRepeatedPrivateMessage {
87    repeated PrivateMessage nested_messages = 1;
88}
89