blob: b8906958784db537471e206bb48f1ca8169a4a5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
/**
* Copyright 2023 Google LLC
*
* <p>Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may obtain a
* copy of the License at
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
syntax = "proto3";
package google.ondevicepersonalization.federatedcompute.proto;
import "fcp/protos/federatedcompute/common.proto";
option java_package = "com.google.ondevicepersonalization.federatedcompute.proto";
option java_multiple_files = true;
// Create task assignment request.
// The url to create task assignment under v1 API is:
// https://{host}/taskassignment/v1/population/{populationName}:create-task-assignment
// Next Id: 3
message CreateTaskAssignmentRequest {
google.internal.federatedcompute.v1.ClientVersion client_version = 1;
// The client's capabilities when downloading and processing resources.
google.internal.federatedcompute.v1.ResourceCapabilities resource_capabilities = 2;
}
// Create task assignment response.
// Next Id: 3
message CreateTaskAssignmentResponse {
// One of two outcomes, depending on server's decision on participation of the
// client.
oneof result {
// If the client joined the task with this call, information on how to
// proceed.
TaskAssignment task_assignment = 1;
// If the client was not accepted, information how to proceed.
google.internal.federatedcompute.v1.RejectionInfo rejection_info = 2;
}
}
// When client (device) is accepted for the current task, this data structure
// carries information necessary to begin task execution.
// Next Id: 9
message TaskAssignment {
// population name.
string population_name = 1;
// the task id
string task_id = 2;
// The opaque id of the aggregation session the client has joined. This is a
// string generated by the server and MUST NOT contain any information that
// could be used to identify a specific device.
string aggregation_id = 3;
// assignment id
string assignment_id = 4;
// The name identifying the task that was assigned.
string task_name = 5;
// The checkpoint from which to start execution.
google.internal.federatedcompute.v1.Resource init_checkpoint = 6;
// The plan to be used for execution.
google.internal.federatedcompute.v1.Resource plan = 7;
// self uri
string self_uri = 8;
}
// Report result request.
// The url to report result under v1 API is:
// https://{host}/taskassignment/v1/population/{populationName}/task/{taskId}/aggregation/{aggregationId}/task-assignment/{assignmentId}:report-result
// Next Id: 2
message ReportResultRequest {
enum Result {
// Unknown
UNKNOWN = 0;
// Completed
COMPLETED = 1;
// Failed.
FAILED = 2;
}
Result result = 1;
}
// Report result response.
message ReportResultResponse {
// Upload result instruction on succeeded.
UploadInstruction upload_instruction = 1;
// Rejection reason.
google.internal.federatedcompute.v1.RejectionInfo rejection_info = 2;
}
// The upload instruction.
// Next id: 4
message UploadInstruction {
// upload file path.
string upload_location = 1;
// extra head for uploading.
map<string, string> extra_request_headers = 2;
// The compression used for resource, or unset if the data is
// uncompressed.
google.internal.federatedcompute.v1.ResourceCompressionFormat compression_format = 3;
}
|