From 4a065d76b677a2bc1bb29cb6f08c69e14c14fdee Mon Sep 17 00:00:00 2001 From: qiaoli Date: Thu, 2 Nov 2023 05:08:15 +0000 Subject: Add resource capabitliy when request task Bug: 302585053 Test: mma Change-Id: I5f8b57bce02b702d9c6890386c2014f9e431f35e --- fcp/protos/federatedcompute/common.proto | 7 +++++-- fcp/protos/ondevicepersonalization/task_assignments.proto | 11 +++++++++-- 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 extra_request_headers = 2; + + // The compression used for resource, or unset if the data is + // uncompressed. + google.internal.federatedcompute.v1.ResourceCompressionFormat compression_format = 3; } -- cgit v1.2.3