Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 52d356a

Browse files
akoserwalgithub-actions[bot]
authored andcommitted
Sync updated proto files
1 parent a400efb commit 52d356a

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/main/proto/kessel/inventory/v1beta2/report_resource_request.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ message ReportResourceRequest {
2323
// Used to:
2424
// - Select the appropriate schema to validate the *Reporter Representation*
2525
// - Identify a *Reporter's Representation* uniquely in Kessel Inventory
26-
string type = 2 [(buf.validate.field).string = {min_len: 1}];
26+
string type = 2 [(buf.validate.field).string = {min_len: 1}, (buf.validate.field).string.pattern = "^[A-Za-z0-9_-]+$"];
2727
// The type of the *Reporter* (e.g., "hbi", "acm", "acs", "notifications").
2828
//
2929
// Must be a previously agreed-upon value between the *Reporter* and Kessel Inventory.
3030
// Must be consistent across all *Reporter Representations* reported by a given *Reporter*.
3131
// Used to:
3232
// - Select the appropriate schema to validate the *Reporter Representation*
3333
// - Identify a *Reporter's Representation* uniquely in Kessel Inventory
34-
string reporter_type = 3 [(buf.validate.field).string = {min_len: 1}];
34+
string reporter_type = 3 [(buf.validate.field).string = {min_len: 1}, (buf.validate.field).string.pattern = "^[A-Za-z0-9_-]+$"];
3535
// Identifier for the specific instance of the *Reporter*.
3636
// This may not be applicable to all Reporters
3737
//
@@ -47,4 +47,6 @@ message ReportResourceRequest {
4747
// Use `IMMEDIATE` only if your use case requires strong consistency guarantees
4848
// (e.g., writing and immediately checking access to the resource).
4949
WriteVisibility write_visibility = 6 [(buf.validate.field).enum.defined_only = true];
50+
//Temporary flag for easy testing
51+
bool use_new = 7;
5052
}

src/main/proto/kessel/inventory/v1beta2/reporter_reference.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ option java_multiple_files = true;
99
option java_package = "org.project_kessel.api.inventory.v1beta2";
1010

1111
message ReporterReference {
12-
string type = 1 [(buf.validate.field).string.min_len = 1];
13-
optional string instance_id = 2;
12+
string type = 1 [(buf.validate.field).string.min_len = 1, (buf.validate.field).string.pattern = "^[A-Za-z0-9_]+$"];
13+
optional string instance_id = 2 [(buf.validate.field).string.pattern = "^[A-Za-z0-9_]+$"];
1414
}

src/main/proto/kessel/inventory/v1beta2/representation_type.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ option java_multiple_files = true;
99
option java_package = "org.project_kessel.api.inventory.v1beta2";
1010

1111
message RepresentationType {
12-
string resource_type = 1 [(buf.validate.field).string.min_len = 1];
13-
optional string reporter_type = 2;
12+
string resource_type = 1 [(buf.validate.field).string.min_len = 1, (buf.validate.field).string.pattern = "^[A-Za-z0-9_]+$"];
13+
optional string reporter_type = 2 [(buf.validate.field).string.pattern = "^[A-Za-z0-9_]+$"];
1414
}

src/main/proto/kessel/inventory/v1beta2/resource_reference.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ option java_multiple_files = true;
1111
option java_package = "org.project_kessel.api.inventory.v1beta2";// A reference to a Subject or, if a `relation` is provided, a Subject Set.
1212

1313
message ResourceReference {
14-
string resource_type = 1 [(buf.validate.field).required = true];
14+
string resource_type = 1 [(buf.validate.field).string.min_len = 1, (buf.validate.field).string.pattern = "^[A-Za-z0-9_]+$"];
1515
string resource_id = 2 [(buf.validate.field).string.min_len = 1];
1616
optional ReporterReference reporter = 3;
1717
}

0 commit comments

Comments
 (0)