/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

syntax = "proto3";

package com.android.adservices.service.proto;

option java_multiple_files = true;

// Protobuf describing the Rb enrollment list on Android.
message RbEnrollmentList {
  repeated RbEnrollment entry = 1;
}
// LINT.IfChange(PrivacySandboxApi)
// Privacy Sandbox APIs that are gated on enrollment.
enum PrivacySandboxApi {
  PRIVACY_SANDBOX_API_UNKNOWN = 0;
  PRIVACY_SANDBOX_API_TOPICS = 1;
  PRIVACY_SANDBOX_API_PROTECTED_AUDIENCE = 2;
  PRIVACY_SANDBOX_API_PRIVATE_AGGREGATION = 3;
  PRIVACY_SANDBOX_API_ATTRIBUTION_REPORTING = 4;
  PRIVACY_SANDBOX_API_SHARED_STORAGE = 5;
  PRIVACY_SANDBOX_API_PROTECTED_APP_SIGNALS = 6;
}
// LINT.ThenChange(/adservices/service-core/java/com/android/adservices/service/enrollment/EnrollmentData.java:EnrollmentApiEnumStringMap)

// A single Adtech enrollment entry.
message RbEnrollment {
  // Identifier provided to Adtechs upon enrollment.
  //
  // Note: This field will not be populated when the v3 enrollment config is
  // generated with this proto, as id will be already populated in
  // ConfigurationRecord (within which this proto is embedded).
  string enrollment_id = 1 [deprecated = true];

  // SDK Package names provided by Adtech during enrollment.
  repeated string sdk_names = 2;

  // Site provided by the AdTech during enrollment.
  string enrolled_site = 3;

  // List of APIs for which Adtech has enrolled into.
  repeated PrivacySandboxApi enrolled_apis = 5;

  reserved 4;
}
