field_info.pb.go raw

   1  // Copyright 2025 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/field_info.proto
  20  
  21  package annotations
  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  	descriptorpb "google.golang.org/protobuf/types/descriptorpb"
  30  )
  31  
  32  const (
  33  	// Verify that this generated code is sufficiently up-to-date.
  34  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  35  	// Verify that runtime/protoimpl is sufficiently up-to-date.
  36  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  37  )
  38  
  39  // The standard format of a field value. The supported formats are all backed
  40  // by either an RFC defined by the IETF or a Google-defined AIP.
  41  type FieldInfo_Format int32
  42  
  43  const (
  44  	// Default, unspecified value.
  45  	FieldInfo_FORMAT_UNSPECIFIED FieldInfo_Format = 0
  46  	// Universally Unique Identifier, version 4, value as defined by
  47  	// https://datatracker.ietf.org/doc/html/rfc4122. The value may be
  48  	// normalized to entirely lowercase letters. For example, the value
  49  	// `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
  50  	// `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
  51  	FieldInfo_UUID4 FieldInfo_Format = 1
  52  	// Internet Protocol v4 value as defined by [RFC
  53  	// 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be
  54  	// condensed, with leading zeros in each octet stripped. For example,
  55  	// `001.022.233.040` would be condensed to `1.22.233.40`.
  56  	FieldInfo_IPV4 FieldInfo_Format = 2
  57  	// Internet Protocol v6 value as defined by [RFC
  58  	// 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be
  59  	// normalized to entirely lowercase letters with zeros compressed, following
  60  	// [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example,
  61  	// the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
  62  	FieldInfo_IPV6 FieldInfo_Format = 3
  63  	// An IP address in either v4 or v6 format as described by the individual
  64  	// values defined herein. See the comments on the IPV4 and IPV6 types for
  65  	// allowed normalizations of each.
  66  	FieldInfo_IPV4_OR_IPV6 FieldInfo_Format = 4
  67  )
  68  
  69  // Enum value maps for FieldInfo_Format.
  70  var (
  71  	FieldInfo_Format_name = map[int32]string{
  72  		0: "FORMAT_UNSPECIFIED",
  73  		1: "UUID4",
  74  		2: "IPV4",
  75  		3: "IPV6",
  76  		4: "IPV4_OR_IPV6",
  77  	}
  78  	FieldInfo_Format_value = map[string]int32{
  79  		"FORMAT_UNSPECIFIED": 0,
  80  		"UUID4":              1,
  81  		"IPV4":               2,
  82  		"IPV6":               3,
  83  		"IPV4_OR_IPV6":       4,
  84  	}
  85  )
  86  
  87  func (x FieldInfo_Format) Enum() *FieldInfo_Format {
  88  	p := new(FieldInfo_Format)
  89  	*p = x
  90  	return p
  91  }
  92  
  93  func (x FieldInfo_Format) String() string {
  94  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  95  }
  96  
  97  func (FieldInfo_Format) Descriptor() protoreflect.EnumDescriptor {
  98  	return file_google_api_field_info_proto_enumTypes[0].Descriptor()
  99  }
 100  
 101  func (FieldInfo_Format) Type() protoreflect.EnumType {
 102  	return &file_google_api_field_info_proto_enumTypes[0]
 103  }
 104  
 105  func (x FieldInfo_Format) Number() protoreflect.EnumNumber {
 106  	return protoreflect.EnumNumber(x)
 107  }
 108  
 109  // Deprecated: Use FieldInfo_Format.Descriptor instead.
 110  func (FieldInfo_Format) EnumDescriptor() ([]byte, []int) {
 111  	return file_google_api_field_info_proto_rawDescGZIP(), []int{0, 0}
 112  }
 113  
 114  // Rich semantic information of an API field beyond basic typing.
 115  type FieldInfo struct {
 116  	state         protoimpl.MessageState
 117  	sizeCache     protoimpl.SizeCache
 118  	unknownFields protoimpl.UnknownFields
 119  
 120  	// The standard format of a field value. This does not explicitly configure
 121  	// any API consumer, just documents the API's format for the field it is
 122  	// applied to.
 123  	Format FieldInfo_Format `protobuf:"varint,1,opt,name=format,proto3,enum=google.api.FieldInfo_Format" json:"format,omitempty"`
 124  	// The type(s) that the annotated, generic field may represent.
 125  	//
 126  	// Currently, this must only be used on fields of type `google.protobuf.Any`.
 127  	// Supporting other generic types may be considered in the future.
 128  	ReferencedTypes []*TypeReference `protobuf:"bytes,2,rep,name=referenced_types,json=referencedTypes,proto3" json:"referenced_types,omitempty"`
 129  }
 130  
 131  func (x *FieldInfo) Reset() {
 132  	*x = FieldInfo{}
 133  	if protoimpl.UnsafeEnabled {
 134  		mi := &file_google_api_field_info_proto_msgTypes[0]
 135  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 136  		ms.StoreMessageInfo(mi)
 137  	}
 138  }
 139  
 140  func (x *FieldInfo) String() string {
 141  	return protoimpl.X.MessageStringOf(x)
 142  }
 143  
 144  func (*FieldInfo) ProtoMessage() {}
 145  
 146  func (x *FieldInfo) ProtoReflect() protoreflect.Message {
 147  	mi := &file_google_api_field_info_proto_msgTypes[0]
 148  	if protoimpl.UnsafeEnabled && x != nil {
 149  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 150  		if ms.LoadMessageInfo() == nil {
 151  			ms.StoreMessageInfo(mi)
 152  		}
 153  		return ms
 154  	}
 155  	return mi.MessageOf(x)
 156  }
 157  
 158  // Deprecated: Use FieldInfo.ProtoReflect.Descriptor instead.
 159  func (*FieldInfo) Descriptor() ([]byte, []int) {
 160  	return file_google_api_field_info_proto_rawDescGZIP(), []int{0}
 161  }
 162  
 163  func (x *FieldInfo) GetFormat() FieldInfo_Format {
 164  	if x != nil {
 165  		return x.Format
 166  	}
 167  	return FieldInfo_FORMAT_UNSPECIFIED
 168  }
 169  
 170  func (x *FieldInfo) GetReferencedTypes() []*TypeReference {
 171  	if x != nil {
 172  		return x.ReferencedTypes
 173  	}
 174  	return nil
 175  }
 176  
 177  // A reference to a message type, for use in [FieldInfo][google.api.FieldInfo].
 178  type TypeReference struct {
 179  	state         protoimpl.MessageState
 180  	sizeCache     protoimpl.SizeCache
 181  	unknownFields protoimpl.UnknownFields
 182  
 183  	// The name of the type that the annotated, generic field may represent.
 184  	// If the type is in the same protobuf package, the value can be the simple
 185  	// message name e.g., `"MyMessage"`. Otherwise, the value must be the
 186  	// fully-qualified message name e.g., `"google.library.v1.Book"`.
 187  	//
 188  	// If the type(s) are unknown to the service (e.g. the field accepts generic
 189  	// user input), use the wildcard `"*"` to denote this behavior.
 190  	//
 191  	// See [AIP-202](https://google.aip.dev/202#type-references) for more details.
 192  	TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
 193  }
 194  
 195  func (x *TypeReference) Reset() {
 196  	*x = TypeReference{}
 197  	if protoimpl.UnsafeEnabled {
 198  		mi := &file_google_api_field_info_proto_msgTypes[1]
 199  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 200  		ms.StoreMessageInfo(mi)
 201  	}
 202  }
 203  
 204  func (x *TypeReference) String() string {
 205  	return protoimpl.X.MessageStringOf(x)
 206  }
 207  
 208  func (*TypeReference) ProtoMessage() {}
 209  
 210  func (x *TypeReference) ProtoReflect() protoreflect.Message {
 211  	mi := &file_google_api_field_info_proto_msgTypes[1]
 212  	if protoimpl.UnsafeEnabled && x != nil {
 213  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 214  		if ms.LoadMessageInfo() == nil {
 215  			ms.StoreMessageInfo(mi)
 216  		}
 217  		return ms
 218  	}
 219  	return mi.MessageOf(x)
 220  }
 221  
 222  // Deprecated: Use TypeReference.ProtoReflect.Descriptor instead.
 223  func (*TypeReference) Descriptor() ([]byte, []int) {
 224  	return file_google_api_field_info_proto_rawDescGZIP(), []int{1}
 225  }
 226  
 227  func (x *TypeReference) GetTypeName() string {
 228  	if x != nil {
 229  		return x.TypeName
 230  	}
 231  	return ""
 232  }
 233  
 234  var file_google_api_field_info_proto_extTypes = []protoimpl.ExtensionInfo{
 235  	{
 236  		ExtendedType:  (*descriptorpb.FieldOptions)(nil),
 237  		ExtensionType: (*FieldInfo)(nil),
 238  		Field:         291403980,
 239  		Name:          "google.api.field_info",
 240  		Tag:           "bytes,291403980,opt,name=field_info",
 241  		Filename:      "google/api/field_info.proto",
 242  	},
 243  }
 244  
 245  // Extension fields to descriptorpb.FieldOptions.
 246  var (
 247  	// Rich semantic descriptor of an API field beyond the basic typing.
 248  	//
 249  	// Examples:
 250  	//
 251  	//	string request_id = 1 [(google.api.field_info).format = UUID4];
 252  	//	string old_ip_address = 2 [(google.api.field_info).format = IPV4];
 253  	//	string new_ip_address = 3 [(google.api.field_info).format = IPV6];
 254  	//	string actual_ip_address = 4 [
 255  	//	  (google.api.field_info).format = IPV4_OR_IPV6
 256  	//	];
 257  	//	google.protobuf.Any generic_field = 5 [
 258  	//	  (google.api.field_info).referenced_types = {type_name: "ActualType"},
 259  	//	  (google.api.field_info).referenced_types = {type_name: "OtherType"},
 260  	//	];
 261  	//	google.protobuf.Any generic_user_input = 5 [
 262  	//	  (google.api.field_info).referenced_types = {type_name: "*"},
 263  	//	];
 264  	//
 265  	// optional google.api.FieldInfo field_info = 291403980;
 266  	E_FieldInfo = &file_google_api_field_info_proto_extTypes[0]
 267  )
 268  
 269  var File_google_api_field_info_proto protoreflect.FileDescriptor
 270  
 271  var file_google_api_field_info_proto_rawDesc = []byte{
 272  	0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,
 273  	0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67,
 274  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
 275  	0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72,
 276  	0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, 0x0a, 0x09,
 277  	0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72,
 278  	0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
 279  	0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f,
 280  	0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,
 281  	0x44, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x74, 0x79,
 282  	0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
 283  	0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72,
 284  	0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64,
 285  	0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,
 286  	0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
 287  	0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x55, 0x49, 0x44, 0x34,
 288  	0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04,
 289  	0x49, 0x50, 0x56, 0x36, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x50, 0x56, 0x34, 0x5f, 0x4f,
 290  	0x52, 0x5f, 0x49, 0x50, 0x56, 0x36, 0x10, 0x04, 0x22, 0x2c, 0x0a, 0x0d, 0x54, 0x79, 0x70, 0x65,
 291  	0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70,
 292  	0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79,
 293  	0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x57, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f,
 294  	0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
 295  	0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69,
 296  	0x6f, 0x6e, 0x73, 0x18, 0xcc, 0xf1, 0xf9, 0x8a, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
 297  	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
 298  	0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x42,
 299  	0x6c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70,
 300  	0x69, 0x42, 0x0e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74,
 301  	0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61,
 302  	0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
 303  	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
 304  	0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
 305  	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70,
 306  	0x72, 0x6f, 0x74, 0x6f, 0x33,
 307  }
 308  
 309  var (
 310  	file_google_api_field_info_proto_rawDescOnce sync.Once
 311  	file_google_api_field_info_proto_rawDescData = file_google_api_field_info_proto_rawDesc
 312  )
 313  
 314  func file_google_api_field_info_proto_rawDescGZIP() []byte {
 315  	file_google_api_field_info_proto_rawDescOnce.Do(func() {
 316  		file_google_api_field_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_info_proto_rawDescData)
 317  	})
 318  	return file_google_api_field_info_proto_rawDescData
 319  }
 320  
 321  var file_google_api_field_info_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
 322  var file_google_api_field_info_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
 323  var file_google_api_field_info_proto_goTypes = []interface{}{
 324  	(FieldInfo_Format)(0),             // 0: google.api.FieldInfo.Format
 325  	(*FieldInfo)(nil),                 // 1: google.api.FieldInfo
 326  	(*TypeReference)(nil),             // 2: google.api.TypeReference
 327  	(*descriptorpb.FieldOptions)(nil), // 3: google.protobuf.FieldOptions
 328  }
 329  var file_google_api_field_info_proto_depIdxs = []int32{
 330  	0, // 0: google.api.FieldInfo.format:type_name -> google.api.FieldInfo.Format
 331  	2, // 1: google.api.FieldInfo.referenced_types:type_name -> google.api.TypeReference
 332  	3, // 2: google.api.field_info:extendee -> google.protobuf.FieldOptions
 333  	1, // 3: google.api.field_info:type_name -> google.api.FieldInfo
 334  	4, // [4:4] is the sub-list for method output_type
 335  	4, // [4:4] is the sub-list for method input_type
 336  	3, // [3:4] is the sub-list for extension type_name
 337  	2, // [2:3] is the sub-list for extension extendee
 338  	0, // [0:2] is the sub-list for field type_name
 339  }
 340  
 341  func init() { file_google_api_field_info_proto_init() }
 342  func file_google_api_field_info_proto_init() {
 343  	if File_google_api_field_info_proto != nil {
 344  		return
 345  	}
 346  	if !protoimpl.UnsafeEnabled {
 347  		file_google_api_field_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
 348  			switch v := v.(*FieldInfo); i {
 349  			case 0:
 350  				return &v.state
 351  			case 1:
 352  				return &v.sizeCache
 353  			case 2:
 354  				return &v.unknownFields
 355  			default:
 356  				return nil
 357  			}
 358  		}
 359  		file_google_api_field_info_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
 360  			switch v := v.(*TypeReference); i {
 361  			case 0:
 362  				return &v.state
 363  			case 1:
 364  				return &v.sizeCache
 365  			case 2:
 366  				return &v.unknownFields
 367  			default:
 368  				return nil
 369  			}
 370  		}
 371  	}
 372  	type x struct{}
 373  	out := protoimpl.TypeBuilder{
 374  		File: protoimpl.DescBuilder{
 375  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 376  			RawDescriptor: file_google_api_field_info_proto_rawDesc,
 377  			NumEnums:      1,
 378  			NumMessages:   2,
 379  			NumExtensions: 1,
 380  			NumServices:   0,
 381  		},
 382  		GoTypes:           file_google_api_field_info_proto_goTypes,
 383  		DependencyIndexes: file_google_api_field_info_proto_depIdxs,
 384  		EnumInfos:         file_google_api_field_info_proto_enumTypes,
 385  		MessageInfos:      file_google_api_field_info_proto_msgTypes,
 386  		ExtensionInfos:    file_google_api_field_info_proto_extTypes,
 387  	}.Build()
 388  	File_google_api_field_info_proto = out.File
 389  	file_google_api_field_info_proto_rawDesc = nil
 390  	file_google_api_field_info_proto_goTypes = nil
 391  	file_google_api_field_info_proto_depIdxs = nil
 392  }
 393