xref: /aosp_15_r20/external/federated-compute/fcp/protos/task_eligibility_context.proto (revision 14675a029014e728ec732f129a32e299b2da0601)
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.federated.plan;
18*14675a02SAndroid Build Coastguard Worker
19*14675a02SAndroid Build Coastguard Workeroption java_package = "com.google.internal.federated.plan";
20*14675a02SAndroid Build Coastguard Workeroption java_multiple_files = true;
21*14675a02SAndroid Build Coastguard Workeroption java_outer_classname = "TaskEligibilityContextProto";
22*14675a02SAndroid Build Coastguard Worker
23*14675a02SAndroid Build Coastguard Worker// Context provided to the server task eligibility computation.
24*14675a02SAndroid Build Coastguard Worker//
25*14675a02SAndroid Build Coastguard Worker// This context is provided to the server and is used to produce the checkpoint
26*14675a02SAndroid Build Coastguard Worker// that will be sent to the clients to aid the clients in computing
27*14675a02SAndroid Build Coastguard Worker// `TaskEligibilityInfo`.
28*14675a02SAndroid Build Coastguard Workermessage TaskEligibilityContext {
29*14675a02SAndroid Build Coastguard Worker  // A list of information for each task currently being considered.
30*14675a02SAndroid Build Coastguard Worker  repeated SingleTaskEligibilityContext tasks = 1;
31*14675a02SAndroid Build Coastguard Worker}
32*14675a02SAndroid Build Coastguard Worker
33*14675a02SAndroid Build Coastguard Worker// Per-task context provided to the server eligibility computation.
34*14675a02SAndroid Build Coastguard Workermessage SingleTaskEligibilityContext {
35*14675a02SAndroid Build Coastguard Worker  // Name of the task.
36*14675a02SAndroid Build Coastguard Worker  string task_name = 1;
37*14675a02SAndroid Build Coastguard Worker
38*14675a02SAndroid Build Coastguard Worker  // Information about a policy that should be applied to the task to determine
39*14675a02SAndroid Build Coastguard Worker  // if it's eligible to be run. For example, a "didnt_run_recently" policy
40*14675a02SAndroid Build Coastguard Worker  // could instruct the server task eligibility computation that the task should
41*14675a02SAndroid Build Coastguard Worker  // not be run again by a client that ran it recently, where "recently" is
42*14675a02SAndroid Build Coastguard Worker  // implementation defined.
43*14675a02SAndroid Build Coastguard Worker  message EligibilityPolicy {
44*14675a02SAndroid Build Coastguard Worker    // The name of the policy. The set of possible values and their
45*14675a02SAndroid Build Coastguard Worker    // interpretation is implementation defined.
46*14675a02SAndroid Build Coastguard Worker    string name = 1;
47*14675a02SAndroid Build Coastguard Worker  }
48*14675a02SAndroid Build Coastguard Worker
49*14675a02SAndroid Build Coastguard Worker  // The list of eligibility policies that should be applied to the task.
50*14675a02SAndroid Build Coastguard Worker  repeated EligibilityPolicy policies = 2;
51*14675a02SAndroid Build Coastguard Worker}
52