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 = "SystemParameterProto";22option java_package = "com.google.api";23option objc_class_prefix = "GAPI";24 25// ### System parameter configuration26//27// A system parameter is a special kind of parameter defined by the API28// system, not by an individual API. It is typically mapped to an HTTP header29// and/or a URL query parameter. This configuration specifies which methods30// change the names of the system parameters.31message SystemParameters {32 // Define system parameters.33 //34 // The parameters defined here will override the default parameters35 // implemented by the system. If this field is missing from the service36 // config, default system parameters will be used. Default system parameters37 // and names is implementation-dependent.38 //39 // Example: define api key for all methods40 //41 // system_parameters42 // rules:43 // - selector: "*"44 // parameters:45 // - name: api_key46 // url_query_parameter: api_key47 //48 //49 // Example: define 2 api key names for a specific method.50 //51 // system_parameters52 // rules:53 // - selector: "/ListShelves"54 // parameters:55 // - name: api_key56 // http_header: Api-Key157 // - name: api_key58 // http_header: Api-Key259 //60 // **NOTE:** All service configuration rules follow "last one wins" order.61 repeated SystemParameterRule rules = 1;62}63 64// Define a system parameter rule mapping system parameter definitions to65// methods.66message SystemParameterRule {67 // Selects the methods to which this rule applies. Use '*' to indicate all68 // methods in all APIs.69 //70 // Refer to [selector][google.api.DocumentationRule.selector] for syntax71 // details.72 string selector = 1;73 74 // Define parameters. Multiple names may be defined for a parameter.75 // For a given method call, only one of them should be used. If multiple76 // names are used the behavior is implementation-dependent.77 // If none of the specified names are present the behavior is78 // parameter-dependent.79 repeated SystemParameter parameters = 2;80}81 82// Define a parameter's name and location. The parameter may be passed as either83// an HTTP header or a URL query parameter, and if both are passed the behavior84// is implementation-dependent.85message SystemParameter {86 // Define the name of the parameter, such as "api_key" . It is case sensitive.87 string name = 1;88 89 // Define the HTTP header name to use for the parameter. It is case90 // insensitive.91 string http_header = 2;92 93 // Define the URL query parameter name to use for the parameter. It is case94 // sensitive.95 string url_query_parameter = 3;96}97 