...

Source file src/google.golang.org/genproto/googleapis/api/serviceconfig/system_parameter.pb.go

Documentation: google.golang.org/genproto/googleapis/api/serviceconfig

     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  
    15  // Code generated by protoc-gen-go. DO NOT EDIT.
    16  // versions:
    17  // 	protoc-gen-go v1.26.0
    18  // 	protoc        v4.24.4
    19  // source: google/api/system_parameter.proto
    20  
    21  package serviceconfig
    22  
    23  import (
    24  	reflect "reflect"
    25  	sync "sync"
    26  
    27  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    28  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    29  )
    30  
    31  const (
    32  	// Verify that this generated code is sufficiently up-to-date.
    33  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    34  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    35  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    36  )
    37  
    38  // ### System parameter configuration
    39  //
    40  // A system parameter is a special kind of parameter defined by the API
    41  // system, not by an individual API. It is typically mapped to an HTTP header
    42  // and/or a URL query parameter. This configuration specifies which methods
    43  // change the names of the system parameters.
    44  type SystemParameters struct {
    45  	state         protoimpl.MessageState
    46  	sizeCache     protoimpl.SizeCache
    47  	unknownFields protoimpl.UnknownFields
    48  
    49  	// Define system parameters.
    50  	//
    51  	// The parameters defined here will override the default parameters
    52  	// implemented by the system. If this field is missing from the service
    53  	// config, default system parameters will be used. Default system parameters
    54  	// and names is implementation-dependent.
    55  	//
    56  	// Example: define api key for all methods
    57  	//
    58  	//	system_parameters
    59  	//	  rules:
    60  	//	    - selector: "*"
    61  	//	      parameters:
    62  	//	        - name: api_key
    63  	//	          url_query_parameter: api_key
    64  	//
    65  	// Example: define 2 api key names for a specific method.
    66  	//
    67  	//	system_parameters
    68  	//	  rules:
    69  	//	    - selector: "/ListShelves"
    70  	//	      parameters:
    71  	//	        - name: api_key
    72  	//	          http_header: Api-Key1
    73  	//	        - name: api_key
    74  	//	          http_header: Api-Key2
    75  	//
    76  	// **NOTE:** All service configuration rules follow "last one wins" order.
    77  	Rules []*SystemParameterRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
    78  }
    79  
    80  func (x *SystemParameters) Reset() {
    81  	*x = SystemParameters{}
    82  	if protoimpl.UnsafeEnabled {
    83  		mi := &file_google_api_system_parameter_proto_msgTypes[0]
    84  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    85  		ms.StoreMessageInfo(mi)
    86  	}
    87  }
    88  
    89  func (x *SystemParameters) String() string {
    90  	return protoimpl.X.MessageStringOf(x)
    91  }
    92  
    93  func (*SystemParameters) ProtoMessage() {}
    94  
    95  func (x *SystemParameters) ProtoReflect() protoreflect.Message {
    96  	mi := &file_google_api_system_parameter_proto_msgTypes[0]
    97  	if protoimpl.UnsafeEnabled && x != nil {
    98  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    99  		if ms.LoadMessageInfo() == nil {
   100  			ms.StoreMessageInfo(mi)
   101  		}
   102  		return ms
   103  	}
   104  	return mi.MessageOf(x)
   105  }
   106  
   107  // Deprecated: Use SystemParameters.ProtoReflect.Descriptor instead.
   108  func (*SystemParameters) Descriptor() ([]byte, []int) {
   109  	return file_google_api_system_parameter_proto_rawDescGZIP(), []int{0}
   110  }
   111  
   112  func (x *SystemParameters) GetRules() []*SystemParameterRule {
   113  	if x != nil {
   114  		return x.Rules
   115  	}
   116  	return nil
   117  }
   118  
   119  // Define a system parameter rule mapping system parameter definitions to
   120  // methods.
   121  type SystemParameterRule struct {
   122  	state         protoimpl.MessageState
   123  	sizeCache     protoimpl.SizeCache
   124  	unknownFields protoimpl.UnknownFields
   125  
   126  	// Selects the methods to which this rule applies. Use '*' to indicate all
   127  	// methods in all APIs.
   128  	//
   129  	// Refer to [selector][google.api.DocumentationRule.selector] for syntax
   130  	// details.
   131  	Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"`
   132  	// Define parameters. Multiple names may be defined for a parameter.
   133  	// For a given method call, only one of them should be used. If multiple
   134  	// names are used the behavior is implementation-dependent.
   135  	// If none of the specified names are present the behavior is
   136  	// parameter-dependent.
   137  	Parameters []*SystemParameter `protobuf:"bytes,2,rep,name=parameters,proto3" json:"parameters,omitempty"`
   138  }
   139  
   140  func (x *SystemParameterRule) Reset() {
   141  	*x = SystemParameterRule{}
   142  	if protoimpl.UnsafeEnabled {
   143  		mi := &file_google_api_system_parameter_proto_msgTypes[1]
   144  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   145  		ms.StoreMessageInfo(mi)
   146  	}
   147  }
   148  
   149  func (x *SystemParameterRule) String() string {
   150  	return protoimpl.X.MessageStringOf(x)
   151  }
   152  
   153  func (*SystemParameterRule) ProtoMessage() {}
   154  
   155  func (x *SystemParameterRule) ProtoReflect() protoreflect.Message {
   156  	mi := &file_google_api_system_parameter_proto_msgTypes[1]
   157  	if protoimpl.UnsafeEnabled && x != nil {
   158  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   159  		if ms.LoadMessageInfo() == nil {
   160  			ms.StoreMessageInfo(mi)
   161  		}
   162  		return ms
   163  	}
   164  	return mi.MessageOf(x)
   165  }
   166  
   167  // Deprecated: Use SystemParameterRule.ProtoReflect.Descriptor instead.
   168  func (*SystemParameterRule) Descriptor() ([]byte, []int) {
   169  	return file_google_api_system_parameter_proto_rawDescGZIP(), []int{1}
   170  }
   171  
   172  func (x *SystemParameterRule) GetSelector() string {
   173  	if x != nil {
   174  		return x.Selector
   175  	}
   176  	return ""
   177  }
   178  
   179  func (x *SystemParameterRule) GetParameters() []*SystemParameter {
   180  	if x != nil {
   181  		return x.Parameters
   182  	}
   183  	return nil
   184  }
   185  
   186  // Define a parameter's name and location. The parameter may be passed as either
   187  // an HTTP header or a URL query parameter, and if both are passed the behavior
   188  // is implementation-dependent.
   189  type SystemParameter struct {
   190  	state         protoimpl.MessageState
   191  	sizeCache     protoimpl.SizeCache
   192  	unknownFields protoimpl.UnknownFields
   193  
   194  	// Define the name of the parameter, such as "api_key" . It is case sensitive.
   195  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   196  	// Define the HTTP header name to use for the parameter. It is case
   197  	// insensitive.
   198  	HttpHeader string `protobuf:"bytes,2,opt,name=http_header,json=httpHeader,proto3" json:"http_header,omitempty"`
   199  	// Define the URL query parameter name to use for the parameter. It is case
   200  	// sensitive.
   201  	UrlQueryParameter string `protobuf:"bytes,3,opt,name=url_query_parameter,json=urlQueryParameter,proto3" json:"url_query_parameter,omitempty"`
   202  }
   203  
   204  func (x *SystemParameter) Reset() {
   205  	*x = SystemParameter{}
   206  	if protoimpl.UnsafeEnabled {
   207  		mi := &file_google_api_system_parameter_proto_msgTypes[2]
   208  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   209  		ms.StoreMessageInfo(mi)
   210  	}
   211  }
   212  
   213  func (x *SystemParameter) String() string {
   214  	return protoimpl.X.MessageStringOf(x)
   215  }
   216  
   217  func (*SystemParameter) ProtoMessage() {}
   218  
   219  func (x *SystemParameter) ProtoReflect() protoreflect.Message {
   220  	mi := &file_google_api_system_parameter_proto_msgTypes[2]
   221  	if protoimpl.UnsafeEnabled && x != nil {
   222  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   223  		if ms.LoadMessageInfo() == nil {
   224  			ms.StoreMessageInfo(mi)
   225  		}
   226  		return ms
   227  	}
   228  	return mi.MessageOf(x)
   229  }
   230  
   231  // Deprecated: Use SystemParameter.ProtoReflect.Descriptor instead.
   232  func (*SystemParameter) Descriptor() ([]byte, []int) {
   233  	return file_google_api_system_parameter_proto_rawDescGZIP(), []int{2}
   234  }
   235  
   236  func (x *SystemParameter) GetName() string {
   237  	if x != nil {
   238  		return x.Name
   239  	}
   240  	return ""
   241  }
   242  
   243  func (x *SystemParameter) GetHttpHeader() string {
   244  	if x != nil {
   245  		return x.HttpHeader
   246  	}
   247  	return ""
   248  }
   249  
   250  func (x *SystemParameter) GetUrlQueryParameter() string {
   251  	if x != nil {
   252  		return x.UrlQueryParameter
   253  	}
   254  	return ""
   255  }
   256  
   257  var File_google_api_system_parameter_proto protoreflect.FileDescriptor
   258  
   259  var file_google_api_system_parameter_proto_rawDesc = []byte{
   260  	0x0a, 0x21, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x79, 0x73,
   261  	0x74, 0x65, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72,
   262  	0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22,
   263  	0x49, 0x0a, 0x10, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
   264  	0x65, 0x72, 0x73, 0x12, 0x35, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
   265  	0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e,
   266  	0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52,
   267  	0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x6e, 0x0a, 0x13, 0x53, 0x79,
   268  	0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x75, 0x6c,
   269  	0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20,
   270  	0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a,
   271  	0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
   272  	0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53,
   273  	0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a,
   274  	0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0x76, 0x0a, 0x0f, 0x53, 0x79,
   275  	0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a,
   276  	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
   277  	0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
   278  	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x68, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64,
   279  	0x65, 0x72, 0x12, 0x2e, 0x0a, 0x13, 0x75, 0x72, 0x6c, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f,
   280  	0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
   281  	0x11, 0x75, 0x72, 0x6c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
   282  	0x65, 0x72, 0x42, 0x76, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
   283  	0x2e, 0x61, 0x70, 0x69, 0x42, 0x14, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x50, 0x61, 0x72, 0x61,
   284  	0x6d, 0x65, 0x74, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f,
   285  	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
   286  	0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
   287  	0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63,
   288  	0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f, 0x6e,
   289  	0x66, 0x69, 0x67, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
   290  	0x6f, 0x33,
   291  }
   292  
   293  var (
   294  	file_google_api_system_parameter_proto_rawDescOnce sync.Once
   295  	file_google_api_system_parameter_proto_rawDescData = file_google_api_system_parameter_proto_rawDesc
   296  )
   297  
   298  func file_google_api_system_parameter_proto_rawDescGZIP() []byte {
   299  	file_google_api_system_parameter_proto_rawDescOnce.Do(func() {
   300  		file_google_api_system_parameter_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_system_parameter_proto_rawDescData)
   301  	})
   302  	return file_google_api_system_parameter_proto_rawDescData
   303  }
   304  
   305  var file_google_api_system_parameter_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
   306  var file_google_api_system_parameter_proto_goTypes = []interface{}{
   307  	(*SystemParameters)(nil),    // 0: google.api.SystemParameters
   308  	(*SystemParameterRule)(nil), // 1: google.api.SystemParameterRule
   309  	(*SystemParameter)(nil),     // 2: google.api.SystemParameter
   310  }
   311  var file_google_api_system_parameter_proto_depIdxs = []int32{
   312  	1, // 0: google.api.SystemParameters.rules:type_name -> google.api.SystemParameterRule
   313  	2, // 1: google.api.SystemParameterRule.parameters:type_name -> google.api.SystemParameter
   314  	2, // [2:2] is the sub-list for method output_type
   315  	2, // [2:2] is the sub-list for method input_type
   316  	2, // [2:2] is the sub-list for extension type_name
   317  	2, // [2:2] is the sub-list for extension extendee
   318  	0, // [0:2] is the sub-list for field type_name
   319  }
   320  
   321  func init() { file_google_api_system_parameter_proto_init() }
   322  func file_google_api_system_parameter_proto_init() {
   323  	if File_google_api_system_parameter_proto != nil {
   324  		return
   325  	}
   326  	if !protoimpl.UnsafeEnabled {
   327  		file_google_api_system_parameter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   328  			switch v := v.(*SystemParameters); i {
   329  			case 0:
   330  				return &v.state
   331  			case 1:
   332  				return &v.sizeCache
   333  			case 2:
   334  				return &v.unknownFields
   335  			default:
   336  				return nil
   337  			}
   338  		}
   339  		file_google_api_system_parameter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   340  			switch v := v.(*SystemParameterRule); i {
   341  			case 0:
   342  				return &v.state
   343  			case 1:
   344  				return &v.sizeCache
   345  			case 2:
   346  				return &v.unknownFields
   347  			default:
   348  				return nil
   349  			}
   350  		}
   351  		file_google_api_system_parameter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   352  			switch v := v.(*SystemParameter); i {
   353  			case 0:
   354  				return &v.state
   355  			case 1:
   356  				return &v.sizeCache
   357  			case 2:
   358  				return &v.unknownFields
   359  			default:
   360  				return nil
   361  			}
   362  		}
   363  	}
   364  	type x struct{}
   365  	out := protoimpl.TypeBuilder{
   366  		File: protoimpl.DescBuilder{
   367  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   368  			RawDescriptor: file_google_api_system_parameter_proto_rawDesc,
   369  			NumEnums:      0,
   370  			NumMessages:   3,
   371  			NumExtensions: 0,
   372  			NumServices:   0,
   373  		},
   374  		GoTypes:           file_google_api_system_parameter_proto_goTypes,
   375  		DependencyIndexes: file_google_api_system_parameter_proto_depIdxs,
   376  		MessageInfos:      file_google_api_system_parameter_proto_msgTypes,
   377  	}.Build()
   378  	File_google_api_system_parameter_proto = out.File
   379  	file_google_api_system_parameter_proto_rawDesc = nil
   380  	file_google_api_system_parameter_proto_goTypes = nil
   381  	file_google_api_system_parameter_proto_depIdxs = nil
   382  }
   383  

View as plain text