// Copyright 2024 Google LLC // // 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 = "proto2"; package appsearch.lib; option java_package = "com.google.android.appsearch.proto"; option java_multiple_files = true; option objc_class_prefix = "APSC"; // Defines proto contains visibility overlay settings. // Next tag: 3 message AndroidVOverlayProto { // OPTIONAL: the standard visibility settings. Caller could have access if they match ANY of the // requirements in this VisibilityConfig. optional VisibilityConfigProto visibility_config = 1; // OPTIONAL: The set of VisibilityConfig that have access. Caller could have access only if they // match ALL of the requirements in a VisibilityConfig. repeated VisibilityConfigProto visible_to_configs = 2; } // Defines proto contains all required requirements of a nested VisibilityConfig. // The requirements in a VisibleToConfigProto is "AND" relationship. A caller must match ALL // requirements to access the schema. For example, a caller must hold required permissions AND it is // a specified package. // Next tag: 5 message VisibilityConfigProto { // OPTIONAL: whether this schema could be visible to the platform. optional bool not_platform_surfaceable = 1; // OPTIONAL: the package identifiers of the while list packages that have access to this schema. repeated PackageIdentifierProto visible_to_packages = 2; // OPTIONAL: the required permission combinations that the caller need to hold. repeated VisibleToPermissionProto visible_to_permissions = 3; // OPTIONAL: the package identifier of the target package for public visibility. optional PackageIdentifierProto publicly_visible_target_package = 4; } // Defines a proto to represent a PackageIdentifier // Next tag: 3 message PackageIdentifierProto { // REQUIRED: the package name of the given PackageIdentifier optional string package_name = 1; // REQUIRED: the sha 256 cert of the given PackageIdentifier optional bytes package_sha256cert = 2; } // Defines a proto to represent a set of required Android permission combination. // Next tag: 2 message VisibleToPermissionProto { // REQUIRED: the required permissions that the caller need to hold to get access. repeated uint32 permissions = 1; }