1*14675a02SAndroid Build Coastguard Worker// Copyright 2021 Google LLC 2*14675a02SAndroid Build Coastguard Worker// 3*14675a02SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*14675a02SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*14675a02SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*14675a02SAndroid Build Coastguard Worker// 7*14675a02SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*14675a02SAndroid Build Coastguard Worker// 9*14675a02SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*14675a02SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*14675a02SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*14675a02SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*14675a02SAndroid Build Coastguard Worker// limitations under the License. 14*14675a02SAndroid Build Coastguard Worker 15*14675a02SAndroid Build Coastguard Workersyntax = "proto3"; 16*14675a02SAndroid Build Coastguard Worker 17*14675a02SAndroid Build Coastguard Workerpackage google.internal.federatedcompute.v1; 18*14675a02SAndroid Build Coastguard Worker 19*14675a02SAndroid Build Coastguard Workerimport "fcp/protos/federatedcompute/common.proto"; 20*14675a02SAndroid Build Coastguard Worker 21*14675a02SAndroid Build Coastguard Workeroption java_package = "com.google.internal.federatedcompute.v1"; 22*14675a02SAndroid Build Coastguard Workeroption java_multiple_files = true; 23*14675a02SAndroid Build Coastguard Worker 24*14675a02SAndroid Build Coastguard Workerservice Aggregations { 25*14675a02SAndroid Build Coastguard Worker // A request sent by the client after completing local (on-device) task 26*14675a02SAndroid Build Coastguard Worker // execution to notify the server that it has Aggregation data to upload. The 27*14675a02SAndroid Build Coastguard Worker // server responds with the location at which to upload the data. If a 28*14675a02SAndroid Build Coastguard Worker // client's result is no longer needed (e.g. the reporting goal was already 29*14675a02SAndroid Build Coastguard Worker // reached for the task), the server will respond with an ABORTED error in the 30*14675a02SAndroid Build Coastguard Worker // operation status. 31*14675a02SAndroid Build Coastguard Worker rpc StartAggregationDataUpload(StartAggregationDataUploadRequest) 32*14675a02SAndroid Build Coastguard Worker returns (StartAggregationDataUploadResponse) { 33*14675a02SAndroid Build Coastguard Worker } 34*14675a02SAndroid Build Coastguard Worker 35*14675a02SAndroid Build Coastguard Worker // A request sent by the client indicating the successful completion of the 36*14675a02SAndroid Build Coastguard Worker // client's aggregation session. If a client's result is not needed for the 37*14675a02SAndroid Build Coastguard Worker // aggregation (e.g. the reporting goal was already reached for the task), the 38*14675a02SAndroid Build Coastguard Worker // server will respond with an ABORTED error. 39*14675a02SAndroid Build Coastguard Worker // 40*14675a02SAndroid Build Coastguard Worker // Clients should use the `ForwardingInfo` from the 41*14675a02SAndroid Build Coastguard Worker // `StartAggregationDataUploadResponse.aggregation_protocol_forwarding_info` 42*14675a02SAndroid Build Coastguard Worker // response field to construct the URI for this request. 43*14675a02SAndroid Build Coastguard Worker rpc SubmitAggregationResult(SubmitAggregationResultRequest) 44*14675a02SAndroid Build Coastguard Worker returns (SubmitAggregationResultResponse) { 45*14675a02SAndroid Build Coastguard Worker } 46*14675a02SAndroid Build Coastguard Worker 47*14675a02SAndroid Build Coastguard Worker // A request sent by the client indicating the client's aggregation session 48*14675a02SAndroid Build Coastguard Worker // should be aborted. 49*14675a02SAndroid Build Coastguard Worker // 50*14675a02SAndroid Build Coastguard Worker // Clients must only call this if they've previously called 51*14675a02SAndroid Build Coastguard Worker // `StartAggregationDataUpload`. 52*14675a02SAndroid Build Coastguard Worker // 53*14675a02SAndroid Build Coastguard Worker // Clients should not call this if one of the requests returned an Aborted 54*14675a02SAndroid Build Coastguard Worker // status. 55*14675a02SAndroid Build Coastguard Worker // 56*14675a02SAndroid Build Coastguard Worker // If clients have already received a `StartAggregationDataUploadResponse` 57*14675a02SAndroid Build Coastguard Worker // they should use the `ForwardingInfo` from the 58*14675a02SAndroid Build Coastguard Worker // `StartAggregationDataUploadResponse.aggregation_protocol_forwarding_info` 59*14675a02SAndroid Build Coastguard Worker // response field to construct the URI for this request. Otherwise, clients 60*14675a02SAndroid Build Coastguard Worker // should use the same `ForwardingInfo` as was used to construct the 61*14675a02SAndroid Build Coastguard Worker // `StartAggregationDataUpload` request URI. 62*14675a02SAndroid Build Coastguard Worker rpc AbortAggregation(AbortAggregationRequest) 63*14675a02SAndroid Build Coastguard Worker returns (AbortAggregationResponse) { 64*14675a02SAndroid Build Coastguard Worker } 65*14675a02SAndroid Build Coastguard Worker} 66*14675a02SAndroid Build Coastguard Worker 67*14675a02SAndroid Build Coastguard Workermessage StartAggregationDataUploadRequest { 68*14675a02SAndroid Build Coastguard Worker // The id of the aggregation session this client participates in. This value 69*14675a02SAndroid Build Coastguard Worker // was returned by the server when the client was assigned a task. 70*14675a02SAndroid Build Coastguard Worker // 71*14675a02SAndroid Build Coastguard Worker // Note that HTTP clients set this value in the request URL instead of the 72*14675a02SAndroid Build Coastguard Worker // request body. 73*14675a02SAndroid Build Coastguard Worker string aggregation_id = 1 74*14675a02SAndroid Build Coastguard Worker ; 75*14675a02SAndroid Build Coastguard Worker 76*14675a02SAndroid Build Coastguard Worker // The authorization token returned by the server when the client was assigned 77*14675a02SAndroid Build Coastguard Worker // a task. 78*14675a02SAndroid Build Coastguard Worker // 79*14675a02SAndroid Build Coastguard Worker // Note that HTTP clients set this value in the request URL instead of the 80*14675a02SAndroid Build Coastguard Worker // request body. 81*14675a02SAndroid Build Coastguard Worker string authorization_token = 2 82*14675a02SAndroid Build Coastguard Worker ; 83*14675a02SAndroid Build Coastguard Worker} 84*14675a02SAndroid Build Coastguard Worker 85*14675a02SAndroid Build Coastguard Workermessage StartAggregationDataUploadMetadata {} 86*14675a02SAndroid Build Coastguard Worker 87*14675a02SAndroid Build Coastguard Workermessage StartAggregationDataUploadResponse { 88*14675a02SAndroid Build Coastguard Worker // Information to construct the URI to use for continuing the aggregation 89*14675a02SAndroid Build Coastguard Worker // protocol after the data is uploaded. 90*14675a02SAndroid Build Coastguard Worker ForwardingInfo aggregation_protocol_forwarding_info = 1; 91*14675a02SAndroid Build Coastguard Worker 92*14675a02SAndroid Build Coastguard Worker // Information about where to upload aggregation result data. 93*14675a02SAndroid Build Coastguard Worker ByteStreamResource resource = 2; 94*14675a02SAndroid Build Coastguard Worker 95*14675a02SAndroid Build Coastguard Worker // Unique token that the client must include in the subsequent protocol 96*14675a02SAndroid Build Coastguard Worker // requests. 97*14675a02SAndroid Build Coastguard Worker string client_token = 3; 98*14675a02SAndroid Build Coastguard Worker} 99*14675a02SAndroid Build Coastguard Worker 100*14675a02SAndroid Build Coastguard Workermessage SubmitAggregationResultRequest { 101*14675a02SAndroid Build Coastguard Worker // The id of the aggregation session this client participates in. This value 102*14675a02SAndroid Build Coastguard Worker // was returned by the server when the client was assigned a task. 103*14675a02SAndroid Build Coastguard Worker // 104*14675a02SAndroid Build Coastguard Worker // Note that HTTP clients set this value in the request URL instead of the 105*14675a02SAndroid Build Coastguard Worker // request body. 106*14675a02SAndroid Build Coastguard Worker string aggregation_id = 1 107*14675a02SAndroid Build Coastguard Worker ; 108*14675a02SAndroid Build Coastguard Worker 109*14675a02SAndroid Build Coastguard Worker // The client token returned by the server when the client was assigned a 110*14675a02SAndroid Build Coastguard Worker // task. 111*14675a02SAndroid Build Coastguard Worker // 112*14675a02SAndroid Build Coastguard Worker // Note that HTTP clients set this value in the request URL instead of the 113*14675a02SAndroid Build Coastguard Worker // request body. 114*14675a02SAndroid Build Coastguard Worker string client_token = 2 115*14675a02SAndroid Build Coastguard Worker ; 116*14675a02SAndroid Build Coastguard Worker 117*14675a02SAndroid Build Coastguard Worker // Name of the resource to which the aggregration result was uploaded. 118*14675a02SAndroid Build Coastguard Worker string resource_name = 3; 119*14675a02SAndroid Build Coastguard Worker} 120*14675a02SAndroid Build Coastguard Worker 121*14675a02SAndroid Build Coastguard Workermessage SubmitAggregationResultResponse {} 122*14675a02SAndroid Build Coastguard Worker 123*14675a02SAndroid Build Coastguard Workermessage AbortAggregationRequest { 124*14675a02SAndroid Build Coastguard Worker // The id of the aggregation session this client participates in. This value 125*14675a02SAndroid Build Coastguard Worker // was returned by the server when the client was assigned a task. 126*14675a02SAndroid Build Coastguard Worker // 127*14675a02SAndroid Build Coastguard Worker // Note that HTTP clients set this value in the request URL instead of the 128*14675a02SAndroid Build Coastguard Worker // request body. 129*14675a02SAndroid Build Coastguard Worker string aggregation_id = 1 130*14675a02SAndroid Build Coastguard Worker ; 131*14675a02SAndroid Build Coastguard Worker 132*14675a02SAndroid Build Coastguard Worker // The client token returned by the server when the client was assigned a 133*14675a02SAndroid Build Coastguard Worker // task. 134*14675a02SAndroid Build Coastguard Worker // 135*14675a02SAndroid Build Coastguard Worker // Note that HTTP clients set this value in the request URL instead of the 136*14675a02SAndroid Build Coastguard Worker // request body. 137*14675a02SAndroid Build Coastguard Worker string client_token = 2 138*14675a02SAndroid Build Coastguard Worker ; 139*14675a02SAndroid Build Coastguard Worker 140*14675a02SAndroid Build Coastguard Worker // Status code and optional message for why the aggregation was aborted. 141*14675a02SAndroid Build Coastguard Worker Status status = 3; 142*14675a02SAndroid Build Coastguard Worker} 143*14675a02SAndroid Build Coastguard Worker 144*14675a02SAndroid Build Coastguard Workermessage AbortAggregationResponse {} 145