Skip to content

Commit af2a884

Browse files
committed
Add field_info.proto
1 parent ee334a9 commit af2a884

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
syntax = "proto3";
2+
3+
package aep.api;
4+
5+
option go_package = "aep.golang.org/genproto/common-components/type/api;field_info";
6+
option java_multiple_files = true;
7+
option java_outer_classname = "FieldInfoProto";
8+
option java_package = "dev.aep.api";
9+
option objc_class_prefix = "AEP";
10+
11+
// Rich semantic information of an API field beyond basic typing.
12+
message FieldInfo {
13+
// The standard format of a field value. The supported formats are all backed
14+
// by either an RFC defined by the IETF or a Google-defined AIP.
15+
enum Format {
16+
// Default, unspecified value.
17+
FORMAT_UNSPECIFIED = 0;
18+
19+
// Universally Unique Identifier, version 4, value as defined by
20+
// https://datatracker.ietf.org/doc/html/rfc4122. The value may be
21+
// normalized to entirely lowercase letters. For example, the value
22+
// `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to
23+
// `f47ac10b-58cc-0372-8567-0e02b2c3d479`.
24+
UUID4 = 1;
25+
26+
// Internet Protocol v4 value as defined by [RFC
27+
// 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be
28+
// condensed, with leading zeros in each octet stripped. For example,
29+
// `001.022.233.040` would be condensed to `1.22.233.40`.
30+
IPV4 = 2;
31+
32+
// Internet Protocol v6 value as defined by [RFC
33+
// 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be
34+
// normalized to entirely lowercase letters with zeros compressed, following
35+
// [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example,
36+
// the value `2001:0DB8:0::0` would be normalized to `2001:db8::`.
37+
IPV6 = 3;
38+
39+
// An IP address in either v4 or v6 format as described by the individual
40+
// values defined herein. See the comments on the IPV4 and IPV6 types for
41+
// allowed normalizations of each.
42+
IPV4_OR_IPV6 = 4;
43+
}
44+
45+
// The standard format of a field value. This does not explicitly configure
46+
// any API consumer, just documents the API's format for the field it is
47+
// applied to.
48+
Format format = 1;
49+
}

0 commit comments

Comments
 (0)