...

Source file src/google.golang.org/genproto/googleapis/api/annotations/field_info.pb.go

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

     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/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  }
   125  
   126  func (x *FieldInfo) Reset() {
   127  	*x = FieldInfo{}
   128  	if protoimpl.UnsafeEnabled {
   129  		mi := &file_google_api_field_info_proto_msgTypes[0]
   130  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   131  		ms.StoreMessageInfo(mi)
   132  	}
   133  }
   134  
   135  func (x *FieldInfo) String() string {
   136  	return protoimpl.X.MessageStringOf(x)
   137  }
   138  
   139  func (*FieldInfo) ProtoMessage() {}
   140  
   141  func (x *FieldInfo) ProtoReflect() protoreflect.Message {
   142  	mi := &file_google_api_field_info_proto_msgTypes[0]
   143  	if protoimpl.UnsafeEnabled && x != nil {
   144  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   145  		if ms.LoadMessageInfo() == nil {
   146  			ms.StoreMessageInfo(mi)
   147  		}
   148  		return ms
   149  	}
   150  	return mi.MessageOf(x)
   151  }
   152  
   153  // Deprecated: Use FieldInfo.ProtoReflect.Descriptor instead.
   154  func (*FieldInfo) Descriptor() ([]byte, []int) {
   155  	return file_google_api_field_info_proto_rawDescGZIP(), []int{0}
   156  }
   157  
   158  func (x *FieldInfo) GetFormat() FieldInfo_Format {
   159  	if x != nil {
   160  		return x.Format
   161  	}
   162  	return FieldInfo_FORMAT_UNSPECIFIED
   163  }
   164  
   165  var file_google_api_field_info_proto_extTypes = []protoimpl.ExtensionInfo{
   166  	{
   167  		ExtendedType:  (*descriptorpb.FieldOptions)(nil),
   168  		ExtensionType: (*FieldInfo)(nil),
   169  		Field:         291403980,
   170  		Name:          "google.api.field_info",
   171  		Tag:           "bytes,291403980,opt,name=field_info",
   172  		Filename:      "google/api/field_info.proto",
   173  	},
   174  }
   175  
   176  // Extension fields to descriptorpb.FieldOptions.
   177  var (
   178  	// Rich semantic descriptor of an API field beyond the basic typing.
   179  	//
   180  	// Examples:
   181  	//
   182  	//	string request_id = 1 [(google.api.field_info).format = UUID4];
   183  	//	string old_ip_address = 2 [(google.api.field_info).format = IPV4];
   184  	//	string new_ip_address = 3 [(google.api.field_info).format = IPV6];
   185  	//	string actual_ip_address = 4 [
   186  	//	  (google.api.field_info).format = IPV4_OR_IPV6
   187  	//	];
   188  	//
   189  	// optional google.api.FieldInfo field_info = 291403980;
   190  	E_FieldInfo = &file_google_api_field_info_proto_extTypes[0]
   191  )
   192  
   193  var File_google_api_field_info_proto protoreflect.FileDescriptor
   194  
   195  var file_google_api_field_info_proto_rawDesc = []byte{
   196  	0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,
   197  	0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67,
   198  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
   199  	0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72,
   200  	0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x09,
   201  	0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72,
   202  	0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
   203  	0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f,
   204  	0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22,
   205  	0x51, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52,
   206  	0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
   207  	0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x55, 0x49, 0x44, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04,
   208  	0x49, 0x50, 0x56, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x36, 0x10, 0x03,
   209  	0x12, 0x10, 0x0a, 0x0c, 0x49, 0x50, 0x56, 0x34, 0x5f, 0x4f, 0x52, 0x5f, 0x49, 0x50, 0x56, 0x36,
   210  	0x10, 0x04, 0x3a, 0x57, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
   211  	0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
   212  	0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
   213  	0xcc, 0xf1, 0xf9, 0x8a, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
   214  	0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f,
   215  	0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x6c, 0x0a, 0x0e, 0x63,
   216  	0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0e, 0x46,
   217  	0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
   218  	0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f,
   219  	0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67,
   220  	0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
   221  	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
   222  	0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   223  	0x33,
   224  }
   225  
   226  var (
   227  	file_google_api_field_info_proto_rawDescOnce sync.Once
   228  	file_google_api_field_info_proto_rawDescData = file_google_api_field_info_proto_rawDesc
   229  )
   230  
   231  func file_google_api_field_info_proto_rawDescGZIP() []byte {
   232  	file_google_api_field_info_proto_rawDescOnce.Do(func() {
   233  		file_google_api_field_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_info_proto_rawDescData)
   234  	})
   235  	return file_google_api_field_info_proto_rawDescData
   236  }
   237  
   238  var file_google_api_field_info_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
   239  var file_google_api_field_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   240  var file_google_api_field_info_proto_goTypes = []interface{}{
   241  	(FieldInfo_Format)(0),             // 0: google.api.FieldInfo.Format
   242  	(*FieldInfo)(nil),                 // 1: google.api.FieldInfo
   243  	(*descriptorpb.FieldOptions)(nil), // 2: google.protobuf.FieldOptions
   244  }
   245  var file_google_api_field_info_proto_depIdxs = []int32{
   246  	0, // 0: google.api.FieldInfo.format:type_name -> google.api.FieldInfo.Format
   247  	2, // 1: google.api.field_info:extendee -> google.protobuf.FieldOptions
   248  	1, // 2: google.api.field_info:type_name -> google.api.FieldInfo
   249  	3, // [3:3] is the sub-list for method output_type
   250  	3, // [3:3] is the sub-list for method input_type
   251  	2, // [2:3] is the sub-list for extension type_name
   252  	1, // [1:2] is the sub-list for extension extendee
   253  	0, // [0:1] is the sub-list for field type_name
   254  }
   255  
   256  func init() { file_google_api_field_info_proto_init() }
   257  func file_google_api_field_info_proto_init() {
   258  	if File_google_api_field_info_proto != nil {
   259  		return
   260  	}
   261  	if !protoimpl.UnsafeEnabled {
   262  		file_google_api_field_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   263  			switch v := v.(*FieldInfo); i {
   264  			case 0:
   265  				return &v.state
   266  			case 1:
   267  				return &v.sizeCache
   268  			case 2:
   269  				return &v.unknownFields
   270  			default:
   271  				return nil
   272  			}
   273  		}
   274  	}
   275  	type x struct{}
   276  	out := protoimpl.TypeBuilder{
   277  		File: protoimpl.DescBuilder{
   278  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   279  			RawDescriptor: file_google_api_field_info_proto_rawDesc,
   280  			NumEnums:      1,
   281  			NumMessages:   1,
   282  			NumExtensions: 1,
   283  			NumServices:   0,
   284  		},
   285  		GoTypes:           file_google_api_field_info_proto_goTypes,
   286  		DependencyIndexes: file_google_api_field_info_proto_depIdxs,
   287  		EnumInfos:         file_google_api_field_info_proto_enumTypes,
   288  		MessageInfos:      file_google_api_field_info_proto_msgTypes,
   289  		ExtensionInfos:    file_google_api_field_info_proto_extTypes,
   290  	}.Build()
   291  	File_google_api_field_info_proto = out.File
   292  	file_google_api_field_info_proto_rawDesc = nil
   293  	file_google_api_field_info_proto_goTypes = nil
   294  	file_google_api_field_info_proto_depIdxs = nil
   295  }
   296  

View as plain text