Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
visibility.proto113 linesDownload Raw Back to api
1// Copyright 2026 Google LLC2//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 at6//7//     http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// 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 and13// limitations under the License.14 15syntax = "proto3";16 17package google.api;18 19import "google/protobuf/descriptor.proto";20 21option go_package = "google.golang.org/genproto/googleapis/api/visibility;visibility";22option java_multiple_files = true;23option java_outer_classname = "VisibilityProto";24option java_package = "com.google.api";25option objc_class_prefix = "GAPI";26 27extend google.protobuf.EnumOptions {28  // See `VisibilityRule`.29  google.api.VisibilityRule enum_visibility = 72295727;30}31 32extend google.protobuf.EnumValueOptions {33  // See `VisibilityRule`.34  google.api.VisibilityRule value_visibility = 72295727;35}36 37extend google.protobuf.FieldOptions {38  // See `VisibilityRule`.39  google.api.VisibilityRule field_visibility = 72295727;40}41 42extend google.protobuf.MessageOptions {43  // See `VisibilityRule`.44  google.api.VisibilityRule message_visibility = 72295727;45}46 47extend google.protobuf.MethodOptions {48  // See `VisibilityRule`.49  google.api.VisibilityRule method_visibility = 72295727;50}51 52extend google.protobuf.ServiceOptions {53  // See `VisibilityRule`.54  google.api.VisibilityRule api_visibility = 72295727;55}56 57// `Visibility` restricts service consumer's access to service elements,58// such as whether an application can call a visibility-restricted method.59// The restriction is expressed by applying visibility labels on service60// elements. The visibility labels are elsewhere linked to service consumers.61//62// A service can define multiple visibility labels, but a service consumer63// should be granted at most one visibility label. Multiple visibility64// labels for a single service consumer are not supported.65//66// If an element and all its parents have no visibility label, its visibility67// is unconditionally granted.68//69// Example:70//71//     visibility:72//       rules:73//       - selector: google.calendar.Calendar.EnhancedSearch74//         restriction: PREVIEW75//       - selector: google.calendar.Calendar.Delegate76//         restriction: INTERNAL77//78// Here, all methods are publicly visible except for the restricted methods79// EnhancedSearch and Delegate.80message Visibility {81  // A list of visibility rules that apply to individual API elements.82  //83  // **NOTE:** All service configuration rules follow "last one wins" order.84  repeated VisibilityRule rules = 1;85}86 87// A visibility rule provides visibility configuration for an individual API88// element.89message VisibilityRule {90  // Selects methods, messages, fields, enums, etc. to which this rule applies.91  //92  // Refer to [selector][google.api.DocumentationRule.selector] for syntax93  // details.94  string selector = 1;95 96  // A comma-separated list of visibility labels that apply to the `selector`.97  // Any of the listed labels can be used to grant the visibility.98  //99  // If a rule has multiple labels, removing one of the labels but not all of100  // them can break clients.101  //102  // Example:103  //104  //     visibility:105  //       rules:106  //       - selector: google.calendar.Calendar.EnhancedSearch107  //         restriction: INTERNAL, PREVIEW108  //109  // Removing INTERNAL from this restriction will break clients that rely on110  // this method and only had access to it through INTERNAL.111  string restriction = 2;112}113 
codekingpro/portable-devtools · Team Ai