...

Source file src/google.golang.org/genproto/googleapis/api/serviceconfig/consumer.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/consumer.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  // Supported data type of the property values
    39  type Property_PropertyType int32
    40  
    41  const (
    42  	// The type is unspecified, and will result in an error.
    43  	Property_UNSPECIFIED Property_PropertyType = 0
    44  	// The type is `int64`.
    45  	Property_INT64 Property_PropertyType = 1
    46  	// The type is `bool`.
    47  	Property_BOOL Property_PropertyType = 2
    48  	// The type is `string`.
    49  	Property_STRING Property_PropertyType = 3
    50  	// The type is 'double'.
    51  	Property_DOUBLE Property_PropertyType = 4
    52  )
    53  
    54  // Enum value maps for Property_PropertyType.
    55  var (
    56  	Property_PropertyType_name = map[int32]string{
    57  		0: "UNSPECIFIED",
    58  		1: "INT64",
    59  		2: "BOOL",
    60  		3: "STRING",
    61  		4: "DOUBLE",
    62  	}
    63  	Property_PropertyType_value = map[string]int32{
    64  		"UNSPECIFIED": 0,
    65  		"INT64":       1,
    66  		"BOOL":        2,
    67  		"STRING":      3,
    68  		"DOUBLE":      4,
    69  	}
    70  )
    71  
    72  func (x Property_PropertyType) Enum() *Property_PropertyType {
    73  	p := new(Property_PropertyType)
    74  	*p = x
    75  	return p
    76  }
    77  
    78  func (x Property_PropertyType) String() string {
    79  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    80  }
    81  
    82  func (Property_PropertyType) Descriptor() protoreflect.EnumDescriptor {
    83  	return file_google_api_consumer_proto_enumTypes[0].Descriptor()
    84  }
    85  
    86  func (Property_PropertyType) Type() protoreflect.EnumType {
    87  	return &file_google_api_consumer_proto_enumTypes[0]
    88  }
    89  
    90  func (x Property_PropertyType) Number() protoreflect.EnumNumber {
    91  	return protoreflect.EnumNumber(x)
    92  }
    93  
    94  // Deprecated: Use Property_PropertyType.Descriptor instead.
    95  func (Property_PropertyType) EnumDescriptor() ([]byte, []int) {
    96  	return file_google_api_consumer_proto_rawDescGZIP(), []int{1, 0}
    97  }
    98  
    99  // A descriptor for defining project properties for a service. One service may
   100  // have many consumer projects, and the service may want to behave differently
   101  // depending on some properties on the project. For example, a project may be
   102  // associated with a school, or a business, or a government agency, a business
   103  // type property on the project may affect how a service responds to the client.
   104  // This descriptor defines which properties are allowed to be set on a project.
   105  //
   106  // Example:
   107  //
   108  //	project_properties:
   109  //	  properties:
   110  //	  - name: NO_WATERMARK
   111  //	    type: BOOL
   112  //	    description: Allows usage of the API without watermarks.
   113  //	  - name: EXTENDED_TILE_CACHE_PERIOD
   114  //	    type: INT64
   115  type ProjectProperties struct {
   116  	state         protoimpl.MessageState
   117  	sizeCache     protoimpl.SizeCache
   118  	unknownFields protoimpl.UnknownFields
   119  
   120  	// List of per consumer project-specific properties.
   121  	Properties []*Property `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty"`
   122  }
   123  
   124  func (x *ProjectProperties) Reset() {
   125  	*x = ProjectProperties{}
   126  	if protoimpl.UnsafeEnabled {
   127  		mi := &file_google_api_consumer_proto_msgTypes[0]
   128  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   129  		ms.StoreMessageInfo(mi)
   130  	}
   131  }
   132  
   133  func (x *ProjectProperties) String() string {
   134  	return protoimpl.X.MessageStringOf(x)
   135  }
   136  
   137  func (*ProjectProperties) ProtoMessage() {}
   138  
   139  func (x *ProjectProperties) ProtoReflect() protoreflect.Message {
   140  	mi := &file_google_api_consumer_proto_msgTypes[0]
   141  	if protoimpl.UnsafeEnabled && x != nil {
   142  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   143  		if ms.LoadMessageInfo() == nil {
   144  			ms.StoreMessageInfo(mi)
   145  		}
   146  		return ms
   147  	}
   148  	return mi.MessageOf(x)
   149  }
   150  
   151  // Deprecated: Use ProjectProperties.ProtoReflect.Descriptor instead.
   152  func (*ProjectProperties) Descriptor() ([]byte, []int) {
   153  	return file_google_api_consumer_proto_rawDescGZIP(), []int{0}
   154  }
   155  
   156  func (x *ProjectProperties) GetProperties() []*Property {
   157  	if x != nil {
   158  		return x.Properties
   159  	}
   160  	return nil
   161  }
   162  
   163  // Defines project properties.
   164  //
   165  // API services can define properties that can be assigned to consumer projects
   166  // so that backends can perform response customization without having to make
   167  // additional calls or maintain additional storage. For example, Maps API
   168  // defines properties that controls map tile cache period, or whether to embed a
   169  // watermark in a result.
   170  //
   171  // These values can be set via API producer console. Only API providers can
   172  // define and set these properties.
   173  type Property struct {
   174  	state         protoimpl.MessageState
   175  	sizeCache     protoimpl.SizeCache
   176  	unknownFields protoimpl.UnknownFields
   177  
   178  	// The name of the property (a.k.a key).
   179  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   180  	// The type of this property.
   181  	Type Property_PropertyType `protobuf:"varint,2,opt,name=type,proto3,enum=google.api.Property_PropertyType" json:"type,omitempty"`
   182  	// The description of the property
   183  	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
   184  }
   185  
   186  func (x *Property) Reset() {
   187  	*x = Property{}
   188  	if protoimpl.UnsafeEnabled {
   189  		mi := &file_google_api_consumer_proto_msgTypes[1]
   190  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   191  		ms.StoreMessageInfo(mi)
   192  	}
   193  }
   194  
   195  func (x *Property) String() string {
   196  	return protoimpl.X.MessageStringOf(x)
   197  }
   198  
   199  func (*Property) ProtoMessage() {}
   200  
   201  func (x *Property) ProtoReflect() protoreflect.Message {
   202  	mi := &file_google_api_consumer_proto_msgTypes[1]
   203  	if protoimpl.UnsafeEnabled && x != nil {
   204  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   205  		if ms.LoadMessageInfo() == nil {
   206  			ms.StoreMessageInfo(mi)
   207  		}
   208  		return ms
   209  	}
   210  	return mi.MessageOf(x)
   211  }
   212  
   213  // Deprecated: Use Property.ProtoReflect.Descriptor instead.
   214  func (*Property) Descriptor() ([]byte, []int) {
   215  	return file_google_api_consumer_proto_rawDescGZIP(), []int{1}
   216  }
   217  
   218  func (x *Property) GetName() string {
   219  	if x != nil {
   220  		return x.Name
   221  	}
   222  	return ""
   223  }
   224  
   225  func (x *Property) GetType() Property_PropertyType {
   226  	if x != nil {
   227  		return x.Type
   228  	}
   229  	return Property_UNSPECIFIED
   230  }
   231  
   232  func (x *Property) GetDescription() string {
   233  	if x != nil {
   234  		return x.Description
   235  	}
   236  	return ""
   237  }
   238  
   239  var File_google_api_consumer_proto protoreflect.FileDescriptor
   240  
   241  var file_google_api_consumer_proto_rawDesc = []byte{
   242  	0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e,
   243  	0x73, 0x75, 0x6d, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f,
   244  	0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x49, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x6a, 0x65,
   245  	0x63, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x0a,
   246  	0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
   247  	0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x72,
   248  	0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69,
   249  	0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12,
   250  	0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
   251  	0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
   252  	0x0e, 0x32, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50,
   253  	0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79,
   254  	0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
   255  	0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
   256  	0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x0c,
   257  	0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b,
   258  	0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a,
   259  	0x05, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x42, 0x4f, 0x4f, 0x4c,
   260  	0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, 0x0a,
   261  	0x0a, 0x06, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x10, 0x04, 0x42, 0x68, 0x0a, 0x0e, 0x63, 0x6f,
   262  	0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0d, 0x43, 0x6f,
   263  	0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67,
   264  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67,
   265  	0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
   266  	0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
   267  	0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x63, 0x6f,
   268  	0x6e, 0x66, 0x69, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   269  }
   270  
   271  var (
   272  	file_google_api_consumer_proto_rawDescOnce sync.Once
   273  	file_google_api_consumer_proto_rawDescData = file_google_api_consumer_proto_rawDesc
   274  )
   275  
   276  func file_google_api_consumer_proto_rawDescGZIP() []byte {
   277  	file_google_api_consumer_proto_rawDescOnce.Do(func() {
   278  		file_google_api_consumer_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_consumer_proto_rawDescData)
   279  	})
   280  	return file_google_api_consumer_proto_rawDescData
   281  }
   282  
   283  var file_google_api_consumer_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   284  var file_google_api_consumer_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   285  var file_google_api_consumer_proto_goTypes = []interface{}{
   286  	(Property_PropertyType)(0), // 0: google.api.Property.PropertyType
   287  	(*ProjectProperties)(nil),  // 1: google.api.ProjectProperties
   288  	(*Property)(nil),           // 2: google.api.Property
   289  }
   290  var file_google_api_consumer_proto_depIdxs = []int32{
   291  	2, // 0: google.api.ProjectProperties.properties:type_name -> google.api.Property
   292  	0, // 1: google.api.Property.type:type_name -> google.api.Property.PropertyType
   293  	2, // [2:2] is the sub-list for method output_type
   294  	2, // [2:2] is the sub-list for method input_type
   295  	2, // [2:2] is the sub-list for extension type_name
   296  	2, // [2:2] is the sub-list for extension extendee
   297  	0, // [0:2] is the sub-list for field type_name
   298  }
   299  
   300  func init() { file_google_api_consumer_proto_init() }
   301  func file_google_api_consumer_proto_init() {
   302  	if File_google_api_consumer_proto != nil {
   303  		return
   304  	}
   305  	if !protoimpl.UnsafeEnabled {
   306  		file_google_api_consumer_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   307  			switch v := v.(*ProjectProperties); i {
   308  			case 0:
   309  				return &v.state
   310  			case 1:
   311  				return &v.sizeCache
   312  			case 2:
   313  				return &v.unknownFields
   314  			default:
   315  				return nil
   316  			}
   317  		}
   318  		file_google_api_consumer_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   319  			switch v := v.(*Property); i {
   320  			case 0:
   321  				return &v.state
   322  			case 1:
   323  				return &v.sizeCache
   324  			case 2:
   325  				return &v.unknownFields
   326  			default:
   327  				return nil
   328  			}
   329  		}
   330  	}
   331  	type x struct{}
   332  	out := protoimpl.TypeBuilder{
   333  		File: protoimpl.DescBuilder{
   334  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   335  			RawDescriptor: file_google_api_consumer_proto_rawDesc,
   336  			NumEnums:      1,
   337  			NumMessages:   2,
   338  			NumExtensions: 0,
   339  			NumServices:   0,
   340  		},
   341  		GoTypes:           file_google_api_consumer_proto_goTypes,
   342  		DependencyIndexes: file_google_api_consumer_proto_depIdxs,
   343  		EnumInfos:         file_google_api_consumer_proto_enumTypes,
   344  		MessageInfos:      file_google_api_consumer_proto_msgTypes,
   345  	}.Build()
   346  	File_google_api_consumer_proto = out.File
   347  	file_google_api_consumer_proto_rawDesc = nil
   348  	file_google_api_consumer_proto_goTypes = nil
   349  	file_google_api_consumer_proto_depIdxs = nil
   350  }
   351  

View as plain text