field_info.pb.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. // Copyright 2023 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. // Code generated by protoc-gen-go. DO NOT EDIT.
  15. // versions:
  16. // protoc-gen-go v1.26.0
  17. // protoc v3.21.12
  18. // source: google/api/field_info.proto
  19. package annotations
  20. import (
  21. reflect "reflect"
  22. sync "sync"
  23. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  24. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  25. descriptorpb "google.golang.org/protobuf/types/descriptorpb"
  26. )
  27. const (
  28. // Verify that this generated code is sufficiently up-to-date.
  29. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  30. // Verify that runtime/protoimpl is sufficiently up-to-date.
  31. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  32. )
  33. // The standard format of a field value. The supported formats are all backed
  34. // by either an RFC defined by the IETF or a Google-defined AIP.
  35. type FieldInfo_Format int32
  36. const (
  37. // Default, unspecified value.
  38. FieldInfo_FORMAT_UNSPECIFIED FieldInfo_Format = 0
  39. // Universally Unique Identifier, version 4, value as defined by
  40. // https://datatracker.ietf.org/doc/html/rfc4122. The value may be
  41. // normalized to entirely lowercase letters. For example, the value
  42. // `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
  43. // `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
  44. FieldInfo_UUID4 FieldInfo_Format = 1
  45. // Internet Protocol v4 value as defined by [RFC
  46. // 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be
  47. // condensed, with leading zeros in each octet stripped. For example,
  48. // `001.022.233.040` would be condensed to `1.22.233.40`.
  49. FieldInfo_IPV4 FieldInfo_Format = 2
  50. // Internet Protocol v6 value as defined by [RFC
  51. // 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be
  52. // normalized to entirely lowercase letters, and zero-padded partial and
  53. // empty octets. For example, the value `2001:DB8::` would be normalized to
  54. // `2001:0db8:0:0`.
  55. FieldInfo_IPV6 FieldInfo_Format = 3
  56. // An IP address in either v4 or v6 format as described by the individual
  57. // values defined herein. See the comments on the IPV4 and IPV6 types for
  58. // allowed normalizations of each.
  59. FieldInfo_IPV4_OR_IPV6 FieldInfo_Format = 4
  60. )
  61. // Enum value maps for FieldInfo_Format.
  62. var (
  63. FieldInfo_Format_name = map[int32]string{
  64. 0: "FORMAT_UNSPECIFIED",
  65. 1: "UUID4",
  66. 2: "IPV4",
  67. 3: "IPV6",
  68. 4: "IPV4_OR_IPV6",
  69. }
  70. FieldInfo_Format_value = map[string]int32{
  71. "FORMAT_UNSPECIFIED": 0,
  72. "UUID4": 1,
  73. "IPV4": 2,
  74. "IPV6": 3,
  75. "IPV4_OR_IPV6": 4,
  76. }
  77. )
  78. func (x FieldInfo_Format) Enum() *FieldInfo_Format {
  79. p := new(FieldInfo_Format)
  80. *p = x
  81. return p
  82. }
  83. func (x FieldInfo_Format) String() string {
  84. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  85. }
  86. func (FieldInfo_Format) Descriptor() protoreflect.EnumDescriptor {
  87. return file_google_api_field_info_proto_enumTypes[0].Descriptor()
  88. }
  89. func (FieldInfo_Format) Type() protoreflect.EnumType {
  90. return &file_google_api_field_info_proto_enumTypes[0]
  91. }
  92. func (x FieldInfo_Format) Number() protoreflect.EnumNumber {
  93. return protoreflect.EnumNumber(x)
  94. }
  95. // Deprecated: Use FieldInfo_Format.Descriptor instead.
  96. func (FieldInfo_Format) EnumDescriptor() ([]byte, []int) {
  97. return file_google_api_field_info_proto_rawDescGZIP(), []int{0, 0}
  98. }
  99. // Rich semantic information of an API field beyond basic typing.
  100. type FieldInfo struct {
  101. state protoimpl.MessageState
  102. sizeCache protoimpl.SizeCache
  103. unknownFields protoimpl.UnknownFields
  104. // The standard format of a field value. This does not explicitly configure
  105. // any API consumer, just documents the API's format for the field it is
  106. // applied to.
  107. Format FieldInfo_Format `protobuf:"varint,1,opt,name=format,proto3,enum=google.api.FieldInfo_Format" json:"format,omitempty"`
  108. }
  109. func (x *FieldInfo) Reset() {
  110. *x = FieldInfo{}
  111. if protoimpl.UnsafeEnabled {
  112. mi := &file_google_api_field_info_proto_msgTypes[0]
  113. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  114. ms.StoreMessageInfo(mi)
  115. }
  116. }
  117. func (x *FieldInfo) String() string {
  118. return protoimpl.X.MessageStringOf(x)
  119. }
  120. func (*FieldInfo) ProtoMessage() {}
  121. func (x *FieldInfo) ProtoReflect() protoreflect.Message {
  122. mi := &file_google_api_field_info_proto_msgTypes[0]
  123. if protoimpl.UnsafeEnabled && x != nil {
  124. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  125. if ms.LoadMessageInfo() == nil {
  126. ms.StoreMessageInfo(mi)
  127. }
  128. return ms
  129. }
  130. return mi.MessageOf(x)
  131. }
  132. // Deprecated: Use FieldInfo.ProtoReflect.Descriptor instead.
  133. func (*FieldInfo) Descriptor() ([]byte, []int) {
  134. return file_google_api_field_info_proto_rawDescGZIP(), []int{0}
  135. }
  136. func (x *FieldInfo) GetFormat() FieldInfo_Format {
  137. if x != nil {
  138. return x.Format
  139. }
  140. return FieldInfo_FORMAT_UNSPECIFIED
  141. }
  142. var file_google_api_field_info_proto_extTypes = []protoimpl.ExtensionInfo{
  143. {
  144. ExtendedType: (*descriptorpb.FieldOptions)(nil),
  145. ExtensionType: (*FieldInfo)(nil),
  146. Field: 291403980,
  147. Name: "google.api.field_info",
  148. Tag: "bytes,291403980,opt,name=field_info",
  149. Filename: "google/api/field_info.proto",
  150. },
  151. }
  152. // Extension fields to descriptorpb.FieldOptions.
  153. var (
  154. // Rich semantic descriptor of an API field beyond the basic typing.
  155. //
  156. // Examples:
  157. //
  158. // string request_id = 1 [(google.api.field_info).format = UUID4];
  159. // string old_ip_address = 2 [(google.api.field_info).format = IPV4];
  160. // string new_ip_address = 3 [(google.api.field_info).format = IPV6];
  161. // string actual_ip_address = 4 [
  162. // (google.api.field_info).format = IPV4_OR_IPV6
  163. // ];
  164. //
  165. // optional google.api.FieldInfo field_info = 291403980;
  166. E_FieldInfo = &file_google_api_field_info_proto_extTypes[0]
  167. )
  168. var File_google_api_field_info_proto protoreflect.FileDescriptor
  169. var file_google_api_field_info_proto_rawDesc = []byte{
  170. 0x0a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65,
  171. 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67,
  172. 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
  173. 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72,
  174. 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x09,
  175. 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x34, 0x0a, 0x06, 0x66, 0x6f, 0x72,
  176. 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
  177. 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f,
  178. 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22,
  179. 0x51, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52,
  180. 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
  181. 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x55, 0x49, 0x44, 0x34, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04,
  182. 0x49, 0x50, 0x56, 0x34, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x50, 0x56, 0x36, 0x10, 0x03,
  183. 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x50, 0x56, 0x34, 0x5f, 0x4f, 0x52, 0x5f, 0x49, 0x50, 0x56, 0x36,
  184. 0x10, 0x04, 0x3a, 0x57, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
  185. 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
  186. 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
  187. 0xcc, 0xf1, 0xf9, 0x8a, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
  188. 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f,
  189. 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x6c, 0x0a, 0x0e, 0x63,
  190. 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0e, 0x46,
  191. 0x69, 0x65, 0x6c, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
  192. 0x41, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f,
  193. 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67,
  194. 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
  195. 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3b, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
  196. 0x6e, 0x73, 0xa2, 0x02, 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  197. 0x33,
  198. }
  199. var (
  200. file_google_api_field_info_proto_rawDescOnce sync.Once
  201. file_google_api_field_info_proto_rawDescData = file_google_api_field_info_proto_rawDesc
  202. )
  203. func file_google_api_field_info_proto_rawDescGZIP() []byte {
  204. file_google_api_field_info_proto_rawDescOnce.Do(func() {
  205. file_google_api_field_info_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_field_info_proto_rawDescData)
  206. })
  207. return file_google_api_field_info_proto_rawDescData
  208. }
  209. var file_google_api_field_info_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  210. var file_google_api_field_info_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  211. var file_google_api_field_info_proto_goTypes = []interface{}{
  212. (FieldInfo_Format)(0), // 0: google.api.FieldInfo.Format
  213. (*FieldInfo)(nil), // 1: google.api.FieldInfo
  214. (*descriptorpb.FieldOptions)(nil), // 2: google.protobuf.FieldOptions
  215. }
  216. var file_google_api_field_info_proto_depIdxs = []int32{
  217. 0, // 0: google.api.FieldInfo.format:type_name -> google.api.FieldInfo.Format
  218. 2, // 1: google.api.field_info:extendee -> google.protobuf.FieldOptions
  219. 1, // 2: google.api.field_info:type_name -> google.api.FieldInfo
  220. 3, // [3:3] is the sub-list for method output_type
  221. 3, // [3:3] is the sub-list for method input_type
  222. 2, // [2:3] is the sub-list for extension type_name
  223. 1, // [1:2] is the sub-list for extension extendee
  224. 0, // [0:1] is the sub-list for field type_name
  225. }
  226. func init() { file_google_api_field_info_proto_init() }
  227. func file_google_api_field_info_proto_init() {
  228. if File_google_api_field_info_proto != nil {
  229. return
  230. }
  231. if !protoimpl.UnsafeEnabled {
  232. file_google_api_field_info_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  233. switch v := v.(*FieldInfo); i {
  234. case 0:
  235. return &v.state
  236. case 1:
  237. return &v.sizeCache
  238. case 2:
  239. return &v.unknownFields
  240. default:
  241. return nil
  242. }
  243. }
  244. }
  245. type x struct{}
  246. out := protoimpl.TypeBuilder{
  247. File: protoimpl.DescBuilder{
  248. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  249. RawDescriptor: file_google_api_field_info_proto_rawDesc,
  250. NumEnums: 1,
  251. NumMessages: 1,
  252. NumExtensions: 1,
  253. NumServices: 0,
  254. },
  255. GoTypes: file_google_api_field_info_proto_goTypes,
  256. DependencyIndexes: file_google_api_field_info_proto_depIdxs,
  257. EnumInfos: file_google_api_field_info_proto_enumTypes,
  258. MessageInfos: file_google_api_field_info_proto_msgTypes,
  259. ExtensionInfos: file_google_api_field_info_proto_extTypes,
  260. }.Build()
  261. File_google_api_field_info_proto = out.File
  262. file_google_api_field_info_proto_rawDesc = nil
  263. file_google_api_field_info_proto_goTypes = nil
  264. file_google_api_field_info_proto_depIdxs = nil
  265. }