xref: /aosp_15_r20/external/federated-compute/fcp/protos/task_eligibility_context.proto (revision 14675a029014e728ec732f129a32e299b2da0601)
1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.internal.federated.plan;
18
19option java_package = "com.google.internal.federated.plan";
20option java_multiple_files = true;
21option java_outer_classname = "TaskEligibilityContextProto";
22
23// Context provided to the server task eligibility computation.
24//
25// This context is provided to the server and is used to produce the checkpoint
26// that will be sent to the clients to aid the clients in computing
27// `TaskEligibilityInfo`.
28message TaskEligibilityContext {
29  // A list of information for each task currently being considered.
30  repeated SingleTaskEligibilityContext tasks = 1;
31}
32
33// Per-task context provided to the server eligibility computation.
34message SingleTaskEligibilityContext {
35  // Name of the task.
36  string task_name = 1;
37
38  // Information about a policy that should be applied to the task to determine
39  // if it's eligible to be run. For example, a "didnt_run_recently" policy
40  // could instruct the server task eligibility computation that the task should
41  // not be run again by a client that ran it recently, where "recently" is
42  // implementation defined.
43  message EligibilityPolicy {
44    // The name of the policy. The set of possible values and their
45    // interpretation is implementation defined.
46    string name = 1;
47  }
48
49  // The list of eligibility policies that should be applied to the task.
50  repeated EligibilityPolicy policies = 2;
51}
52