1// Copyright 2024 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 = "proto2"; 16 17package appsearch.lib; 18 19option java_package = "com.google.android.appsearch.proto"; 20option java_multiple_files = true; 21option objc_class_prefix = "APSC"; 22 23// Defines proto contains visibility overlay settings. 24// Next tag: 3 25message AndroidVOverlayProto { 26 // OPTIONAL: the standard visibility settings. Caller could have access if they match ANY of the 27 // requirements in this VisibilityConfig. 28 optional VisibilityConfigProto visibility_config = 1; 29 30 // OPTIONAL: The set of VisibilityConfig that have access. Caller could have access only if they 31 // match ALL of the requirements in a VisibilityConfig. 32 repeated VisibilityConfigProto visible_to_configs = 2; 33} 34 35// Defines proto contains all required requirements of a nested VisibilityConfig. 36// The requirements in a VisibleToConfigProto is "AND" relationship. A caller must match ALL 37// requirements to access the schema. For example, a caller must hold required permissions AND it is 38// a specified package. 39// Next tag: 5 40message VisibilityConfigProto { 41 // OPTIONAL: whether this schema could be visible to the platform. 42 optional bool not_platform_surfaceable = 1; 43 44 // OPTIONAL: the package identifiers of the while list packages that have access to this schema. 45 repeated PackageIdentifierProto visible_to_packages = 2; 46 47 // OPTIONAL: the required permission combinations that the caller need to hold. 48 repeated VisibleToPermissionProto visible_to_permissions = 3; 49 50 // OPTIONAL: the package identifier of the target package for public visibility. 51 optional PackageIdentifierProto publicly_visible_target_package = 4; 52} 53 54// Defines a proto to represent a PackageIdentifier 55// Next tag: 3 56message PackageIdentifierProto { 57 // REQUIRED: the package name of the given PackageIdentifier 58 optional string package_name = 1; 59 60 // REQUIRED: the sha 256 cert of the given PackageIdentifier 61 optional bytes package_sha256cert = 2; 62} 63 64// Defines a proto to represent a set of required Android permission combination. 65// Next tag: 2 66message VisibleToPermissionProto { 67 // REQUIRED: the required permissions that the caller need to hold to get access. 68 repeated uint32 permissions = 1; 69}