1syntax = "proto3";
2
3package xds.core.v3;
4
5import "google/protobuf/any.proto";
6
7import "udpa/annotations/status.proto";
8import "xds/core/v3/resource_locator.proto";
9
10import "validate/validate.proto";
11
12option java_outer_classname = "CollectionEntryProto";
13option java_multiple_files = true;
14option java_package = "com.github.udpa.xds.core.v3";
15
16option (udpa.annotations.file_status).work_in_progress = true;
17
18// xDS collection resource wrapper. This encapsulates a xDS resource when
19// appearing inside a list collection resource. List collection resources are
20// regular Resource messages of type:
21//
22// message <T>Collection {
23//   repeated CollectionEntry resources = 1;
24// }
25//
26message CollectionEntry {
27  // Inlined resource entry.
28  message InlineEntry {
29    // Optional name to describe the inlined resource. Resource names must
30    // [a-zA-Z0-9_-\./]+ (TODO(htuch): turn this into a PGV constraint once
31    // finalized, probably should be a RFC3986 pchar). This name allows
32    // reference via the #entry directive in ResourceLocator.
33    string name = 1 [(validate.rules).string.pattern = "^[0-9a-zA-Z_\\-\\.~:]+$"];
34
35    // The resource's logical version. It is illegal to have the same named xDS
36    // resource name at a given version with different resource payloads.
37    string version = 2;
38
39    // The resource payload, including type URL.
40    google.protobuf.Any resource = 3;
41  }
42
43  oneof resource_specifier {
44    option (validate.required) = true;
45
46    // A resource locator describing how the member resource is to be located.
47    ResourceLocator locator = 1;
48
49    // The resource is inlined in the list collection.
50    InlineEntry inline_entry = 2;
51  }
52}
53