xref: /aosp_15_r20/external/pigweed/pw_protobuf/pw_protobuf_test_protos/size_report.proto (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1// Copyright 2019 The Pigweed Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License"); you may not
4// use this file except in compliance with the License. You may obtain a copy of
5// the License at
6//
7//     https://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, WITHOUT
11// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12// License for the specific language governing permissions and limitations under
13// the License.
14syntax = "proto3";
15
16package pw.protobuf_size_report;
17
18message ItemInfo {
19  enum Access {
20    NONE = 0;
21    READ = 1;
22    WRITE = 2;
23    READ_AND_WRITE = 3;
24  }
25  uint64 offset = 1;
26  uint32 size = 2;
27  Access access_level = 3;
28}
29
30message ResponseInfo {
31  oneof key {
32    string key_string = 1;
33    fixed32 key_token = 2;
34  }
35
36  optional int64 timestamp = 3;
37  optional bool has_value = 4;
38  ItemInfo item_info = 5;
39}
40
41message Response {
42  repeated ResponseInfo responses = 1;
43}
44
45message LookupRequest {
46  message AuthInfo {
47    optional uint32 id = 1;
48    optional uint32 token = 2;
49  }
50  oneof key {
51    string key_string = 1;
52    fixed32 key_token = 2;
53  }
54  optional uint32 items_per_response = 3;
55  AuthInfo auth_info = 4;
56  bool add_timestamp = 5;
57}
58