1syntax = "proto3";
2
3package xds.annotations.v3;
4
5import "google/protobuf/descriptor.proto";
6
7option go_package = "github.com/cncf/xds/go/xds/annotations/v3";
8
9// Magic number in this file derived from top 28bit of SHA256 digest of
10// "xds.annotation.v3.migrate".
11extend google.protobuf.MessageOptions {
12  MigrateAnnotation message_migrate = 112948430;
13}
14extend google.protobuf.FieldOptions {
15  FieldMigrateAnnotation field_migrate = 112948430;
16}
17extend google.protobuf.EnumOptions {
18  MigrateAnnotation enum_migrate = 112948430;
19}
20extend google.protobuf.EnumValueOptions {
21  MigrateAnnotation enum_value_migrate = 112948430;
22}
23extend google.protobuf.FileOptions {
24  FileMigrateAnnotation file_migrate = 112948430;
25}
26
27message MigrateAnnotation {
28  // Rename the message/enum/enum value in next version.
29  string rename = 1;
30}
31
32message FieldMigrateAnnotation {
33  // Rename the field in next version.
34  string rename = 1;
35
36  // Add the field to a named oneof in next version. If this already exists, the
37  // field will join its siblings under the oneof, otherwise a new oneof will be
38  // created with the given name.
39  string oneof_promotion = 2;
40}
41
42message FileMigrateAnnotation {
43  // Move all types in the file to another package, this implies changing proto
44  // file path.
45  string move_to_package = 2;
46}
47