test: Add name to test plan unit.

Naming units will be useful for explaining plan execution
to the user.

BUG=chromium:1063474
TEST=./generate.sh

Change-Id: If5296700e9e27e2019705bc80f19d0e93c19b793
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2111111
Reviewed-by: Alex Zamorzaev <zamorzaev@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/go/test/plan/v1/plan.pb.go b/go/test/plan/v1/plan.pb.go
index 291ec16..50a9093 100644
--- a/go/test/plan/v1/plan.pb.go
+++ b/go/test/plan/v1/plan.pb.go
@@ -83,11 +83,15 @@
 
 // Specifies a particular set of tests to be run to meet specific conditions.
 type Unit struct {
+	// A test plan unit name, unique within a plan.
+	//
+	// Must be valid resource name per https://aip.dev/122.
+	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
 	// Selects tests to include in this test plan unit.
-	TestCondition *TestCondition `protobuf:"bytes,1,opt,name=test_condition,json=testCondition,proto3" json:"test_condition,omitempty"`
+	TestCondition *TestCondition `protobuf:"bytes,2,opt,name=test_condition,json=testCondition,proto3" json:"test_condition,omitempty"`
 	// Selects the set of Devices Under Test that tests must be run on to satisfy
 	// this test plan unit.
-	DutCoverageCondition *DUTCoverageCondition `protobuf:"bytes,2,opt,name=dut_coverage_condition,json=dutCoverageCondition,proto3" json:"dut_coverage_condition,omitempty"`
+	DutCoverageCondition *DUTCoverageCondition `protobuf:"bytes,3,opt,name=dut_coverage_condition,json=dutCoverageCondition,proto3" json:"dut_coverage_condition,omitempty"`
 	// Chrome OS platform software covered by this test plan.
 	//
 	// Test Platform requests may optionally include a reference to platform
@@ -102,7 +106,7 @@
 	// For a test plan unit with no `code_coverage` specified, Test Platform must
 	// assume coverage of all platform software (i.e., this test plan unit must
 	// never be skipped for code coverage considerations).
-	CodeCoverage         *CodeCoverage `protobuf:"bytes,3,opt,name=code_coverage,json=codeCoverage,proto3" json:"code_coverage,omitempty"`
+	CodeCoverage         *CodeCoverage `protobuf:"bytes,4,opt,name=code_coverage,json=codeCoverage,proto3" json:"code_coverage,omitempty"`
 	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
 	XXX_unrecognized     []byte        `json:"-"`
 	XXX_sizecache        int32         `json:"-"`
@@ -133,6 +137,13 @@
 
 var xxx_messageInfo_Unit proto.InternalMessageInfo
 
+func (m *Unit) GetName() string {
+	if m != nil {
+		return m.Name
+	}
+	return ""
+}
+
 func (m *Unit) GetTestCondition() *TestCondition {
 	if m != nil {
 		return m.TestCondition
@@ -654,37 +665,37 @@
 func init() { proto.RegisterFile("test/plan/v1/plan.proto", fileDescriptor_1a74b4d4119f628f) }
 
 var fileDescriptor_1a74b4d4119f628f = []byte{
-	// 503 bytes of a gzipped FileDescriptorProto
+	// 512 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xd1, 0x6a, 0xdb, 0x30,
-	0x14, 0xc5, 0x4d, 0x9a, 0xcd, 0x6a, 0x52, 0x8a, 0x16, 0x36, 0xe3, 0xc2, 0x08, 0x66, 0x83, 0x8c,
-	0x6d, 0x36, 0x4d, 0xd9, 0xf3, 0x46, 0xe3, 0x97, 0xbd, 0x15, 0x35, 0x81, 0xb1, 0x97, 0x20, 0x5b,
-	0x5a, 0x6a, 0xb0, 0x25, 0x23, 0xc9, 0x66, 0x9f, 0xb1, 0x0f, 0xd9, 0x57, 0xec, 0x5f, 0xf6, 0x1f,
-	0x43, 0xd7, 0x76, 0x6a, 0xaf, 0x85, 0x3c, 0xd9, 0xf7, 0xde, 0x73, 0x8e, 0xee, 0xd5, 0xb9, 0x42,
-	0xaf, 0x0c, 0xd7, 0x26, 0x2a, 0x73, 0x2a, 0xa2, 0xfa, 0x0a, 0xbe, 0x61, 0xa9, 0xa4, 0x91, 0x78,
-	0x6a, 0x0b, 0x21, 0x24, 0xea, 0x2b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x43, 0x6c, 0xff,
+	0x8d, 0x25, 0xa2, 0xb5, 0xcc, 0x92, 0x4a, 0x33, 0xe5, 0xf7, 0xe6, 0x3d, 0x63, 0xe9, 0x1e, 0x09,
+	0xfe, 0x7a, 0x30, 0x7d, 0xea, 0xd2, 0x8e, 0xf6, 0xf2, 0xfb, 0xd0, 0xcb, 0x17, 0xe8, 0xd3, 0x4a,
+	0x2b, 0xdf, 0xb3, 0xcb, 0xf2, 0xe1, 0xf8, 0x40, 0x42, 0x5b, 0x67, 0x52, 0xd8, 0x56, 0xce, 0x08,
+	0xf4, 0xe2, 0xcd, 0x1a, 0xbd, 0x87, 0x81, 0xdb, 0x66, 0x7b, 0xdc, 0x68, 0xf9, 0xc2, 0x49, 0xb9,
+	0x45, 0x0f, 0x63, 0x9b, 0xc2, 0x7b, 0x0a, 0xfa, 0x08, 0xcf, 0x72, 0x92, 0x6c, 0x69, 0xa5, 0xf7,
+	0x5b, 0x35, 0x0d, 0x73, 0x92, 0xec, 0x59, 0x1b, 0x4e, 0x99, 0x34, 0x37, 0x83, 0x07, 0x39, 0x49,
+	0xe2, 0x4a, 0x07, 0x6b, 0x18, 0xb7, 0x47, 0x79, 0xb4, 0xbd, 0x37, 0x4d, 0x77, 0x17, 0x30, 0x54,
+	0x32, 0xdd, 0x96, 0x44, 0xdf, 0xb9, 0x16, 0x87, 0xf8, 0xb9, 0x92, 0xe9, 0x8d, 0x89, 0xaf, 0x3f,
+	0x7d, 0xbf, 0xda, 0x89, 0x30, 0xbd, 0x93, 0xa2, 0xc8, 0xaa, 0x22, 0x14, 0x72, 0x17, 0x35, 0x81,
+	0x50, 0x51, 0xc6, 0x7f, 0x48, 0x12, 0xd9, 0xe7, 0x16, 0xed, 0x44, 0x74, 0x78, 0xee, 0xc9, 0xc0,
+	0x62, 0x57, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x94, 0xcf, 0x44, 0xa2, 0x02, 0x04, 0x00, 0x00,
 }
diff --git a/src/test/plan/v1/plan.proto b/src/test/plan/v1/plan.proto
index bb87572..f8838a2 100644
--- a/src/test/plan/v1/plan.proto
+++ b/src/test/plan/v1/plan.proto
@@ -31,12 +31,17 @@
 
 // Specifies a particular set of tests to be run to meet specific conditions.
 message Unit {
+  // A test plan unit name, unique within a plan.
+  //
+  // Must be valid resource name per https://aip.dev/122.
+  string name = 1;
+
   // Selects tests to include in this test plan unit.
-  TestCondition test_condition = 1;
+  TestCondition test_condition = 2;
 
   // Selects the set of Devices Under Test that tests must be run on to satisfy
   // this test plan unit.
-  DUTCoverageCondition dut_coverage_condition = 2;
+  DUTCoverageCondition dut_coverage_condition = 3;
 
   // Chrome OS platform software covered by this test plan.
   //
@@ -52,7 +57,7 @@
   // For a test plan unit with no `code_coverage` specified, Test Platform must
   // assume coverage of all platform software (i.e., this test plan unit must
   // never be skipped for code coverage considerations).
-  CodeCoverage code_coverage = 3;
+  CodeCoverage code_coverage = 4;
 }
 
 // Selects the test.metadata.Test to include in a test plan unit.