1/**
2 * Copyright 2024 Google LLC
3 *
4 * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may
5 * not use this file except in compliance with the License. You may obtain a
6 * copy of the License at
7 *
8 * <p>http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * <p>Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 * License for the specific language governing permissions and limitations under
14 * the License.
15 */
16syntax = "proto3";
17
18package google.ondevicepersonalization.federatedcompute.proto;
19
20import "fcp/protos/federatedcompute/common.proto";
21import "fcp/protos/ondevicepersonalization/common.proto";
22import "google/protobuf/timestamp.proto";
23
24option java_package = "com.google.ondevicepersonalization.federatedcompute.proto";
25option java_multiple_files = true;
26
27// Report exception request.
28// The url to report exception counts under v1 API is:
29// https://{host}/debugreporting/v1/exceptions:report
30// Next Id: 4
31message ReportExceptionRequest {
32   // Request time for this current request in UTC (as seconds since epoch)
33   google.protobuf.Timestamp request_timestamp = 1;
34
35   // Last successful report by device in UTC (as seconds since epoch)
36   google.protobuf.Timestamp last_reported_timestamp = 2;
37
38  // The client's capabilities when uploading result.
39  google.internal.federatedcompute.v1.ResourceCapabilities resource_capabilities = 3;
40}
41
42// Report exception response.
43// Next id: 3
44message ReportExceptionResponse {
45  // Upload result instruction on succeeded.
46  UploadInstruction upload_instruction = 1;
47
48  // Rejection reason.
49  google.internal.federatedcompute.v1.RejectionInfo rejection_info = 2;
50}
51
52// Aggregated error data sent from client -> server.
53// Next id: 2
54message ErrorDataList {
55  // Payload of error-data sent from client-> server, list of aggregated error data records.
56  repeated ErrorData error_data = 1;
57}
58
59// Single entry in error data sent from client -> server.
60// Next id: 5
61message ErrorData {
62   // The error code returned by the IsolatedService.
63   uint32 error_code = 1;
64
65   // The aggregated count of error_code on the given epoch_day.
66   uint32 error_count = 2;
67
68    /** The date associated with this record of aggregated errors. */
69    uint32 epoch_day = 3;
70
71    // The version of the package of the IsolatedService.
72    uint64 service_package_version = 4;
73}
74