codekingpro/portable-devtools
115k
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 19option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig";20option java_multiple_files = true;21option java_outer_classname = "UsageProto";22option java_package = "com.google.api";23option objc_class_prefix = "GAPI";24 25// Configuration controlling usage of a service.26message Usage {27 // Requirements that must be satisfied before a consumer project can use the28 // service. Each requirement is of the form <service.name>/<requirement-id>;29 // for example 'serviceusage.googleapis.com/billing-enabled'.30 //31 // For Google APIs, a Terms of Service requirement must be included here.32 // Google Cloud APIs must include "serviceusage.googleapis.com/tos/cloud".33 // Other Google APIs should include34 // "serviceusage.googleapis.com/tos/universal". Additional ToS can be35 // included based on the business needs.36 repeated string requirements = 1;37 38 // A list of usage rules that apply to individual API methods.39 //40 // **NOTE:** All service configuration rules follow "last one wins" order.41 repeated UsageRule rules = 6;42 43 // The full resource name of a channel used for sending notifications to the44 // service producer.45 //46 // Google Service Management currently only supports47 // [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification48 // channel. To use Google Cloud Pub/Sub as the channel, this must be the name49 // of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format50 // documented in https://cloud.google.com/pubsub/docs/overview.51 string producer_notification_channel = 7;52}53 54// Usage configuration rules for the service.55message UsageRule {56 // Selects the methods to which this rule applies. Use '*' to indicate all57 // methods in all APIs.58 //59 // Refer to [selector][google.api.DocumentationRule.selector] for syntax60 // details.61 string selector = 1;62 63 // Use this rule to configure unregistered calls for the service. Unregistered64 // calls are calls that do not contain consumer project identity.65 // (Example: calls that do not contain an API key).66 //67 // WARNING: By default, API methods do not allow unregistered calls, and each68 // method call must be identified by a consumer project identity.69 bool allow_unregistered_calls = 2;70 71 // If true, the selected method should skip service control and the control72 // plane features, such as quota and billing, will not be available.73 // This flag is used by Google Cloud Endpoints to bypass checks for internal74 // methods, such as service health check methods.75 bool skip_service_control = 3;76}77 