aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqiaoli <qiaoli@google.com>2023-11-02 05:08:15 +0000
committerqiaoli <qiaoli@google.com>2023-11-08 19:26:27 +0000
commit4a065d76b677a2bc1bb29cb6f08c69e14c14fdee (patch)
treeb9f0a85a9f1f770189d764462a6b20f6f2430247
parent03688b21ee4a9735035ec61083ec68d6dd216f8b (diff)
downloadfederated-compute-4a065d76b677a2bc1bb29cb6f08c69e14c14fdee.tar.gz
Add resource capabitliy when request task
Bug: 302585053 Test: mma Change-Id: I5f8b57bce02b702d9c6890386c2014f9e431f35e
-rw-r--r--fcp/protos/federatedcompute/common.proto7
-rw-r--r--fcp/protos/ondevicepersonalization/task_assignments.proto11
2 files changed, 14 insertions, 4 deletions
diff --git a/fcp/protos/federatedcompute/common.proto b/fcp/protos/federatedcompute/common.proto
index dd57daa..9b4bd5a 100644
--- a/fcp/protos/federatedcompute/common.proto
+++ b/fcp/protos/federatedcompute/common.proto
@@ -76,8 +76,7 @@ message Resource {
message InlineResource {
// The inlined data for the resource.
- bytes data = 1
- ;
+ bytes data = 1;
// The compression used for the inlined data, or unset if the data is
// uncompressed.
@@ -93,6 +92,10 @@ message Resource {
// client. Not set if `client_cache_id` is not set.
google.protobuf.Duration max_age = 5;
+ // The compression used for resource, or unset if the data is
+ // uncompressed.
+ optional ResourceCompressionFormat compression_format = 999;
+
reserved 2;
}
diff --git a/fcp/protos/ondevicepersonalization/task_assignments.proto b/fcp/protos/ondevicepersonalization/task_assignments.proto
index 62e5e90..b890695 100644
--- a/fcp/protos/ondevicepersonalization/task_assignments.proto
+++ b/fcp/protos/ondevicepersonalization/task_assignments.proto
@@ -25,9 +25,12 @@ 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: 2
+// 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.
@@ -105,11 +108,15 @@ message ReportResultResponse {
}
// The upload instruction.
-// Next id: 3
+// 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;
}