diff --git a/android/Android.bp b/android/Android.bp
index 5d0f2b9..1bccd7b 100644
--- a/android/Android.bp
+++ b/android/Android.bp
@@ -17,6 +17,8 @@
         "soong-response",
         "soong-shared",
         "soong-ui-metrics_proto",
+        "golang-protobuf-proto",
+        "golang-protobuf-encoding-prototext",
     ],
     srcs: [
         "androidmk.go",
diff --git a/android/metrics.go b/android/metrics.go
index b7aee54..2cd5efa 100644
--- a/android/metrics.go
+++ b/android/metrics.go
@@ -18,7 +18,7 @@
 	"io/ioutil"
 	"runtime"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/proto"
 
 	soong_metrics_proto "android/soong/ui/metrics/metrics_proto"
 )
diff --git a/android/rule_builder.go b/android/rule_builder.go
index 2507c4c..6605869 100644
--- a/android/rule_builder.go
+++ b/android/rule_builder.go
@@ -22,9 +22,10 @@
 	"strings"
 	"testing"
 
-	"github.com/golang/protobuf/proto"
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/proptools"
+	"google.golang.org/protobuf/encoding/prototext"
+	"google.golang.org/protobuf/proto"
 
 	"android/soong/cmd/sbox/sbox_proto"
 	"android/soong/remoteexec"
@@ -621,7 +622,11 @@
 		}
 
 		// Create a rule to write the manifest as a the textproto.
-		WriteFileRule(r.ctx, r.sboxManifestPath, proto.MarshalTextString(&manifest))
+		pbText, err := prototext.Marshal(&manifest)
+		if err != nil {
+			ReportPathErrorf(r.ctx, "sbox manifest failed to marshal: %q", err)
+		}
+		WriteFileRule(r.ctx, r.sboxManifestPath, string(pbText))
 
 		// Generate a new string to use as the command line of the sbox rule.  This uses
 		// a RuleBuilderCommand as a convenience method of building the command line, then
@@ -1266,7 +1271,7 @@
 	t.Helper()
 	content := ContentFromFileRuleForTests(t, params)
 	manifest := sbox_proto.Manifest{}
-	err := proto.UnmarshalText(content, &manifest)
+	err := prototext.Unmarshal([]byte(content), &manifest)
 	if err != nil {
 		t.Fatalf("failed to unmarshal manifest: %s", err.Error())
 	}
diff --git a/cmd/extract_apks/Android.bp b/cmd/extract_apks/Android.bp
index 8a4ed63..21064c0 100644
--- a/cmd/extract_apks/Android.bp
+++ b/cmd/extract_apks/Android.bp
@@ -8,6 +8,7 @@
     deps: [
         "android-archive-zip",
         "golang-protobuf-proto",
+        "golang-protobuf-encoding-prototext",
         "soong-cmd-extract_apks-proto",
     ],
     testSrcs: ["main_test.go"],
@@ -16,7 +17,10 @@
 bootstrap_go_package {
     name: "soong-cmd-extract_apks-proto",
     pkgPath: "android/soong/cmd/extract_apks/bundle_proto",
-    deps: ["golang-protobuf-proto"],
+    deps: [
+        "golang-protobuf-reflect-protoreflect",
+        "golang-protobuf-runtime-protoimpl",
+    ],
     srcs: [
         "bundle_proto/commands.pb.go",
         "bundle_proto/config.pb.go",
diff --git a/cmd/extract_apks/bundle_proto/commands.pb.go b/cmd/extract_apks/bundle_proto/commands.pb.go
index bbf3314..2cf8e6d 100644
--- a/cmd/extract_apks/bundle_proto/commands.pb.go
+++ b/cmd/extract_apks/bundle_proto/commands.pb.go
@@ -1,24 +1,29 @@
+// Messages describing APK Set's table of contents (toc.pb entry).
+// Please be advised that the ultimate source is at
+// https://github.com/google/bundletool/tree/master/src/main/proto
+// so you have been warned.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: commands.proto
 
-package android_bundle_proto
+package bundle_proto
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 type DeliveryType int32
 
@@ -29,26 +34,47 @@
 	DeliveryType_FAST_FOLLOW           DeliveryType = 3
 )
 
-var DeliveryType_name = map[int32]string{
-	0: "UNKNOWN_DELIVERY_TYPE",
-	1: "INSTALL_TIME",
-	2: "ON_DEMAND",
-	3: "FAST_FOLLOW",
-}
+// Enum value maps for DeliveryType.
+var (
+	DeliveryType_name = map[int32]string{
+		0: "UNKNOWN_DELIVERY_TYPE",
+		1: "INSTALL_TIME",
+		2: "ON_DEMAND",
+		3: "FAST_FOLLOW",
+	}
+	DeliveryType_value = map[string]int32{
+		"UNKNOWN_DELIVERY_TYPE": 0,
+		"INSTALL_TIME":          1,
+		"ON_DEMAND":             2,
+		"FAST_FOLLOW":           3,
+	}
+)
 
-var DeliveryType_value = map[string]int32{
-	"UNKNOWN_DELIVERY_TYPE": 0,
-	"INSTALL_TIME":          1,
-	"ON_DEMAND":             2,
-	"FAST_FOLLOW":           3,
+func (x DeliveryType) Enum() *DeliveryType {
+	p := new(DeliveryType)
+	*p = x
+	return p
 }
 
 func (x DeliveryType) String() string {
-	return proto.EnumName(DeliveryType_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
+func (DeliveryType) Descriptor() protoreflect.EnumDescriptor {
+	return file_commands_proto_enumTypes[0].Descriptor()
+}
+
+func (DeliveryType) Type() protoreflect.EnumType {
+	return &file_commands_proto_enumTypes[0]
+}
+
+func (x DeliveryType) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use DeliveryType.Descriptor instead.
 func (DeliveryType) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{0}
+	return file_commands_proto_rawDescGZIP(), []int{0}
 }
 
 type SystemApkMetadata_SystemApkType int32
@@ -64,30 +90,55 @@
 	SystemApkMetadata_SYSTEM_COMPRESSED SystemApkMetadata_SystemApkType = 3
 )
 
-var SystemApkMetadata_SystemApkType_name = map[int32]string{
-	0: "UNSPECIFIED_VALUE",
-	1: "SYSTEM",
-	2: "SYSTEM_STUB",
-	3: "SYSTEM_COMPRESSED",
-}
+// Enum value maps for SystemApkMetadata_SystemApkType.
+var (
+	SystemApkMetadata_SystemApkType_name = map[int32]string{
+		0: "UNSPECIFIED_VALUE",
+		1: "SYSTEM",
+		2: "SYSTEM_STUB",
+		3: "SYSTEM_COMPRESSED",
+	}
+	SystemApkMetadata_SystemApkType_value = map[string]int32{
+		"UNSPECIFIED_VALUE": 0,
+		"SYSTEM":            1,
+		"SYSTEM_STUB":       2,
+		"SYSTEM_COMPRESSED": 3,
+	}
+)
 
-var SystemApkMetadata_SystemApkType_value = map[string]int32{
-	"UNSPECIFIED_VALUE": 0,
-	"SYSTEM":            1,
-	"SYSTEM_STUB":       2,
-	"SYSTEM_COMPRESSED": 3,
+func (x SystemApkMetadata_SystemApkType) Enum() *SystemApkMetadata_SystemApkType {
+	p := new(SystemApkMetadata_SystemApkType)
+	*p = x
+	return p
 }
 
 func (x SystemApkMetadata_SystemApkType) String() string {
-	return proto.EnumName(SystemApkMetadata_SystemApkType_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
+func (SystemApkMetadata_SystemApkType) Descriptor() protoreflect.EnumDescriptor {
+	return file_commands_proto_enumTypes[1].Descriptor()
+}
+
+func (SystemApkMetadata_SystemApkType) Type() protoreflect.EnumType {
+	return &file_commands_proto_enumTypes[1]
+}
+
+func (x SystemApkMetadata_SystemApkType) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SystemApkMetadata_SystemApkType.Descriptor instead.
 func (SystemApkMetadata_SystemApkType) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{10, 0}
+	return file_commands_proto_rawDescGZIP(), []int{10, 0}
 }
 
 // Describes the output of the "build-apks" command.
 type BuildApksResult struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The package name of this app.
 	PackageName string `protobuf:"bytes,4,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
 	// List of the created variants.
@@ -97,68 +148,72 @@
 	// List of the created asset slices.
 	AssetSliceSet []*AssetSliceSet `protobuf:"bytes,3,rep,name=asset_slice_set,json=assetSliceSet,proto3" json:"asset_slice_set,omitempty"`
 	// Information about local testing mode.
-	LocalTestingInfo     *LocalTestingInfo `protobuf:"bytes,5,opt,name=local_testing_info,json=localTestingInfo,proto3" json:"local_testing_info,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
-	XXX_unrecognized     []byte            `json:"-"`
-	XXX_sizecache        int32             `json:"-"`
+	LocalTestingInfo *LocalTestingInfo `protobuf:"bytes,5,opt,name=local_testing_info,json=localTestingInfo,proto3" json:"local_testing_info,omitempty"`
 }
 
-func (m *BuildApksResult) Reset()         { *m = BuildApksResult{} }
-func (m *BuildApksResult) String() string { return proto.CompactTextString(m) }
-func (*BuildApksResult) ProtoMessage()    {}
+func (x *BuildApksResult) Reset() {
+	*x = BuildApksResult{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BuildApksResult) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BuildApksResult) ProtoMessage() {}
+
+func (x *BuildApksResult) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use BuildApksResult.ProtoReflect.Descriptor instead.
 func (*BuildApksResult) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{0}
+	return file_commands_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *BuildApksResult) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_BuildApksResult.Unmarshal(m, b)
-}
-func (m *BuildApksResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_BuildApksResult.Marshal(b, m, deterministic)
-}
-func (m *BuildApksResult) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BuildApksResult.Merge(m, src)
-}
-func (m *BuildApksResult) XXX_Size() int {
-	return xxx_messageInfo_BuildApksResult.Size(m)
-}
-func (m *BuildApksResult) XXX_DiscardUnknown() {
-	xxx_messageInfo_BuildApksResult.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BuildApksResult proto.InternalMessageInfo
-
-func (m *BuildApksResult) GetPackageName() string {
-	if m != nil {
-		return m.PackageName
+func (x *BuildApksResult) GetPackageName() string {
+	if x != nil {
+		return x.PackageName
 	}
 	return ""
 }
 
-func (m *BuildApksResult) GetVariant() []*Variant {
-	if m != nil {
-		return m.Variant
+func (x *BuildApksResult) GetVariant() []*Variant {
+	if x != nil {
+		return x.Variant
 	}
 	return nil
 }
 
-func (m *BuildApksResult) GetBundletool() *Bundletool {
-	if m != nil {
-		return m.Bundletool
+func (x *BuildApksResult) GetBundletool() *Bundletool {
+	if x != nil {
+		return x.Bundletool
 	}
 	return nil
 }
 
-func (m *BuildApksResult) GetAssetSliceSet() []*AssetSliceSet {
-	if m != nil {
-		return m.AssetSliceSet
+func (x *BuildApksResult) GetAssetSliceSet() []*AssetSliceSet {
+	if x != nil {
+		return x.AssetSliceSet
 	}
 	return nil
 }
 
-func (m *BuildApksResult) GetLocalTestingInfo() *LocalTestingInfo {
-	if m != nil {
-		return m.LocalTestingInfo
+func (x *BuildApksResult) GetLocalTestingInfo() *LocalTestingInfo {
+	if x != nil {
+		return x.LocalTestingInfo
 	}
 	return nil
 }
@@ -166,6 +221,10 @@
 // Variant is a group of APKs that covers a part of the device configuration
 // space. APKs from multiple variants are never combined on one device.
 type Variant struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Variant-level targeting.
 	// This targeting is fairly high-level and each APK has its own targeting as
 	// well.
@@ -176,54 +235,58 @@
 	// A device will receive APKs from the first variant that matches the device
 	// configuration, with higher variant numbers having priority over lower
 	// variant numbers.
-	VariantNumber        uint32   `protobuf:"varint,3,opt,name=variant_number,json=variantNumber,proto3" json:"variant_number,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	VariantNumber uint32 `protobuf:"varint,3,opt,name=variant_number,json=variantNumber,proto3" json:"variant_number,omitempty"`
 }
 
-func (m *Variant) Reset()         { *m = Variant{} }
-func (m *Variant) String() string { return proto.CompactTextString(m) }
-func (*Variant) ProtoMessage()    {}
+func (x *Variant) Reset() {
+	*x = Variant{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Variant) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Variant) ProtoMessage() {}
+
+func (x *Variant) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Variant.ProtoReflect.Descriptor instead.
 func (*Variant) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{1}
+	return file_commands_proto_rawDescGZIP(), []int{1}
 }
 
-func (m *Variant) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Variant.Unmarshal(m, b)
-}
-func (m *Variant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Variant.Marshal(b, m, deterministic)
-}
-func (m *Variant) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Variant.Merge(m, src)
-}
-func (m *Variant) XXX_Size() int {
-	return xxx_messageInfo_Variant.Size(m)
-}
-func (m *Variant) XXX_DiscardUnknown() {
-	xxx_messageInfo_Variant.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Variant proto.InternalMessageInfo
-
-func (m *Variant) GetTargeting() *VariantTargeting {
-	if m != nil {
-		return m.Targeting
+func (x *Variant) GetTargeting() *VariantTargeting {
+	if x != nil {
+		return x.Targeting
 	}
 	return nil
 }
 
-func (m *Variant) GetApkSet() []*ApkSet {
-	if m != nil {
-		return m.ApkSet
+func (x *Variant) GetApkSet() []*ApkSet {
+	if x != nil {
+		return x.ApkSet
 	}
 	return nil
 }
 
-func (m *Variant) GetVariantNumber() uint32 {
-	if m != nil {
-		return m.VariantNumber
+func (x *Variant) GetVariantNumber() uint32 {
+	if x != nil {
+		return x.VariantNumber
 	}
 	return 0
 }
@@ -231,54 +294,66 @@
 // Represents a module.
 // For pre-L devices multiple modules (possibly all) may be merged into one.
 type ApkSet struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	ModuleMetadata *ModuleMetadata `protobuf:"bytes,1,opt,name=module_metadata,json=moduleMetadata,proto3" json:"module_metadata,omitempty"`
 	// APKs.
-	ApkDescription       []*ApkDescription `protobuf:"bytes,2,rep,name=apk_description,json=apkDescription,proto3" json:"apk_description,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
-	XXX_unrecognized     []byte            `json:"-"`
-	XXX_sizecache        int32             `json:"-"`
+	ApkDescription []*ApkDescription `protobuf:"bytes,2,rep,name=apk_description,json=apkDescription,proto3" json:"apk_description,omitempty"`
 }
 
-func (m *ApkSet) Reset()         { *m = ApkSet{} }
-func (m *ApkSet) String() string { return proto.CompactTextString(m) }
-func (*ApkSet) ProtoMessage()    {}
+func (x *ApkSet) Reset() {
+	*x = ApkSet{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ApkSet) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ApkSet) ProtoMessage() {}
+
+func (x *ApkSet) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ApkSet.ProtoReflect.Descriptor instead.
 func (*ApkSet) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{2}
+	return file_commands_proto_rawDescGZIP(), []int{2}
 }
 
-func (m *ApkSet) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ApkSet.Unmarshal(m, b)
-}
-func (m *ApkSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ApkSet.Marshal(b, m, deterministic)
-}
-func (m *ApkSet) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ApkSet.Merge(m, src)
-}
-func (m *ApkSet) XXX_Size() int {
-	return xxx_messageInfo_ApkSet.Size(m)
-}
-func (m *ApkSet) XXX_DiscardUnknown() {
-	xxx_messageInfo_ApkSet.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ApkSet proto.InternalMessageInfo
-
-func (m *ApkSet) GetModuleMetadata() *ModuleMetadata {
-	if m != nil {
-		return m.ModuleMetadata
+func (x *ApkSet) GetModuleMetadata() *ModuleMetadata {
+	if x != nil {
+		return x.ModuleMetadata
 	}
 	return nil
 }
 
-func (m *ApkSet) GetApkDescription() []*ApkDescription {
-	if m != nil {
-		return m.ApkDescription
+func (x *ApkSet) GetApkDescription() []*ApkDescription {
+	if x != nil {
+		return x.ApkDescription
 	}
 	return nil
 }
 
 type ModuleMetadata struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Module name.
 	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
 	// Indicates the delivery type (e.g. on-demand) of the module.
@@ -292,131 +367,149 @@
 	// Relevant only for Split APKs.
 	Targeting *ModuleTargeting `protobuf:"bytes,5,opt,name=targeting,proto3" json:"targeting,omitempty"`
 	// Deprecated. Please use delivery_type.
-	OnDemandDeprecated   bool     `protobuf:"varint,2,opt,name=on_demand_deprecated,json=onDemandDeprecated,proto3" json:"on_demand_deprecated,omitempty"` // Deprecated: Do not use.
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	//
+	// Deprecated: Do not use.
+	OnDemandDeprecated bool `protobuf:"varint,2,opt,name=on_demand_deprecated,json=onDemandDeprecated,proto3" json:"on_demand_deprecated,omitempty"`
 }
 
-func (m *ModuleMetadata) Reset()         { *m = ModuleMetadata{} }
-func (m *ModuleMetadata) String() string { return proto.CompactTextString(m) }
-func (*ModuleMetadata) ProtoMessage()    {}
+func (x *ModuleMetadata) Reset() {
+	*x = ModuleMetadata{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ModuleMetadata) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModuleMetadata) ProtoMessage() {}
+
+func (x *ModuleMetadata) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ModuleMetadata.ProtoReflect.Descriptor instead.
 func (*ModuleMetadata) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{3}
+	return file_commands_proto_rawDescGZIP(), []int{3}
 }
 
-func (m *ModuleMetadata) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ModuleMetadata.Unmarshal(m, b)
-}
-func (m *ModuleMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ModuleMetadata.Marshal(b, m, deterministic)
-}
-func (m *ModuleMetadata) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ModuleMetadata.Merge(m, src)
-}
-func (m *ModuleMetadata) XXX_Size() int {
-	return xxx_messageInfo_ModuleMetadata.Size(m)
-}
-func (m *ModuleMetadata) XXX_DiscardUnknown() {
-	xxx_messageInfo_ModuleMetadata.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ModuleMetadata proto.InternalMessageInfo
-
-func (m *ModuleMetadata) GetName() string {
-	if m != nil {
-		return m.Name
+func (x *ModuleMetadata) GetName() string {
+	if x != nil {
+		return x.Name
 	}
 	return ""
 }
 
-func (m *ModuleMetadata) GetDeliveryType() DeliveryType {
-	if m != nil {
-		return m.DeliveryType
+func (x *ModuleMetadata) GetDeliveryType() DeliveryType {
+	if x != nil {
+		return x.DeliveryType
 	}
 	return DeliveryType_UNKNOWN_DELIVERY_TYPE
 }
 
-func (m *ModuleMetadata) GetIsInstant() bool {
-	if m != nil {
-		return m.IsInstant
+func (x *ModuleMetadata) GetIsInstant() bool {
+	if x != nil {
+		return x.IsInstant
 	}
 	return false
 }
 
-func (m *ModuleMetadata) GetDependencies() []string {
-	if m != nil {
-		return m.Dependencies
+func (x *ModuleMetadata) GetDependencies() []string {
+	if x != nil {
+		return x.Dependencies
 	}
 	return nil
 }
 
-func (m *ModuleMetadata) GetTargeting() *ModuleTargeting {
-	if m != nil {
-		return m.Targeting
+func (x *ModuleMetadata) GetTargeting() *ModuleTargeting {
+	if x != nil {
+		return x.Targeting
 	}
 	return nil
 }
 
 // Deprecated: Do not use.
-func (m *ModuleMetadata) GetOnDemandDeprecated() bool {
-	if m != nil {
-		return m.OnDemandDeprecated
+func (x *ModuleMetadata) GetOnDemandDeprecated() bool {
+	if x != nil {
+		return x.OnDemandDeprecated
 	}
 	return false
 }
 
 // Set of asset slices belonging to a single asset module.
 type AssetSliceSet struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Module level metadata.
 	AssetModuleMetadata *AssetModuleMetadata `protobuf:"bytes,1,opt,name=asset_module_metadata,json=assetModuleMetadata,proto3" json:"asset_module_metadata,omitempty"`
 	// Asset slices.
-	ApkDescription       []*ApkDescription `protobuf:"bytes,2,rep,name=apk_description,json=apkDescription,proto3" json:"apk_description,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
-	XXX_unrecognized     []byte            `json:"-"`
-	XXX_sizecache        int32             `json:"-"`
+	ApkDescription []*ApkDescription `protobuf:"bytes,2,rep,name=apk_description,json=apkDescription,proto3" json:"apk_description,omitempty"`
 }
 
-func (m *AssetSliceSet) Reset()         { *m = AssetSliceSet{} }
-func (m *AssetSliceSet) String() string { return proto.CompactTextString(m) }
-func (*AssetSliceSet) ProtoMessage()    {}
+func (x *AssetSliceSet) Reset() {
+	*x = AssetSliceSet{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AssetSliceSet) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AssetSliceSet) ProtoMessage() {}
+
+func (x *AssetSliceSet) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AssetSliceSet.ProtoReflect.Descriptor instead.
 func (*AssetSliceSet) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{4}
+	return file_commands_proto_rawDescGZIP(), []int{4}
 }
 
-func (m *AssetSliceSet) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_AssetSliceSet.Unmarshal(m, b)
-}
-func (m *AssetSliceSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_AssetSliceSet.Marshal(b, m, deterministic)
-}
-func (m *AssetSliceSet) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_AssetSliceSet.Merge(m, src)
-}
-func (m *AssetSliceSet) XXX_Size() int {
-	return xxx_messageInfo_AssetSliceSet.Size(m)
-}
-func (m *AssetSliceSet) XXX_DiscardUnknown() {
-	xxx_messageInfo_AssetSliceSet.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AssetSliceSet proto.InternalMessageInfo
-
-func (m *AssetSliceSet) GetAssetModuleMetadata() *AssetModuleMetadata {
-	if m != nil {
-		return m.AssetModuleMetadata
+func (x *AssetSliceSet) GetAssetModuleMetadata() *AssetModuleMetadata {
+	if x != nil {
+		return x.AssetModuleMetadata
 	}
 	return nil
 }
 
-func (m *AssetSliceSet) GetApkDescription() []*ApkDescription {
-	if m != nil {
-		return m.ApkDescription
+func (x *AssetSliceSet) GetApkDescription() []*ApkDescription {
+	if x != nil {
+		return x.ApkDescription
 	}
 	return nil
 }
 
 type AssetModuleMetadata struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Module name.
 	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
 	// Indicates the delivery type for persistent install.
@@ -424,133 +517,153 @@
 	// Metadata for instant installs.
 	InstantMetadata *InstantMetadata `protobuf:"bytes,3,opt,name=instant_metadata,json=instantMetadata,proto3" json:"instant_metadata,omitempty"`
 	// Deprecated. Use delivery_type.
-	OnDemandDeprecated   bool     `protobuf:"varint,2,opt,name=on_demand_deprecated,json=onDemandDeprecated,proto3" json:"on_demand_deprecated,omitempty"` // Deprecated: Do not use.
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	//
+	// Deprecated: Do not use.
+	OnDemandDeprecated bool `protobuf:"varint,2,opt,name=on_demand_deprecated,json=onDemandDeprecated,proto3" json:"on_demand_deprecated,omitempty"`
 }
 
-func (m *AssetModuleMetadata) Reset()         { *m = AssetModuleMetadata{} }
-func (m *AssetModuleMetadata) String() string { return proto.CompactTextString(m) }
-func (*AssetModuleMetadata) ProtoMessage()    {}
+func (x *AssetModuleMetadata) Reset() {
+	*x = AssetModuleMetadata{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AssetModuleMetadata) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AssetModuleMetadata) ProtoMessage() {}
+
+func (x *AssetModuleMetadata) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AssetModuleMetadata.ProtoReflect.Descriptor instead.
 func (*AssetModuleMetadata) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{5}
+	return file_commands_proto_rawDescGZIP(), []int{5}
 }
 
-func (m *AssetModuleMetadata) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_AssetModuleMetadata.Unmarshal(m, b)
-}
-func (m *AssetModuleMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_AssetModuleMetadata.Marshal(b, m, deterministic)
-}
-func (m *AssetModuleMetadata) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_AssetModuleMetadata.Merge(m, src)
-}
-func (m *AssetModuleMetadata) XXX_Size() int {
-	return xxx_messageInfo_AssetModuleMetadata.Size(m)
-}
-func (m *AssetModuleMetadata) XXX_DiscardUnknown() {
-	xxx_messageInfo_AssetModuleMetadata.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AssetModuleMetadata proto.InternalMessageInfo
-
-func (m *AssetModuleMetadata) GetName() string {
-	if m != nil {
-		return m.Name
+func (x *AssetModuleMetadata) GetName() string {
+	if x != nil {
+		return x.Name
 	}
 	return ""
 }
 
-func (m *AssetModuleMetadata) GetDeliveryType() DeliveryType {
-	if m != nil {
-		return m.DeliveryType
+func (x *AssetModuleMetadata) GetDeliveryType() DeliveryType {
+	if x != nil {
+		return x.DeliveryType
 	}
 	return DeliveryType_UNKNOWN_DELIVERY_TYPE
 }
 
-func (m *AssetModuleMetadata) GetInstantMetadata() *InstantMetadata {
-	if m != nil {
-		return m.InstantMetadata
+func (x *AssetModuleMetadata) GetInstantMetadata() *InstantMetadata {
+	if x != nil {
+		return x.InstantMetadata
 	}
 	return nil
 }
 
 // Deprecated: Do not use.
-func (m *AssetModuleMetadata) GetOnDemandDeprecated() bool {
-	if m != nil {
-		return m.OnDemandDeprecated
+func (x *AssetModuleMetadata) GetOnDemandDeprecated() bool {
+	if x != nil {
+		return x.OnDemandDeprecated
 	}
 	return false
 }
 
 type InstantMetadata struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Indicates whether this module is marked "instant".
 	IsInstant bool `protobuf:"varint,1,opt,name=is_instant,json=isInstant,proto3" json:"is_instant,omitempty"`
 	// Indicates the delivery type for instant install.
 	DeliveryType DeliveryType `protobuf:"varint,3,opt,name=delivery_type,json=deliveryType,proto3,enum=android.bundle.DeliveryType" json:"delivery_type,omitempty"`
 	// Deprecated. Use delivery_type.
-	OnDemandDeprecated   bool     `protobuf:"varint,2,opt,name=on_demand_deprecated,json=onDemandDeprecated,proto3" json:"on_demand_deprecated,omitempty"` // Deprecated: Do not use.
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	//
+	// Deprecated: Do not use.
+	OnDemandDeprecated bool `protobuf:"varint,2,opt,name=on_demand_deprecated,json=onDemandDeprecated,proto3" json:"on_demand_deprecated,omitempty"`
 }
 
-func (m *InstantMetadata) Reset()         { *m = InstantMetadata{} }
-func (m *InstantMetadata) String() string { return proto.CompactTextString(m) }
-func (*InstantMetadata) ProtoMessage()    {}
+func (x *InstantMetadata) Reset() {
+	*x = InstantMetadata{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *InstantMetadata) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InstantMetadata) ProtoMessage() {}
+
+func (x *InstantMetadata) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use InstantMetadata.ProtoReflect.Descriptor instead.
 func (*InstantMetadata) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{6}
+	return file_commands_proto_rawDescGZIP(), []int{6}
 }
 
-func (m *InstantMetadata) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_InstantMetadata.Unmarshal(m, b)
-}
-func (m *InstantMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_InstantMetadata.Marshal(b, m, deterministic)
-}
-func (m *InstantMetadata) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_InstantMetadata.Merge(m, src)
-}
-func (m *InstantMetadata) XXX_Size() int {
-	return xxx_messageInfo_InstantMetadata.Size(m)
-}
-func (m *InstantMetadata) XXX_DiscardUnknown() {
-	xxx_messageInfo_InstantMetadata.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_InstantMetadata proto.InternalMessageInfo
-
-func (m *InstantMetadata) GetIsInstant() bool {
-	if m != nil {
-		return m.IsInstant
+func (x *InstantMetadata) GetIsInstant() bool {
+	if x != nil {
+		return x.IsInstant
 	}
 	return false
 }
 
-func (m *InstantMetadata) GetDeliveryType() DeliveryType {
-	if m != nil {
-		return m.DeliveryType
+func (x *InstantMetadata) GetDeliveryType() DeliveryType {
+	if x != nil {
+		return x.DeliveryType
 	}
 	return DeliveryType_UNKNOWN_DELIVERY_TYPE
 }
 
 // Deprecated: Do not use.
-func (m *InstantMetadata) GetOnDemandDeprecated() bool {
-	if m != nil {
-		return m.OnDemandDeprecated
+func (x *InstantMetadata) GetOnDemandDeprecated() bool {
+	if x != nil {
+		return x.OnDemandDeprecated
 	}
 	return false
 }
 
 type ApkDescription struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Targeting *ApkTargeting `protobuf:"bytes,1,opt,name=targeting,proto3" json:"targeting,omitempty"`
 	// Path to the APK file.
 	// BEGIN-INTERNAL
 	// The path may be a blobkey if the proto is not constructed by bundletool.
 	// END-INTERNAL
 	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
-	// Types that are valid to be assigned to ApkMetadataOneofValue:
+	// Types that are assignable to ApkMetadataOneofValue:
 	//	*ApkDescription_SplitApkMetadata
 	//	*ApkDescription_StandaloneApkMetadata
 	//	*ApkDescription_InstantApkMetadata
@@ -558,75 +671,134 @@
 	//	*ApkDescription_AssetSliceMetadata
 	//	*ApkDescription_ApexApkMetadata
 	ApkMetadataOneofValue isApkDescription_ApkMetadataOneofValue `protobuf_oneof:"apk_metadata_oneof_value"`
-	XXX_NoUnkeyedLiteral  struct{}                               `json:"-"`
-	XXX_unrecognized      []byte                                 `json:"-"`
-	XXX_sizecache         int32                                  `json:"-"`
 }
 
-func (m *ApkDescription) Reset()         { *m = ApkDescription{} }
-func (m *ApkDescription) String() string { return proto.CompactTextString(m) }
-func (*ApkDescription) ProtoMessage()    {}
+func (x *ApkDescription) Reset() {
+	*x = ApkDescription{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ApkDescription) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ApkDescription) ProtoMessage() {}
+
+func (x *ApkDescription) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[7]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ApkDescription.ProtoReflect.Descriptor instead.
 func (*ApkDescription) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{7}
+	return file_commands_proto_rawDescGZIP(), []int{7}
 }
 
-func (m *ApkDescription) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ApkDescription.Unmarshal(m, b)
-}
-func (m *ApkDescription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ApkDescription.Marshal(b, m, deterministic)
-}
-func (m *ApkDescription) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ApkDescription.Merge(m, src)
-}
-func (m *ApkDescription) XXX_Size() int {
-	return xxx_messageInfo_ApkDescription.Size(m)
-}
-func (m *ApkDescription) XXX_DiscardUnknown() {
-	xxx_messageInfo_ApkDescription.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ApkDescription proto.InternalMessageInfo
-
-func (m *ApkDescription) GetTargeting() *ApkTargeting {
-	if m != nil {
-		return m.Targeting
+func (x *ApkDescription) GetTargeting() *ApkTargeting {
+	if x != nil {
+		return x.Targeting
 	}
 	return nil
 }
 
-func (m *ApkDescription) GetPath() string {
-	if m != nil {
-		return m.Path
+func (x *ApkDescription) GetPath() string {
+	if x != nil {
+		return x.Path
 	}
 	return ""
 }
 
+func (m *ApkDescription) GetApkMetadataOneofValue() isApkDescription_ApkMetadataOneofValue {
+	if m != nil {
+		return m.ApkMetadataOneofValue
+	}
+	return nil
+}
+
+func (x *ApkDescription) GetSplitApkMetadata() *SplitApkMetadata {
+	if x, ok := x.GetApkMetadataOneofValue().(*ApkDescription_SplitApkMetadata); ok {
+		return x.SplitApkMetadata
+	}
+	return nil
+}
+
+func (x *ApkDescription) GetStandaloneApkMetadata() *StandaloneApkMetadata {
+	if x, ok := x.GetApkMetadataOneofValue().(*ApkDescription_StandaloneApkMetadata); ok {
+		return x.StandaloneApkMetadata
+	}
+	return nil
+}
+
+func (x *ApkDescription) GetInstantApkMetadata() *SplitApkMetadata {
+	if x, ok := x.GetApkMetadataOneofValue().(*ApkDescription_InstantApkMetadata); ok {
+		return x.InstantApkMetadata
+	}
+	return nil
+}
+
+func (x *ApkDescription) GetSystemApkMetadata() *SystemApkMetadata {
+	if x, ok := x.GetApkMetadataOneofValue().(*ApkDescription_SystemApkMetadata); ok {
+		return x.SystemApkMetadata
+	}
+	return nil
+}
+
+func (x *ApkDescription) GetAssetSliceMetadata() *SplitApkMetadata {
+	if x, ok := x.GetApkMetadataOneofValue().(*ApkDescription_AssetSliceMetadata); ok {
+		return x.AssetSliceMetadata
+	}
+	return nil
+}
+
+func (x *ApkDescription) GetApexApkMetadata() *ApexApkMetadata {
+	if x, ok := x.GetApkMetadataOneofValue().(*ApkDescription_ApexApkMetadata); ok {
+		return x.ApexApkMetadata
+	}
+	return nil
+}
+
 type isApkDescription_ApkMetadataOneofValue interface {
 	isApkDescription_ApkMetadataOneofValue()
 }
 
 type ApkDescription_SplitApkMetadata struct {
+	// Set only for Split APKs.
 	SplitApkMetadata *SplitApkMetadata `protobuf:"bytes,3,opt,name=split_apk_metadata,json=splitApkMetadata,proto3,oneof"`
 }
 
 type ApkDescription_StandaloneApkMetadata struct {
+	// Set only for standalone APKs.
 	StandaloneApkMetadata *StandaloneApkMetadata `protobuf:"bytes,4,opt,name=standalone_apk_metadata,json=standaloneApkMetadata,proto3,oneof"`
 }
 
 type ApkDescription_InstantApkMetadata struct {
+	// Set only for Instant split APKs.
 	InstantApkMetadata *SplitApkMetadata `protobuf:"bytes,5,opt,name=instant_apk_metadata,json=instantApkMetadata,proto3,oneof"`
 }
 
 type ApkDescription_SystemApkMetadata struct {
+	// Set only for system APKs.
 	SystemApkMetadata *SystemApkMetadata `protobuf:"bytes,6,opt,name=system_apk_metadata,json=systemApkMetadata,proto3,oneof"`
 }
 
 type ApkDescription_AssetSliceMetadata struct {
+	// Set only for asset slices.
 	AssetSliceMetadata *SplitApkMetadata `protobuf:"bytes,7,opt,name=asset_slice_metadata,json=assetSliceMetadata,proto3,oneof"`
 }
 
 type ApkDescription_ApexApkMetadata struct {
+	// Set only for APEX APKs.
 	ApexApkMetadata *ApexApkMetadata `protobuf:"bytes,8,opt,name=apex_apk_metadata,json=apexApkMetadata,proto3,oneof"`
 }
 
@@ -642,58 +814,708 @@
 
 func (*ApkDescription_ApexApkMetadata) isApkDescription_ApkMetadataOneofValue() {}
 
-func (m *ApkDescription) GetApkMetadataOneofValue() isApkDescription_ApkMetadataOneofValue {
-	if m != nil {
-		return m.ApkMetadataOneofValue
+// Holds data specific to Split APKs.
+type SplitApkMetadata struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	SplitId string `protobuf:"bytes,1,opt,name=split_id,json=splitId,proto3" json:"split_id,omitempty"`
+	// Indicates whether this APK is the master split of the module.
+	IsMasterSplit bool `protobuf:"varint,2,opt,name=is_master_split,json=isMasterSplit,proto3" json:"is_master_split,omitempty"`
+}
+
+func (x *SplitApkMetadata) Reset() {
+	*x = SplitApkMetadata{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SplitApkMetadata) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SplitApkMetadata) ProtoMessage() {}
+
+func (x *SplitApkMetadata) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SplitApkMetadata.ProtoReflect.Descriptor instead.
+func (*SplitApkMetadata) Descriptor() ([]byte, []int) {
+	return file_commands_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *SplitApkMetadata) GetSplitId() string {
+	if x != nil {
+		return x.SplitId
+	}
+	return ""
+}
+
+func (x *SplitApkMetadata) GetIsMasterSplit() bool {
+	if x != nil {
+		return x.IsMasterSplit
+	}
+	return false
+}
+
+// Holds data specific to Standalone APKs.
+type StandaloneApkMetadata struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	// Names of the modules fused in this standalone APK.
+	FusedModuleName []string `protobuf:"bytes,1,rep,name=fused_module_name,json=fusedModuleName,proto3" json:"fused_module_name,omitempty"`
+}
+
+func (x *StandaloneApkMetadata) Reset() {
+	*x = StandaloneApkMetadata{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *StandaloneApkMetadata) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StandaloneApkMetadata) ProtoMessage() {}
+
+func (x *StandaloneApkMetadata) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[9]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use StandaloneApkMetadata.ProtoReflect.Descriptor instead.
+func (*StandaloneApkMetadata) Descriptor() ([]byte, []int) {
+	return file_commands_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *StandaloneApkMetadata) GetFusedModuleName() []string {
+	if x != nil {
+		return x.FusedModuleName
 	}
 	return nil
 }
 
-func (m *ApkDescription) GetSplitApkMetadata() *SplitApkMetadata {
-	if x, ok := m.GetApkMetadataOneofValue().(*ApkDescription_SplitApkMetadata); ok {
-		return x.SplitApkMetadata
+// Holds data specific to system APKs.
+type SystemApkMetadata struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	// Names of the modules fused in this system APK.
+	FusedModuleName []string `protobuf:"bytes,1,rep,name=fused_module_name,json=fusedModuleName,proto3" json:"fused_module_name,omitempty"`
+	// Indicates whether the APK is uncompressed system APK, stub APK or
+	// compressed system APK.
+	SystemApkType SystemApkMetadata_SystemApkType `protobuf:"varint,2,opt,name=system_apk_type,json=systemApkType,proto3,enum=android.bundle.SystemApkMetadata_SystemApkType" json:"system_apk_type,omitempty"`
+}
+
+func (x *SystemApkMetadata) Reset() {
+	*x = SystemApkMetadata{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[10]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SystemApkMetadata) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SystemApkMetadata) ProtoMessage() {}
+
+func (x *SystemApkMetadata) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[10]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SystemApkMetadata.ProtoReflect.Descriptor instead.
+func (*SystemApkMetadata) Descriptor() ([]byte, []int) {
+	return file_commands_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *SystemApkMetadata) GetFusedModuleName() []string {
+	if x != nil {
+		return x.FusedModuleName
 	}
 	return nil
 }
 
-func (m *ApkDescription) GetStandaloneApkMetadata() *StandaloneApkMetadata {
-	if x, ok := m.GetApkMetadataOneofValue().(*ApkDescription_StandaloneApkMetadata); ok {
-		return x.StandaloneApkMetadata
+func (x *SystemApkMetadata) GetSystemApkType() SystemApkMetadata_SystemApkType {
+	if x != nil {
+		return x.SystemApkType
+	}
+	return SystemApkMetadata_UNSPECIFIED_VALUE
+}
+
+// Holds data specific to APEX APKs.
+type ApexApkMetadata struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	// Configuration for processing of APKs embedded in an APEX image.
+	ApexEmbeddedApkConfig []*ApexEmbeddedApkConfig `protobuf:"bytes,1,rep,name=apex_embedded_apk_config,json=apexEmbeddedApkConfig,proto3" json:"apex_embedded_apk_config,omitempty"`
+}
+
+func (x *ApexApkMetadata) Reset() {
+	*x = ApexApkMetadata{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[11]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ApexApkMetadata) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ApexApkMetadata) ProtoMessage() {}
+
+func (x *ApexApkMetadata) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[11]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ApexApkMetadata.ProtoReflect.Descriptor instead.
+func (*ApexApkMetadata) Descriptor() ([]byte, []int) {
+	return file_commands_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ApexApkMetadata) GetApexEmbeddedApkConfig() []*ApexEmbeddedApkConfig {
+	if x != nil {
+		return x.ApexEmbeddedApkConfig
 	}
 	return nil
 }
 
-func (m *ApkDescription) GetInstantApkMetadata() *SplitApkMetadata {
-	if x, ok := m.GetApkMetadataOneofValue().(*ApkDescription_InstantApkMetadata); ok {
-		return x.InstantApkMetadata
-	}
-	return nil
+type LocalTestingInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	// Indicates if the bundle is built in local testing mode.
+	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
+	// The local testing path, as specified in the base manifest.
+	// This refers to the relative path on the external directory of the app where
+	// APKs will be pushed for local testing.
+	// Set only if local testing is enabled.
+	LocalTestingPath string `protobuf:"bytes,2,opt,name=local_testing_path,json=localTestingPath,proto3" json:"local_testing_path,omitempty"`
 }
 
-func (m *ApkDescription) GetSystemApkMetadata() *SystemApkMetadata {
-	if x, ok := m.GetApkMetadataOneofValue().(*ApkDescription_SystemApkMetadata); ok {
-		return x.SystemApkMetadata
+func (x *LocalTestingInfo) Reset() {
+	*x = LocalTestingInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_commands_proto_msgTypes[12]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
 	}
-	return nil
 }
 
-func (m *ApkDescription) GetAssetSliceMetadata() *SplitApkMetadata {
-	if x, ok := m.GetApkMetadataOneofValue().(*ApkDescription_AssetSliceMetadata); ok {
-		return x.AssetSliceMetadata
-	}
-	return nil
+func (x *LocalTestingInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
 }
 
-func (m *ApkDescription) GetApexApkMetadata() *ApexApkMetadata {
-	if x, ok := m.GetApkMetadataOneofValue().(*ApkDescription_ApexApkMetadata); ok {
-		return x.ApexApkMetadata
+func (*LocalTestingInfo) ProtoMessage() {}
+
+func (x *LocalTestingInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_commands_proto_msgTypes[12]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
 	}
-	return nil
+	return mi.MessageOf(x)
 }
 
-// XXX_OneofWrappers is for the internal use of the proto package.
-func (*ApkDescription) XXX_OneofWrappers() []interface{} {
-	return []interface{}{
+// Deprecated: Use LocalTestingInfo.ProtoReflect.Descriptor instead.
+func (*LocalTestingInfo) Descriptor() ([]byte, []int) {
+	return file_commands_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *LocalTestingInfo) GetEnabled() bool {
+	if x != nil {
+		return x.Enabled
+	}
+	return false
+}
+
+func (x *LocalTestingInfo) GetLocalTestingPath() string {
+	if x != nil {
+		return x.LocalTestingPath
+	}
+	return ""
+}
+
+var File_commands_proto protoreflect.FileDescriptor
+
+var file_commands_proto_rawDesc = []byte{
+	0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x12, 0x0e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x1a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f,
+	0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+	0xba, 0x02, 0x0a, 0x0f, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x70, 0x6b, 0x73, 0x52, 0x65, 0x73,
+	0x75, 0x6c, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e,
+	0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61,
+	0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e,
+	0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69,
+	0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74,
+	0x52, 0x07, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x0a, 0x62, 0x75, 0x6e,
+	0x64, 0x6c, 0x65, 0x74, 0x6f, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+	0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42,
+	0x75, 0x6e, 0x64, 0x6c, 0x65, 0x74, 0x6f, 0x6f, 0x6c, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x74, 0x6f, 0x6f, 0x6c, 0x12, 0x45, 0x0a, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73,
+	0x6c, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d,
+	0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
+	0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0d, 0x61,
+	0x73, 0x73, 0x65, 0x74, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x53, 0x65, 0x74, 0x12, 0x4e, 0x0a, 0x12,
+	0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e,
+	0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+	0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54,
+	0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61,
+	0x6c, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xa1, 0x01, 0x0a,
+	0x07, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x3e, 0x0a, 0x09, 0x74, 0x61, 0x72, 0x67,
+	0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x6e,
+	0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x56, 0x61, 0x72,
+	0x69, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74,
+	0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x70, 0x6b, 0x5f,
+	0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x6e, 0x64, 0x72,
+	0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x70, 0x6b, 0x53, 0x65,
+	0x74, 0x52, 0x06, 0x61, 0x70, 0x6b, 0x53, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x76, 0x61, 0x72,
+	0x69, 0x61, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x0d, 0x52, 0x0d, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
+	0x22, 0x9a, 0x01, 0x0a, 0x06, 0x41, 0x70, 0x6b, 0x53, 0x65, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x6d,
+	0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62,
+	0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61,
+	0x64, 0x61, 0x74, 0x61, 0x52, 0x0e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61,
+	0x64, 0x61, 0x74, 0x61, 0x12, 0x47, 0x0a, 0x0f, 0x61, 0x70, 0x6b, 0x5f, 0x64, 0x65, 0x73, 0x63,
+	0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
+	0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41,
+	0x70, 0x6b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x61,
+	0x70, 0x6b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x9f, 0x02,
+	0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+	0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+	0x6e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79,
+	0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x61, 0x6e,
+	0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c,
+	0x69, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x69, 0x76,
+	0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x69, 0x6e,
+	0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x49,
+	0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64,
+	0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65,
+	0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x74, 0x61,
+	0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
+	0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4d,
+	0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x09,
+	0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x0a, 0x14, 0x6f, 0x6e, 0x5f,
+	0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65,
+	0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x6f, 0x6e, 0x44,
+	0x65, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22,
+	0xb1, 0x01, 0x0a, 0x0d, 0x41, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x53, 0x65,
+	0x74, 0x12, 0x57, 0x0a, 0x15, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
+	0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x23, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4d, 0x65, 0x74,
+	0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x13, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75,
+	0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x47, 0x0a, 0x0f, 0x61, 0x70,
+	0x6b, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
+	0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75,
+	0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x70, 0x6b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+	0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x61, 0x70, 0x6b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+	0x69, 0x6f, 0x6e, 0x22, 0xee, 0x01, 0x0a, 0x13, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x6f, 0x64,
+	0x75, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+	0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+	0x41, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79,
+	0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79,
+	0x70, 0x65, 0x12, 0x4a, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x6d, 0x65,
+	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61,
+	0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x49, 0x6e,
+	0x73, 0x74, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0f, 0x69,
+	0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34,
+	0x0a, 0x14, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72,
+	0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01,
+	0x52, 0x12, 0x6f, 0x6e, 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
+	0x61, 0x74, 0x65, 0x64, 0x22, 0xa9, 0x01, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74,
+	0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x69,
+	0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73,
+	0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x69, 0x76,
+	0x65, 0x72, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c,
+	0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
+	0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x64, 0x65,
+	0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x14, 0x6f, 0x6e,
+	0x5f, 0x64, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+	0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x12, 0x6f, 0x6e,
+	0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
+	0x22, 0xff, 0x04, 0x0a, 0x0e, 0x41, 0x70, 0x6b, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+	0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x70, 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65,
+	0x74, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12,
+	0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70,
+	0x61, 0x74, 0x68, 0x12, 0x50, 0x0a, 0x12, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x61, 0x70, 0x6b,
+	0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x20, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+	0x61, 0x48, 0x00, 0x52, 0x10, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74,
+	0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5f, 0x0a, 0x17, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c,
+	0x6f, 0x6e, 0x65, 0x5f, 0x61, 0x70, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f,
+	0x6e, 0x65, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52,
+	0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x41, 0x70, 0x6b, 0x4d, 0x65,
+	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x54, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
+	0x74, 0x5f, 0x61, 0x70, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62,
+	0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x41, 0x70, 0x6b, 0x4d, 0x65,
+	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x12, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e,
+	0x74, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x53, 0x0a, 0x13,
+	0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x61, 0x70, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+	0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x6e, 0x64, 0x72,
+	0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65,
+	0x6d, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x11,
+	0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+	0x61, 0x12, 0x54, 0x0a, 0x14, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x6c, 0x69, 0x63, 0x65,
+	0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x20, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+	0x61, 0x48, 0x00, 0x52, 0x12, 0x61, 0x73, 0x73, 0x65, 0x74, 0x53, 0x6c, 0x69, 0x63, 0x65, 0x4d,
+	0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4d, 0x0a, 0x11, 0x61, 0x70, 0x65, 0x78, 0x5f,
+	0x61, 0x70, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01,
+	0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e,
+	0x64, 0x6c, 0x65, 0x2e, 0x41, 0x70, 0x65, 0x78, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64,
+	0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x70, 0x65, 0x78, 0x41, 0x70, 0x6b, 0x4d, 0x65,
+	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x1a, 0x0a, 0x18, 0x61, 0x70, 0x6b, 0x5f, 0x6d, 0x65,
+	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x76, 0x61, 0x6c,
+	0x75, 0x65, 0x22, 0x55, 0x0a, 0x10, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x41, 0x70, 0x6b, 0x4d, 0x65,
+	0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f,
+	0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x49,
+	0x64, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x73, 0x5f, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73,
+	0x70, 0x6c, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x73, 0x4d, 0x61,
+	0x73, 0x74, 0x65, 0x72, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x22, 0x49, 0x0a, 0x15, 0x53, 0x74, 0x61,
+	0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+	0x74, 0x61, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x75,
+	0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x66,
+	0x75, 0x73, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x4a, 0x04,
+	0x08, 0x02, 0x10, 0x03, 0x22, 0xf4, 0x01, 0x0a, 0x11, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x41,
+	0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x75,
+	0x73, 0x65, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+	0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x66, 0x75, 0x73, 0x65, 0x64, 0x4d, 0x6f, 0x64, 0x75,
+	0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
+	0x5f, 0x61, 0x70, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32,
+	0x2f, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+	0x74, 0x61, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x41, 0x70, 0x6b, 0x54, 0x79, 0x70, 0x65,
+	0x52, 0x0d, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x41, 0x70, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x22,
+	0x5a, 0x0a, 0x0d, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x41, 0x70, 0x6b, 0x54, 0x79, 0x70, 0x65,
+	0x12, 0x15, 0x0a, 0x11, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f,
+	0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x53, 0x54, 0x45,
+	0x4d, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x53, 0x54,
+	0x55, 0x42, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f, 0x43,
+	0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x22, 0x71, 0x0a, 0x0f, 0x41,
+	0x70, 0x65, 0x78, 0x41, 0x70, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5e,
+	0x0a, 0x18, 0x61, 0x70, 0x65, 0x78, 0x5f, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x5f,
+	0x61, 0x70, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x25, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x2e, 0x41, 0x70, 0x65, 0x78, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x41, 0x70,
+	0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x61, 0x70, 0x65, 0x78, 0x45, 0x6d, 0x62,
+	0x65, 0x64, 0x64, 0x65, 0x64, 0x41, 0x70, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x5a,
+	0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e,
+	0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2c, 0x0a, 0x12,
+	0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61,
+	0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x54,
+	0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x74, 0x68, 0x2a, 0x5b, 0x0a, 0x0c, 0x44, 0x65,
+	0x6c, 0x69, 0x76, 0x65, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e,
+	0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x44, 0x45, 0x4c, 0x49, 0x56, 0x45, 0x52, 0x59, 0x5f, 0x54,
+	0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c,
+	0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x4e, 0x5f, 0x44, 0x45,
+	0x4d, 0x41, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x41, 0x53, 0x54, 0x5f, 0x46,
+	0x4f, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x03, 0x42, 0x41, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x61,
+	0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5a, 0x2b, 0x61,
+	0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x63, 0x6d, 0x64,
+	0x2f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x70, 0x6b, 0x73, 0x2f, 0x62, 0x75,
+	0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x33,
+}
+
+var (
+	file_commands_proto_rawDescOnce sync.Once
+	file_commands_proto_rawDescData = file_commands_proto_rawDesc
+)
+
+func file_commands_proto_rawDescGZIP() []byte {
+	file_commands_proto_rawDescOnce.Do(func() {
+		file_commands_proto_rawDescData = protoimpl.X.CompressGZIP(file_commands_proto_rawDescData)
+	})
+	return file_commands_proto_rawDescData
+}
+
+var file_commands_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_commands_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
+var file_commands_proto_goTypes = []interface{}{
+	(DeliveryType)(0),                    // 0: android.bundle.DeliveryType
+	(SystemApkMetadata_SystemApkType)(0), // 1: android.bundle.SystemApkMetadata.SystemApkType
+	(*BuildApksResult)(nil),              // 2: android.bundle.BuildApksResult
+	(*Variant)(nil),                      // 3: android.bundle.Variant
+	(*ApkSet)(nil),                       // 4: android.bundle.ApkSet
+	(*ModuleMetadata)(nil),               // 5: android.bundle.ModuleMetadata
+	(*AssetSliceSet)(nil),                // 6: android.bundle.AssetSliceSet
+	(*AssetModuleMetadata)(nil),          // 7: android.bundle.AssetModuleMetadata
+	(*InstantMetadata)(nil),              // 8: android.bundle.InstantMetadata
+	(*ApkDescription)(nil),               // 9: android.bundle.ApkDescription
+	(*SplitApkMetadata)(nil),             // 10: android.bundle.SplitApkMetadata
+	(*StandaloneApkMetadata)(nil),        // 11: android.bundle.StandaloneApkMetadata
+	(*SystemApkMetadata)(nil),            // 12: android.bundle.SystemApkMetadata
+	(*ApexApkMetadata)(nil),              // 13: android.bundle.ApexApkMetadata
+	(*LocalTestingInfo)(nil),             // 14: android.bundle.LocalTestingInfo
+	(*Bundletool)(nil),                   // 15: android.bundle.Bundletool
+	(*VariantTargeting)(nil),             // 16: android.bundle.VariantTargeting
+	(*ModuleTargeting)(nil),              // 17: android.bundle.ModuleTargeting
+	(*ApkTargeting)(nil),                 // 18: android.bundle.ApkTargeting
+	(*ApexEmbeddedApkConfig)(nil),        // 19: android.bundle.ApexEmbeddedApkConfig
+}
+var file_commands_proto_depIdxs = []int32{
+	3,  // 0: android.bundle.BuildApksResult.variant:type_name -> android.bundle.Variant
+	15, // 1: android.bundle.BuildApksResult.bundletool:type_name -> android.bundle.Bundletool
+	6,  // 2: android.bundle.BuildApksResult.asset_slice_set:type_name -> android.bundle.AssetSliceSet
+	14, // 3: android.bundle.BuildApksResult.local_testing_info:type_name -> android.bundle.LocalTestingInfo
+	16, // 4: android.bundle.Variant.targeting:type_name -> android.bundle.VariantTargeting
+	4,  // 5: android.bundle.Variant.apk_set:type_name -> android.bundle.ApkSet
+	5,  // 6: android.bundle.ApkSet.module_metadata:type_name -> android.bundle.ModuleMetadata
+	9,  // 7: android.bundle.ApkSet.apk_description:type_name -> android.bundle.ApkDescription
+	0,  // 8: android.bundle.ModuleMetadata.delivery_type:type_name -> android.bundle.DeliveryType
+	17, // 9: android.bundle.ModuleMetadata.targeting:type_name -> android.bundle.ModuleTargeting
+	7,  // 10: android.bundle.AssetSliceSet.asset_module_metadata:type_name -> android.bundle.AssetModuleMetadata
+	9,  // 11: android.bundle.AssetSliceSet.apk_description:type_name -> android.bundle.ApkDescription
+	0,  // 12: android.bundle.AssetModuleMetadata.delivery_type:type_name -> android.bundle.DeliveryType
+	8,  // 13: android.bundle.AssetModuleMetadata.instant_metadata:type_name -> android.bundle.InstantMetadata
+	0,  // 14: android.bundle.InstantMetadata.delivery_type:type_name -> android.bundle.DeliveryType
+	18, // 15: android.bundle.ApkDescription.targeting:type_name -> android.bundle.ApkTargeting
+	10, // 16: android.bundle.ApkDescription.split_apk_metadata:type_name -> android.bundle.SplitApkMetadata
+	11, // 17: android.bundle.ApkDescription.standalone_apk_metadata:type_name -> android.bundle.StandaloneApkMetadata
+	10, // 18: android.bundle.ApkDescription.instant_apk_metadata:type_name -> android.bundle.SplitApkMetadata
+	12, // 19: android.bundle.ApkDescription.system_apk_metadata:type_name -> android.bundle.SystemApkMetadata
+	10, // 20: android.bundle.ApkDescription.asset_slice_metadata:type_name -> android.bundle.SplitApkMetadata
+	13, // 21: android.bundle.ApkDescription.apex_apk_metadata:type_name -> android.bundle.ApexApkMetadata
+	1,  // 22: android.bundle.SystemApkMetadata.system_apk_type:type_name -> android.bundle.SystemApkMetadata.SystemApkType
+	19, // 23: android.bundle.ApexApkMetadata.apex_embedded_apk_config:type_name -> android.bundle.ApexEmbeddedApkConfig
+	24, // [24:24] is the sub-list for method output_type
+	24, // [24:24] is the sub-list for method input_type
+	24, // [24:24] is the sub-list for extension type_name
+	24, // [24:24] is the sub-list for extension extendee
+	0,  // [0:24] is the sub-list for field type_name
+}
+
+func init() { file_commands_proto_init() }
+func file_commands_proto_init() {
+	if File_commands_proto != nil {
+		return
+	}
+	file_config_proto_init()
+	file_targeting_proto_init()
+	if !protoimpl.UnsafeEnabled {
+		file_commands_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BuildApksResult); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Variant); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ApkSet); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ModuleMetadata); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AssetSliceSet); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AssetModuleMetadata); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*InstantMetadata); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ApkDescription); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SplitApkMetadata); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*StandaloneApkMetadata); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SystemApkMetadata); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ApexApkMetadata); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_commands_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*LocalTestingInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	file_commands_proto_msgTypes[7].OneofWrappers = []interface{}{
 		(*ApkDescription_SplitApkMetadata)(nil),
 		(*ApkDescription_StandaloneApkMetadata)(nil),
 		(*ApkDescription_InstantApkMetadata)(nil),
@@ -701,333 +1523,23 @@
 		(*ApkDescription_AssetSliceMetadata)(nil),
 		(*ApkDescription_ApexApkMetadata)(nil),
 	}
-}
-
-// Holds data specific to Split APKs.
-type SplitApkMetadata struct {
-	SplitId string `protobuf:"bytes,1,opt,name=split_id,json=splitId,proto3" json:"split_id,omitempty"`
-	// Indicates whether this APK is the master split of the module.
-	IsMasterSplit        bool     `protobuf:"varint,2,opt,name=is_master_split,json=isMasterSplit,proto3" json:"is_master_split,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
-}
-
-func (m *SplitApkMetadata) Reset()         { *m = SplitApkMetadata{} }
-func (m *SplitApkMetadata) String() string { return proto.CompactTextString(m) }
-func (*SplitApkMetadata) ProtoMessage()    {}
-func (*SplitApkMetadata) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{8}
-}
-
-func (m *SplitApkMetadata) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SplitApkMetadata.Unmarshal(m, b)
-}
-func (m *SplitApkMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SplitApkMetadata.Marshal(b, m, deterministic)
-}
-func (m *SplitApkMetadata) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SplitApkMetadata.Merge(m, src)
-}
-func (m *SplitApkMetadata) XXX_Size() int {
-	return xxx_messageInfo_SplitApkMetadata.Size(m)
-}
-func (m *SplitApkMetadata) XXX_DiscardUnknown() {
-	xxx_messageInfo_SplitApkMetadata.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SplitApkMetadata proto.InternalMessageInfo
-
-func (m *SplitApkMetadata) GetSplitId() string {
-	if m != nil {
-		return m.SplitId
-	}
-	return ""
-}
-
-func (m *SplitApkMetadata) GetIsMasterSplit() bool {
-	if m != nil {
-		return m.IsMasterSplit
-	}
-	return false
-}
-
-// Holds data specific to Standalone APKs.
-type StandaloneApkMetadata struct {
-	// Names of the modules fused in this standalone APK.
-	FusedModuleName      []string `protobuf:"bytes,1,rep,name=fused_module_name,json=fusedModuleName,proto3" json:"fused_module_name,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
-}
-
-func (m *StandaloneApkMetadata) Reset()         { *m = StandaloneApkMetadata{} }
-func (m *StandaloneApkMetadata) String() string { return proto.CompactTextString(m) }
-func (*StandaloneApkMetadata) ProtoMessage()    {}
-func (*StandaloneApkMetadata) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{9}
-}
-
-func (m *StandaloneApkMetadata) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_StandaloneApkMetadata.Unmarshal(m, b)
-}
-func (m *StandaloneApkMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_StandaloneApkMetadata.Marshal(b, m, deterministic)
-}
-func (m *StandaloneApkMetadata) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_StandaloneApkMetadata.Merge(m, src)
-}
-func (m *StandaloneApkMetadata) XXX_Size() int {
-	return xxx_messageInfo_StandaloneApkMetadata.Size(m)
-}
-func (m *StandaloneApkMetadata) XXX_DiscardUnknown() {
-	xxx_messageInfo_StandaloneApkMetadata.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StandaloneApkMetadata proto.InternalMessageInfo
-
-func (m *StandaloneApkMetadata) GetFusedModuleName() []string {
-	if m != nil {
-		return m.FusedModuleName
-	}
-	return nil
-}
-
-// Holds data specific to system APKs.
-type SystemApkMetadata struct {
-	// Names of the modules fused in this system APK.
-	FusedModuleName []string `protobuf:"bytes,1,rep,name=fused_module_name,json=fusedModuleName,proto3" json:"fused_module_name,omitempty"`
-	// Indicates whether the APK is uncompressed system APK, stub APK or
-	// compressed system APK.
-	SystemApkType        SystemApkMetadata_SystemApkType `protobuf:"varint,2,opt,name=system_apk_type,json=systemApkType,proto3,enum=android.bundle.SystemApkMetadata_SystemApkType" json:"system_apk_type,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
-	XXX_unrecognized     []byte                          `json:"-"`
-	XXX_sizecache        int32                           `json:"-"`
-}
-
-func (m *SystemApkMetadata) Reset()         { *m = SystemApkMetadata{} }
-func (m *SystemApkMetadata) String() string { return proto.CompactTextString(m) }
-func (*SystemApkMetadata) ProtoMessage()    {}
-func (*SystemApkMetadata) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{10}
-}
-
-func (m *SystemApkMetadata) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SystemApkMetadata.Unmarshal(m, b)
-}
-func (m *SystemApkMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SystemApkMetadata.Marshal(b, m, deterministic)
-}
-func (m *SystemApkMetadata) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SystemApkMetadata.Merge(m, src)
-}
-func (m *SystemApkMetadata) XXX_Size() int {
-	return xxx_messageInfo_SystemApkMetadata.Size(m)
-}
-func (m *SystemApkMetadata) XXX_DiscardUnknown() {
-	xxx_messageInfo_SystemApkMetadata.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SystemApkMetadata proto.InternalMessageInfo
-
-func (m *SystemApkMetadata) GetFusedModuleName() []string {
-	if m != nil {
-		return m.FusedModuleName
-	}
-	return nil
-}
-
-func (m *SystemApkMetadata) GetSystemApkType() SystemApkMetadata_SystemApkType {
-	if m != nil {
-		return m.SystemApkType
-	}
-	return SystemApkMetadata_UNSPECIFIED_VALUE
-}
-
-// Holds data specific to APEX APKs.
-type ApexApkMetadata struct {
-	// Configuration for processing of APKs embedded in an APEX image.
-	ApexEmbeddedApkConfig []*ApexEmbeddedApkConfig `protobuf:"bytes,1,rep,name=apex_embedded_apk_config,json=apexEmbeddedApkConfig,proto3" json:"apex_embedded_apk_config,omitempty"`
-	XXX_NoUnkeyedLiteral  struct{}                 `json:"-"`
-	XXX_unrecognized      []byte                   `json:"-"`
-	XXX_sizecache         int32                    `json:"-"`
-}
-
-func (m *ApexApkMetadata) Reset()         { *m = ApexApkMetadata{} }
-func (m *ApexApkMetadata) String() string { return proto.CompactTextString(m) }
-func (*ApexApkMetadata) ProtoMessage()    {}
-func (*ApexApkMetadata) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{11}
-}
-
-func (m *ApexApkMetadata) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ApexApkMetadata.Unmarshal(m, b)
-}
-func (m *ApexApkMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ApexApkMetadata.Marshal(b, m, deterministic)
-}
-func (m *ApexApkMetadata) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ApexApkMetadata.Merge(m, src)
-}
-func (m *ApexApkMetadata) XXX_Size() int {
-	return xxx_messageInfo_ApexApkMetadata.Size(m)
-}
-func (m *ApexApkMetadata) XXX_DiscardUnknown() {
-	xxx_messageInfo_ApexApkMetadata.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ApexApkMetadata proto.InternalMessageInfo
-
-func (m *ApexApkMetadata) GetApexEmbeddedApkConfig() []*ApexEmbeddedApkConfig {
-	if m != nil {
-		return m.ApexEmbeddedApkConfig
-	}
-	return nil
-}
-
-type LocalTestingInfo struct {
-	// Indicates if the bundle is built in local testing mode.
-	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
-	// The local testing path, as specified in the base manifest.
-	// This refers to the relative path on the external directory of the app where
-	// APKs will be pushed for local testing.
-	// Set only if local testing is enabled.
-	LocalTestingPath     string   `protobuf:"bytes,2,opt,name=local_testing_path,json=localTestingPath,proto3" json:"local_testing_path,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
-}
-
-func (m *LocalTestingInfo) Reset()         { *m = LocalTestingInfo{} }
-func (m *LocalTestingInfo) String() string { return proto.CompactTextString(m) }
-func (*LocalTestingInfo) ProtoMessage()    {}
-func (*LocalTestingInfo) Descriptor() ([]byte, []int) {
-	return fileDescriptor_0dff099eb2e3dfdb, []int{12}
-}
-
-func (m *LocalTestingInfo) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_LocalTestingInfo.Unmarshal(m, b)
-}
-func (m *LocalTestingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_LocalTestingInfo.Marshal(b, m, deterministic)
-}
-func (m *LocalTestingInfo) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_LocalTestingInfo.Merge(m, src)
-}
-func (m *LocalTestingInfo) XXX_Size() int {
-	return xxx_messageInfo_LocalTestingInfo.Size(m)
-}
-func (m *LocalTestingInfo) XXX_DiscardUnknown() {
-	xxx_messageInfo_LocalTestingInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LocalTestingInfo proto.InternalMessageInfo
-
-func (m *LocalTestingInfo) GetEnabled() bool {
-	if m != nil {
-		return m.Enabled
-	}
-	return false
-}
-
-func (m *LocalTestingInfo) GetLocalTestingPath() string {
-	if m != nil {
-		return m.LocalTestingPath
-	}
-	return ""
-}
-
-func init() {
-	proto.RegisterEnum("android.bundle.DeliveryType", DeliveryType_name, DeliveryType_value)
-	proto.RegisterEnum("android.bundle.SystemApkMetadata_SystemApkType", SystemApkMetadata_SystemApkType_name, SystemApkMetadata_SystemApkType_value)
-	proto.RegisterType((*BuildApksResult)(nil), "android.bundle.BuildApksResult")
-	proto.RegisterType((*Variant)(nil), "android.bundle.Variant")
-	proto.RegisterType((*ApkSet)(nil), "android.bundle.ApkSet")
-	proto.RegisterType((*ModuleMetadata)(nil), "android.bundle.ModuleMetadata")
-	proto.RegisterType((*AssetSliceSet)(nil), "android.bundle.AssetSliceSet")
-	proto.RegisterType((*AssetModuleMetadata)(nil), "android.bundle.AssetModuleMetadata")
-	proto.RegisterType((*InstantMetadata)(nil), "android.bundle.InstantMetadata")
-	proto.RegisterType((*ApkDescription)(nil), "android.bundle.ApkDescription")
-	proto.RegisterType((*SplitApkMetadata)(nil), "android.bundle.SplitApkMetadata")
-	proto.RegisterType((*StandaloneApkMetadata)(nil), "android.bundle.StandaloneApkMetadata")
-	proto.RegisterType((*SystemApkMetadata)(nil), "android.bundle.SystemApkMetadata")
-	proto.RegisterType((*ApexApkMetadata)(nil), "android.bundle.ApexApkMetadata")
-	proto.RegisterType((*LocalTestingInfo)(nil), "android.bundle.LocalTestingInfo")
-}
-
-func init() {
-	proto.RegisterFile("commands.proto", fileDescriptor_0dff099eb2e3dfdb)
-}
-
-var fileDescriptor_0dff099eb2e3dfdb = []byte{
-	// 1104 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0xe2, 0x46,
-	0x14, 0x5e, 0x03, 0x0b, 0xe1, 0x05, 0xb0, 0x33, 0x1b, 0xba, 0xde, 0x68, 0x77, 0xcb, 0xba, 0x4a,
-	0x85, 0xa2, 0x2a, 0xab, 0xa6, 0x3d, 0xad, 0xd4, 0x4a, 0x10, 0x9c, 0x96, 0x2d, 0x90, 0xc8, 0x26,
-	0x89, 0x92, 0x4a, 0x1d, 0x4d, 0x98, 0x49, 0xd6, 0xc2, 0xbf, 0xca, 0x98, 0x28, 0xf9, 0x57, 0x7a,
-	0xa9, 0x7a, 0xec, 0xb1, 0xd7, 0xfe, 0x51, 0x3d, 0xf5, 0xde, 0xca, 0x63, 0x03, 0xb6, 0xb1, 0xd4,
-	0x64, 0xd5, 0x13, 0x7e, 0x6f, 0xbe, 0xf9, 0xe6, 0xbd, 0xf7, 0xbd, 0x79, 0x0c, 0x34, 0x26, 0x9e,
-	0xe3, 0x10, 0x97, 0xf2, 0x7d, 0x7f, 0xe6, 0x05, 0x1e, 0x6a, 0x10, 0x97, 0xce, 0x3c, 0x8b, 0xee,
-	0x5f, 0xcd, 0x5d, 0x6a, 0xb3, 0x9d, 0xda, 0xc4, 0x73, 0xaf, 0xad, 0x9b, 0x68, 0x75, 0x47, 0x0e,
-	0xc8, 0xec, 0x86, 0x05, 0x96, 0x1b, 0x3b, 0xb4, 0x3f, 0x0b, 0x20, 0x77, 0xe7, 0x96, 0x4d, 0x3b,
-	0xfe, 0x94, 0x1b, 0x8c, 0xcf, 0xed, 0x00, 0xbd, 0x81, 0x9a, 0x4f, 0x26, 0x53, 0x72, 0xc3, 0xb0,
-	0x4b, 0x1c, 0xa6, 0x96, 0x5a, 0x52, 0xbb, 0x6a, 0x6c, 0xc6, 0xbe, 0x11, 0x71, 0x18, 0xfa, 0x12,
-	0x2a, 0xb7, 0x64, 0x66, 0x11, 0x37, 0x50, 0xa5, 0x56, 0xb1, 0xbd, 0x79, 0xf0, 0x7c, 0x3f, 0x7d,
-	0xee, 0xfe, 0x59, 0xb4, 0x6c, 0x2c, 0x70, 0xe8, 0x1d, 0x40, 0xb4, 0x14, 0x78, 0x9e, 0xad, 0x16,
-	0x5a, 0x52, 0x7b, 0xf3, 0x60, 0x27, 0xbb, 0xab, 0xbb, 0x44, 0x18, 0x09, 0x34, 0xd2, 0x41, 0x26,
-	0x9c, 0xb3, 0x00, 0x73, 0xdb, 0x9a, 0x30, 0xcc, 0x59, 0xa0, 0x16, 0xc5, 0xb1, 0xaf, 0xb2, 0x04,
-	0x9d, 0x10, 0x66, 0x86, 0x28, 0x93, 0x05, 0x46, 0x9d, 0x24, 0x4d, 0x34, 0x02, 0x64, 0x7b, 0x13,
-	0x62, 0xe3, 0x80, 0xf1, 0xb0, 0x06, 0xd8, 0x72, 0xaf, 0x3d, 0xf5, 0xa9, 0x08, 0xa5, 0x95, 0x65,
-	0x1a, 0x84, 0xc8, 0x71, 0x04, 0xec, 0xbb, 0xd7, 0x9e, 0xa1, 0xd8, 0x19, 0x8f, 0xf6, 0x9b, 0x04,
-	0x95, 0x38, 0x4f, 0xf4, 0x2d, 0x54, 0x97, 0xb5, 0x55, 0xa5, 0x7c, 0xca, 0x18, 0x3b, 0x5e, 0xe0,
-	0x8c, 0xd5, 0x16, 0xf4, 0x16, 0x2a, 0xc4, 0x9f, 0x8a, 0xd4, 0x0a, 0x22, 0xb5, 0x4f, 0xd6, 0x52,
-	0xf3, 0xa7, 0x61, 0x4e, 0x65, 0x22, 0x7e, 0xd1, 0x2e, 0x34, 0xe2, 0xd2, 0x62, 0x77, 0xee, 0x5c,
-	0xb1, 0x99, 0x5a, 0x6c, 0x49, 0xed, 0xba, 0x51, 0x8f, 0xbd, 0x23, 0xe1, 0xd4, 0x7e, 0x91, 0xa0,
-	0x1c, 0xed, 0x44, 0xdf, 0x81, 0xec, 0x78, 0x74, 0x6e, 0x33, 0xec, 0xb0, 0x80, 0x50, 0x12, 0x90,
-	0x38, 0xd0, 0xd7, 0xd9, 0xa3, 0x86, 0x02, 0x36, 0x8c, 0x51, 0x46, 0xc3, 0x49, 0xd9, 0x21, 0x51,
-	0x18, 0x2b, 0x65, 0x7c, 0x32, 0xb3, 0xfc, 0xc0, 0xf2, 0xdc, 0x38, 0xe6, 0xd7, 0x39, 0x31, 0xf7,
-	0x56, 0x28, 0xa3, 0x41, 0x52, 0xb6, 0xf6, 0x6b, 0x01, 0x1a, 0xe9, 0xb3, 0x10, 0x82, 0x92, 0x68,
-	0x3a, 0x49, 0x34, 0x9d, 0xf8, 0x46, 0x1d, 0xa8, 0x53, 0x66, 0x5b, 0xb7, 0x6c, 0x76, 0x8f, 0x83,
-	0x7b, 0x9f, 0xa9, 0xe5, 0x96, 0xd4, 0x6e, 0x1c, 0xbc, 0xcc, 0x9e, 0xd6, 0x8b, 0x41, 0xe3, 0x7b,
-	0x9f, 0x19, 0x35, 0x9a, 0xb0, 0xd0, 0x2b, 0x00, 0x8b, 0x63, 0xcb, 0xe5, 0x41, 0xd8, 0xb3, 0x61,
-	0xa5, 0x36, 0x8c, 0xaa, 0xc5, 0xfb, 0x91, 0x03, 0x69, 0x50, 0xa3, 0xcc, 0x67, 0x2e, 0x65, 0xee,
-	0xc4, 0x62, 0x5c, 0x2d, 0xb5, 0x8a, 0xed, 0xaa, 0x91, 0xf2, 0xa1, 0x6f, 0x92, 0x0a, 0x47, 0x4d,
-	0xf3, 0x69, 0x7e, 0xe1, 0x72, 0x05, 0xfe, 0x1a, 0xb6, 0x3d, 0x17, 0x53, 0x16, 0x5e, 0x56, 0x4c,
-	0x99, 0x3f, 0x63, 0x13, 0x12, 0x30, 0x2a, 0x6e, 0xc2, 0x46, 0xb7, 0xa0, 0x4a, 0x06, 0xf2, 0xdc,
-	0x9e, 0x58, 0xee, 0x2d, 0x57, 0xb5, 0x3f, 0x24, 0xa8, 0xa7, 0x7a, 0x1a, 0x9d, 0x43, 0x33, 0xba,
-	0x0b, 0xf9, 0x5a, 0x7e, 0x96, 0x7b, 0x23, 0x32, 0x82, 0x3e, 0x23, 0xeb, 0xce, 0xff, 0x4f, 0xd5,
-	0xbf, 0x24, 0x78, 0x96, 0x73, 0xea, 0xc3, 0xa4, 0x2d, 0x3d, 0x5a, 0xda, 0xf7, 0xa0, 0xc4, 0xba,
-	0xae, 0x6a, 0x51, 0xcc, 0x97, 0x27, 0x96, 0x7b, 0x59, 0x07, 0xd9, 0x4a, 0x3b, 0x3e, 0x52, 0xa4,
-	0xdf, 0x25, 0x90, 0x33, 0xd4, 0x99, 0x86, 0x93, 0xb2, 0x0d, 0xb7, 0x96, 0x77, 0xf1, 0xd1, 0x79,
-	0x7f, 0x5c, 0xac, 0xff, 0x94, 0xa0, 0x91, 0xd6, 0x0f, 0xbd, 0x5b, 0x1f, 0x5d, 0x2f, 0x73, 0x24,
-	0xcf, 0xed, 0x6a, 0x04, 0x25, 0x9f, 0x04, 0x1f, 0xc4, 0xa1, 0x55, 0x43, 0x7c, 0xa3, 0x13, 0x40,
-	0xdc, 0xb7, 0xad, 0x00, 0x87, 0xed, 0x94, 0x91, 0x64, 0x6d, 0x26, 0x9a, 0x21, 0xb2, 0xe3, 0x4f,
-	0x17, 0x85, 0xfb, 0xfe, 0x89, 0xa1, 0xf0, 0x8c, 0x0f, 0x61, 0x78, 0x1e, 0x96, 0x8d, 0x12, 0xdb,
-	0x73, 0x59, 0x9a, 0xb6, 0x24, 0x68, 0x77, 0xd7, 0x68, 0x97, 0xf0, 0x34, 0x77, 0x93, 0xe7, 0x2d,
-	0xa0, 0x31, 0x6c, 0x2f, 0x7a, 0x28, 0xc5, 0xfe, 0xf4, 0xc1, 0x41, 0xa3, 0x78, 0x7f, 0x92, 0xd5,
-	0x84, 0x67, 0xfc, 0x9e, 0x07, 0xcc, 0x49, 0x93, 0x96, 0x05, 0xe9, 0x9b, 0x35, 0x52, 0x01, 0x4d,
-	0xb3, 0x6e, 0xf1, 0xac, 0x33, 0x0c, 0x35, 0xf9, 0x5f, 0xb8, 0x64, 0xad, 0x3c, 0x3c, 0xd4, 0xd5,
-	0xbf, 0xe2, 0x92, 0x75, 0x08, 0x5b, 0xc4, 0x67, 0x77, 0xe9, 0x40, 0x37, 0xf2, 0x6f, 0x51, 0xc7,
-	0x67, 0x77, 0x69, 0x46, 0x99, 0xa4, 0x5d, 0xdd, 0x1d, 0x50, 0x93, 0x4c, 0xd8, 0x73, 0x99, 0x77,
-	0x8d, 0x6f, 0x89, 0x3d, 0x67, 0xda, 0x29, 0x28, 0xd9, 0xa0, 0xd0, 0x0b, 0xd8, 0x88, 0x5a, 0xc6,
-	0xa2, 0xf1, 0x78, 0xa8, 0x08, 0xbb, 0x4f, 0xd1, 0xe7, 0x20, 0x5b, 0x1c, 0x3b, 0x84, 0x07, 0x6c,
-	0x86, 0x85, 0x33, 0xea, 0x70, 0xa3, 0x6e, 0xf1, 0xa1, 0xf0, 0x0a, 0x36, 0xad, 0x0f, 0xcd, 0x5c,
-	0xd1, 0xd1, 0x1e, 0x6c, 0x5d, 0xcf, 0x39, 0xa3, 0x8b, 0x81, 0x19, 0xcf, 0xa0, 0x70, 0xc0, 0xcb,
-	0x62, 0x21, 0x1a, 0x53, 0xe1, 0xbb, 0xe6, 0x7d, 0x69, 0xa3, 0xa0, 0x14, 0xb5, 0xbf, 0x25, 0xd8,
-	0x5a, 0x53, 0xe3, 0x31, 0x3c, 0xe8, 0x1c, 0xe4, 0x84, 0xf2, 0xe2, 0x82, 0x17, 0xc4, 0x05, 0x7f,
-	0xfb, 0x9f, 0xaa, 0xaf, 0x3c, 0xe2, 0xce, 0xd7, 0x79, 0xd2, 0xd4, 0x2e, 0xa1, 0x9e, 0x5a, 0x47,
-	0x4d, 0xd8, 0x3a, 0x1d, 0x99, 0x27, 0xfa, 0x61, 0xff, 0xa8, 0xaf, 0xf7, 0xf0, 0x59, 0x67, 0x70,
-	0xaa, 0x2b, 0x4f, 0x10, 0x40, 0xd9, 0xbc, 0x30, 0xc7, 0xfa, 0x50, 0x91, 0x90, 0x0c, 0x9b, 0xd1,
-	0x37, 0x36, 0xc7, 0xa7, 0x5d, 0xa5, 0x10, 0xee, 0x89, 0x1d, 0x87, 0xc7, 0xc3, 0x13, 0x43, 0x37,
-	0x4d, 0xbd, 0xa7, 0x14, 0xb5, 0x9f, 0x41, 0xce, 0x48, 0x8b, 0x7e, 0x0a, 0x75, 0x64, 0x77, 0x98,
-	0x39, 0x57, 0x8c, 0x52, 0x46, 0x45, 0x3a, 0xd1, 0x8b, 0x32, 0x7e, 0xf8, 0xed, 0xe6, 0x75, 0x87,
-	0x1e, 0xc3, 0x3b, 0xfe, 0xf4, 0x50, 0x80, 0x8d, 0x26, 0xc9, 0x73, 0x6b, 0x97, 0xa0, 0x64, 0xdf,
-	0x59, 0x48, 0x85, 0x0a, 0x73, 0xc9, 0x95, 0xcd, 0x68, 0x3c, 0x36, 0x17, 0x26, 0xfa, 0x22, 0xfb,
-	0x7e, 0x4b, 0x8c, 0x9e, 0xd4, 0xeb, 0xec, 0x84, 0x04, 0x1f, 0xf6, 0x7e, 0x84, 0x5a, 0x72, 0x7a,
-	0xa2, 0x17, 0xd0, 0x3c, 0x1d, 0xfd, 0x30, 0x3a, 0x3e, 0x1f, 0xe1, 0x9e, 0x3e, 0xe8, 0x9f, 0xe9,
-	0xc6, 0x05, 0x1e, 0x5f, 0x9c, 0x84, 0xd5, 0x52, 0xa0, 0xd6, 0x1f, 0x99, 0xe3, 0xce, 0x60, 0x80,
-	0xc7, 0xfd, 0xa1, 0xae, 0x48, 0xa8, 0x0e, 0xd5, 0xe3, 0x10, 0x37, 0xec, 0x8c, 0x7a, 0x4a, 0x21,
-	0x2c, 0xe1, 0x51, 0xc7, 0x1c, 0xe3, 0xa3, 0xe3, 0xc1, 0xe0, 0xf8, 0x5c, 0x29, 0x76, 0xf7, 0x00,
-	0x4d, 0x3c, 0x27, 0x93, 0xfb, 0xe5, 0x76, 0x6c, 0xe3, 0xc8, 0xc6, 0xe2, 0x8d, 0x7d, 0x55, 0x16,
-	0x3f, 0x5f, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xe5, 0xcb, 0x87, 0xab, 0x0b, 0x00, 0x00,
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_commands_proto_rawDesc,
+			NumEnums:      2,
+			NumMessages:   13,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_commands_proto_goTypes,
+		DependencyIndexes: file_commands_proto_depIdxs,
+		EnumInfos:         file_commands_proto_enumTypes,
+		MessageInfos:      file_commands_proto_msgTypes,
+	}.Build()
+	File_commands_proto = out.File
+	file_commands_proto_rawDesc = nil
+	file_commands_proto_goTypes = nil
+	file_commands_proto_depIdxs = nil
 }
diff --git a/cmd/extract_apks/bundle_proto/commands.proto b/cmd/extract_apks/bundle_proto/commands.proto
index b36340b..a24e26d 100644
--- a/cmd/extract_apks/bundle_proto/commands.proto
+++ b/cmd/extract_apks/bundle_proto/commands.proto
@@ -9,7 +9,7 @@
 import "config.proto";
 import "targeting.proto";
 
-option go_package = "android_bundle_proto";
+option go_package = "android/soong/cmd/extract_apks/bundle_proto";
 option java_package = "com.android.bundle";
 
 // Describes the output of the "build-apks" command.
diff --git a/cmd/extract_apks/bundle_proto/config.pb.go b/cmd/extract_apks/bundle_proto/config.pb.go
index a28147a..e358c4b 100644
--- a/cmd/extract_apks/bundle_proto/config.pb.go
+++ b/cmd/extract_apks/bundle_proto/config.pb.go
@@ -1,24 +1,29 @@
+// Messages describing APK Set's table of contents (toc.pb entry).
+// Please be advised that the ultimate source is at
+// https://github.com/google/bundletool/tree/master/src/main/proto
+// so you have been warned.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: config.proto
 
-package android_bundle_proto
+package bundle_proto
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 type BundleConfig_BundleType int32
 
@@ -28,24 +33,45 @@
 	BundleConfig_ASSET_ONLY BundleConfig_BundleType = 2
 )
 
-var BundleConfig_BundleType_name = map[int32]string{
-	0: "REGULAR",
-	1: "APEX",
-	2: "ASSET_ONLY",
-}
+// Enum value maps for BundleConfig_BundleType.
+var (
+	BundleConfig_BundleType_name = map[int32]string{
+		0: "REGULAR",
+		1: "APEX",
+		2: "ASSET_ONLY",
+	}
+	BundleConfig_BundleType_value = map[string]int32{
+		"REGULAR":    0,
+		"APEX":       1,
+		"ASSET_ONLY": 2,
+	}
+)
 
-var BundleConfig_BundleType_value = map[string]int32{
-	"REGULAR":    0,
-	"APEX":       1,
-	"ASSET_ONLY": 2,
+func (x BundleConfig_BundleType) Enum() *BundleConfig_BundleType {
+	p := new(BundleConfig_BundleType)
+	*p = x
+	return p
 }
 
 func (x BundleConfig_BundleType) String() string {
-	return proto.EnumName(BundleConfig_BundleType_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
+func (BundleConfig_BundleType) Descriptor() protoreflect.EnumDescriptor {
+	return file_config_proto_enumTypes[0].Descriptor()
+}
+
+func (BundleConfig_BundleType) Type() protoreflect.EnumType {
+	return &file_config_proto_enumTypes[0]
+}
+
+func (x BundleConfig_BundleType) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use BundleConfig_BundleType.Descriptor instead.
 func (BundleConfig_BundleType) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{0, 0}
+	return file_config_proto_rawDescGZIP(), []int{0, 0}
 }
 
 type SplitDimension_Value int32
@@ -57,36 +83,61 @@
 	SplitDimension_LANGUAGE                   SplitDimension_Value = 3
 	SplitDimension_TEXTURE_COMPRESSION_FORMAT SplitDimension_Value = 4
 	// BEGIN-INTERNAL
-	SplitDimension_GRAPHICS_API SplitDimension_Value = 5
+	SplitDimension_GRAPHICS_API SplitDimension_Value = 5 // END-INTERNAL
 )
 
-var SplitDimension_Value_name = map[int32]string{
-	0: "UNSPECIFIED_VALUE",
-	1: "ABI",
-	2: "SCREEN_DENSITY",
-	3: "LANGUAGE",
-	4: "TEXTURE_COMPRESSION_FORMAT",
-	5: "GRAPHICS_API",
-}
+// Enum value maps for SplitDimension_Value.
+var (
+	SplitDimension_Value_name = map[int32]string{
+		0: "UNSPECIFIED_VALUE",
+		1: "ABI",
+		2: "SCREEN_DENSITY",
+		3: "LANGUAGE",
+		4: "TEXTURE_COMPRESSION_FORMAT",
+		5: "GRAPHICS_API",
+	}
+	SplitDimension_Value_value = map[string]int32{
+		"UNSPECIFIED_VALUE":          0,
+		"ABI":                        1,
+		"SCREEN_DENSITY":             2,
+		"LANGUAGE":                   3,
+		"TEXTURE_COMPRESSION_FORMAT": 4,
+		"GRAPHICS_API":               5,
+	}
+)
 
-var SplitDimension_Value_value = map[string]int32{
-	"UNSPECIFIED_VALUE":          0,
-	"ABI":                        1,
-	"SCREEN_DENSITY":             2,
-	"LANGUAGE":                   3,
-	"TEXTURE_COMPRESSION_FORMAT": 4,
-	"GRAPHICS_API":               5,
+func (x SplitDimension_Value) Enum() *SplitDimension_Value {
+	p := new(SplitDimension_Value)
+	*p = x
+	return p
 }
 
 func (x SplitDimension_Value) String() string {
-	return proto.EnumName(SplitDimension_Value_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
+func (SplitDimension_Value) Descriptor() protoreflect.EnumDescriptor {
+	return file_config_proto_enumTypes[1].Descriptor()
+}
+
+func (SplitDimension_Value) Type() protoreflect.EnumType {
+	return &file_config_proto_enumTypes[1]
+}
+
+func (x SplitDimension_Value) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SplitDimension_Value.Descriptor instead.
 func (SplitDimension_Value) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{9, 0}
+	return file_config_proto_rawDescGZIP(), []int{9, 0}
 }
 
 type BundleConfig struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Bundletool    *Bundletool    `protobuf:"bytes,1,opt,name=bundletool,proto3" json:"bundletool,omitempty"`
 	Optimizations *Optimizations `protobuf:"bytes,2,opt,name=optimizations,proto3" json:"optimizations,omitempty"`
 	Compression   *Compression   `protobuf:"bytes,3,opt,name=compression,proto3" json:"compression,omitempty"`
@@ -97,226 +148,258 @@
 	UnsignedEmbeddedApkConfig []*UnsignedEmbeddedApkConfig `protobuf:"bytes,6,rep,name=unsigned_embedded_apk_config,json=unsignedEmbeddedApkConfig,proto3" json:"unsigned_embedded_apk_config,omitempty"`
 	AssetModulesConfig        *AssetModulesConfig          `protobuf:"bytes,7,opt,name=asset_modules_config,json=assetModulesConfig,proto3" json:"asset_modules_config,omitempty"`
 	Type                      BundleConfig_BundleType      `protobuf:"varint,8,opt,name=type,proto3,enum=android.bundle.BundleConfig_BundleType" json:"type,omitempty"`
-	XXX_NoUnkeyedLiteral      struct{}                     `json:"-"`
-	XXX_unrecognized          []byte                       `json:"-"`
-	XXX_sizecache             int32                        `json:"-"`
 }
 
-func (m *BundleConfig) Reset()         { *m = BundleConfig{} }
-func (m *BundleConfig) String() string { return proto.CompactTextString(m) }
-func (*BundleConfig) ProtoMessage()    {}
+func (x *BundleConfig) Reset() {
+	*x = BundleConfig{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BundleConfig) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BundleConfig) ProtoMessage() {}
+
+func (x *BundleConfig) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use BundleConfig.ProtoReflect.Descriptor instead.
 func (*BundleConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{0}
+	return file_config_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *BundleConfig) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_BundleConfig.Unmarshal(m, b)
-}
-func (m *BundleConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_BundleConfig.Marshal(b, m, deterministic)
-}
-func (m *BundleConfig) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BundleConfig.Merge(m, src)
-}
-func (m *BundleConfig) XXX_Size() int {
-	return xxx_messageInfo_BundleConfig.Size(m)
-}
-func (m *BundleConfig) XXX_DiscardUnknown() {
-	xxx_messageInfo_BundleConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BundleConfig proto.InternalMessageInfo
-
-func (m *BundleConfig) GetBundletool() *Bundletool {
-	if m != nil {
-		return m.Bundletool
+func (x *BundleConfig) GetBundletool() *Bundletool {
+	if x != nil {
+		return x.Bundletool
 	}
 	return nil
 }
 
-func (m *BundleConfig) GetOptimizations() *Optimizations {
-	if m != nil {
-		return m.Optimizations
+func (x *BundleConfig) GetOptimizations() *Optimizations {
+	if x != nil {
+		return x.Optimizations
 	}
 	return nil
 }
 
-func (m *BundleConfig) GetCompression() *Compression {
-	if m != nil {
-		return m.Compression
+func (x *BundleConfig) GetCompression() *Compression {
+	if x != nil {
+		return x.Compression
 	}
 	return nil
 }
 
-func (m *BundleConfig) GetMasterResources() *MasterResources {
-	if m != nil {
-		return m.MasterResources
+func (x *BundleConfig) GetMasterResources() *MasterResources {
+	if x != nil {
+		return x.MasterResources
 	}
 	return nil
 }
 
-func (m *BundleConfig) GetApexConfig() *ApexConfig {
-	if m != nil {
-		return m.ApexConfig
+func (x *BundleConfig) GetApexConfig() *ApexConfig {
+	if x != nil {
+		return x.ApexConfig
 	}
 	return nil
 }
 
-func (m *BundleConfig) GetUnsignedEmbeddedApkConfig() []*UnsignedEmbeddedApkConfig {
-	if m != nil {
-		return m.UnsignedEmbeddedApkConfig
+func (x *BundleConfig) GetUnsignedEmbeddedApkConfig() []*UnsignedEmbeddedApkConfig {
+	if x != nil {
+		return x.UnsignedEmbeddedApkConfig
 	}
 	return nil
 }
 
-func (m *BundleConfig) GetAssetModulesConfig() *AssetModulesConfig {
-	if m != nil {
-		return m.AssetModulesConfig
+func (x *BundleConfig) GetAssetModulesConfig() *AssetModulesConfig {
+	if x != nil {
+		return x.AssetModulesConfig
 	}
 	return nil
 }
 
-func (m *BundleConfig) GetType() BundleConfig_BundleType {
-	if m != nil {
-		return m.Type
+func (x *BundleConfig) GetType() BundleConfig_BundleType {
+	if x != nil {
+		return x.Type
 	}
 	return BundleConfig_REGULAR
 }
 
 type Bundletool struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Version of BundleTool used to build the Bundle.
-	Version              string   `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
 }
 
-func (m *Bundletool) Reset()         { *m = Bundletool{} }
-func (m *Bundletool) String() string { return proto.CompactTextString(m) }
-func (*Bundletool) ProtoMessage()    {}
+func (x *Bundletool) Reset() {
+	*x = Bundletool{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Bundletool) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Bundletool) ProtoMessage() {}
+
+func (x *Bundletool) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Bundletool.ProtoReflect.Descriptor instead.
 func (*Bundletool) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{1}
+	return file_config_proto_rawDescGZIP(), []int{1}
 }
 
-func (m *Bundletool) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Bundletool.Unmarshal(m, b)
-}
-func (m *Bundletool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Bundletool.Marshal(b, m, deterministic)
-}
-func (m *Bundletool) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Bundletool.Merge(m, src)
-}
-func (m *Bundletool) XXX_Size() int {
-	return xxx_messageInfo_Bundletool.Size(m)
-}
-func (m *Bundletool) XXX_DiscardUnknown() {
-	xxx_messageInfo_Bundletool.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Bundletool proto.InternalMessageInfo
-
-func (m *Bundletool) GetVersion() string {
-	if m != nil {
-		return m.Version
+func (x *Bundletool) GetVersion() string {
+	if x != nil {
+		return x.Version
 	}
 	return ""
 }
 
 type Compression struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Glob matching the list of files to leave uncompressed in the APKs.
 	// The matching is done against the path of files in the APK, thus excluding
 	// the name of the modules, and using forward slash ("/") as a name separator.
 	// Examples: "res/raw/**", "assets/**/*.uncompressed", etc.
-	UncompressedGlob     []string `protobuf:"bytes,1,rep,name=uncompressed_glob,json=uncompressedGlob,proto3" json:"uncompressed_glob,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	UncompressedGlob []string `protobuf:"bytes,1,rep,name=uncompressed_glob,json=uncompressedGlob,proto3" json:"uncompressed_glob,omitempty"`
 }
 
-func (m *Compression) Reset()         { *m = Compression{} }
-func (m *Compression) String() string { return proto.CompactTextString(m) }
-func (*Compression) ProtoMessage()    {}
+func (x *Compression) Reset() {
+	*x = Compression{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Compression) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Compression) ProtoMessage() {}
+
+func (x *Compression) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Compression.ProtoReflect.Descriptor instead.
 func (*Compression) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{2}
+	return file_config_proto_rawDescGZIP(), []int{2}
 }
 
-func (m *Compression) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Compression.Unmarshal(m, b)
-}
-func (m *Compression) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Compression.Marshal(b, m, deterministic)
-}
-func (m *Compression) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Compression.Merge(m, src)
-}
-func (m *Compression) XXX_Size() int {
-	return xxx_messageInfo_Compression.Size(m)
-}
-func (m *Compression) XXX_DiscardUnknown() {
-	xxx_messageInfo_Compression.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Compression proto.InternalMessageInfo
-
-func (m *Compression) GetUncompressedGlob() []string {
-	if m != nil {
-		return m.UncompressedGlob
+func (x *Compression) GetUncompressedGlob() []string {
+	if x != nil {
+		return x.UncompressedGlob
 	}
 	return nil
 }
 
 // Resources to keep in the master split.
 type MasterResources struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Resource IDs to be kept in master split.
 	ResourceIds []int32 `protobuf:"varint,1,rep,packed,name=resource_ids,json=resourceIds,proto3" json:"resource_ids,omitempty"`
 	// Resource names to be kept in master split.
-	ResourceNames        []string `protobuf:"bytes,2,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	ResourceNames []string `protobuf:"bytes,2,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"`
 }
 
-func (m *MasterResources) Reset()         { *m = MasterResources{} }
-func (m *MasterResources) String() string { return proto.CompactTextString(m) }
-func (*MasterResources) ProtoMessage()    {}
+func (x *MasterResources) Reset() {
+	*x = MasterResources{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MasterResources) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MasterResources) ProtoMessage() {}
+
+func (x *MasterResources) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use MasterResources.ProtoReflect.Descriptor instead.
 func (*MasterResources) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{3}
+	return file_config_proto_rawDescGZIP(), []int{3}
 }
 
-func (m *MasterResources) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_MasterResources.Unmarshal(m, b)
-}
-func (m *MasterResources) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_MasterResources.Marshal(b, m, deterministic)
-}
-func (m *MasterResources) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MasterResources.Merge(m, src)
-}
-func (m *MasterResources) XXX_Size() int {
-	return xxx_messageInfo_MasterResources.Size(m)
-}
-func (m *MasterResources) XXX_DiscardUnknown() {
-	xxx_messageInfo_MasterResources.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_MasterResources proto.InternalMessageInfo
-
-func (m *MasterResources) GetResourceIds() []int32 {
-	if m != nil {
-		return m.ResourceIds
+func (x *MasterResources) GetResourceIds() []int32 {
+	if x != nil {
+		return x.ResourceIds
 	}
 	return nil
 }
 
-func (m *MasterResources) GetResourceNames() []string {
-	if m != nil {
-		return m.ResourceNames
+func (x *MasterResources) GetResourceNames() []string {
+	if x != nil {
+		return x.ResourceNames
 	}
 	return nil
 }
 
 type Optimizations struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	SplitsConfig *SplitsConfig `protobuf:"bytes,1,opt,name=splits_config,json=splitsConfig,proto3" json:"splits_config,omitempty"`
 	// This is for uncompressing native libraries on M+ devices (L+ devices on
 	// instant apps).
@@ -326,293 +409,341 @@
 	// Configuration for the generation of standalone APKs.
 	// If no StandaloneConfig is set, the configuration is inherited from
 	// splits_config.
-	StandaloneConfig     *StandaloneConfig `protobuf:"bytes,4,opt,name=standalone_config,json=standaloneConfig,proto3" json:"standalone_config,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
-	XXX_unrecognized     []byte            `json:"-"`
-	XXX_sizecache        int32             `json:"-"`
+	StandaloneConfig *StandaloneConfig `protobuf:"bytes,4,opt,name=standalone_config,json=standaloneConfig,proto3" json:"standalone_config,omitempty"`
 }
 
-func (m *Optimizations) Reset()         { *m = Optimizations{} }
-func (m *Optimizations) String() string { return proto.CompactTextString(m) }
-func (*Optimizations) ProtoMessage()    {}
+func (x *Optimizations) Reset() {
+	*x = Optimizations{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Optimizations) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Optimizations) ProtoMessage() {}
+
+func (x *Optimizations) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Optimizations.ProtoReflect.Descriptor instead.
 func (*Optimizations) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{4}
+	return file_config_proto_rawDescGZIP(), []int{4}
 }
 
-func (m *Optimizations) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Optimizations.Unmarshal(m, b)
-}
-func (m *Optimizations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Optimizations.Marshal(b, m, deterministic)
-}
-func (m *Optimizations) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Optimizations.Merge(m, src)
-}
-func (m *Optimizations) XXX_Size() int {
-	return xxx_messageInfo_Optimizations.Size(m)
-}
-func (m *Optimizations) XXX_DiscardUnknown() {
-	xxx_messageInfo_Optimizations.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Optimizations proto.InternalMessageInfo
-
-func (m *Optimizations) GetSplitsConfig() *SplitsConfig {
-	if m != nil {
-		return m.SplitsConfig
+func (x *Optimizations) GetSplitsConfig() *SplitsConfig {
+	if x != nil {
+		return x.SplitsConfig
 	}
 	return nil
 }
 
-func (m *Optimizations) GetUncompressNativeLibraries() *UncompressNativeLibraries {
-	if m != nil {
-		return m.UncompressNativeLibraries
+func (x *Optimizations) GetUncompressNativeLibraries() *UncompressNativeLibraries {
+	if x != nil {
+		return x.UncompressNativeLibraries
 	}
 	return nil
 }
 
-func (m *Optimizations) GetUncompressDexFiles() *UncompressDexFiles {
-	if m != nil {
-		return m.UncompressDexFiles
+func (x *Optimizations) GetUncompressDexFiles() *UncompressDexFiles {
+	if x != nil {
+		return x.UncompressDexFiles
 	}
 	return nil
 }
 
-func (m *Optimizations) GetStandaloneConfig() *StandaloneConfig {
-	if m != nil {
-		return m.StandaloneConfig
+func (x *Optimizations) GetStandaloneConfig() *StandaloneConfig {
+	if x != nil {
+		return x.StandaloneConfig
 	}
 	return nil
 }
 
 type UncompressNativeLibraries struct {
-	Enabled              bool     `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
 }
 
-func (m *UncompressNativeLibraries) Reset()         { *m = UncompressNativeLibraries{} }
-func (m *UncompressNativeLibraries) String() string { return proto.CompactTextString(m) }
-func (*UncompressNativeLibraries) ProtoMessage()    {}
+func (x *UncompressNativeLibraries) Reset() {
+	*x = UncompressNativeLibraries{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UncompressNativeLibraries) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UncompressNativeLibraries) ProtoMessage() {}
+
+func (x *UncompressNativeLibraries) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UncompressNativeLibraries.ProtoReflect.Descriptor instead.
 func (*UncompressNativeLibraries) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{5}
+	return file_config_proto_rawDescGZIP(), []int{5}
 }
 
-func (m *UncompressNativeLibraries) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_UncompressNativeLibraries.Unmarshal(m, b)
-}
-func (m *UncompressNativeLibraries) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_UncompressNativeLibraries.Marshal(b, m, deterministic)
-}
-func (m *UncompressNativeLibraries) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UncompressNativeLibraries.Merge(m, src)
-}
-func (m *UncompressNativeLibraries) XXX_Size() int {
-	return xxx_messageInfo_UncompressNativeLibraries.Size(m)
-}
-func (m *UncompressNativeLibraries) XXX_DiscardUnknown() {
-	xxx_messageInfo_UncompressNativeLibraries.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UncompressNativeLibraries proto.InternalMessageInfo
-
-func (m *UncompressNativeLibraries) GetEnabled() bool {
-	if m != nil {
-		return m.Enabled
+func (x *UncompressNativeLibraries) GetEnabled() bool {
+	if x != nil {
+		return x.Enabled
 	}
 	return false
 }
 
 type UncompressDexFiles struct {
-	Enabled              bool     `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
 }
 
-func (m *UncompressDexFiles) Reset()         { *m = UncompressDexFiles{} }
-func (m *UncompressDexFiles) String() string { return proto.CompactTextString(m) }
-func (*UncompressDexFiles) ProtoMessage()    {}
+func (x *UncompressDexFiles) Reset() {
+	*x = UncompressDexFiles{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UncompressDexFiles) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UncompressDexFiles) ProtoMessage() {}
+
+func (x *UncompressDexFiles) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UncompressDexFiles.ProtoReflect.Descriptor instead.
 func (*UncompressDexFiles) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{6}
+	return file_config_proto_rawDescGZIP(), []int{6}
 }
 
-func (m *UncompressDexFiles) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_UncompressDexFiles.Unmarshal(m, b)
-}
-func (m *UncompressDexFiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_UncompressDexFiles.Marshal(b, m, deterministic)
-}
-func (m *UncompressDexFiles) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UncompressDexFiles.Merge(m, src)
-}
-func (m *UncompressDexFiles) XXX_Size() int {
-	return xxx_messageInfo_UncompressDexFiles.Size(m)
-}
-func (m *UncompressDexFiles) XXX_DiscardUnknown() {
-	xxx_messageInfo_UncompressDexFiles.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UncompressDexFiles proto.InternalMessageInfo
-
-func (m *UncompressDexFiles) GetEnabled() bool {
-	if m != nil {
-		return m.Enabled
+func (x *UncompressDexFiles) GetEnabled() bool {
+	if x != nil {
+		return x.Enabled
 	}
 	return false
 }
 
 // Optimization configuration used to generate Split APKs.
 type SplitsConfig struct {
-	SplitDimension       []*SplitDimension `protobuf:"bytes,1,rep,name=split_dimension,json=splitDimension,proto3" json:"split_dimension,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
-	XXX_unrecognized     []byte            `json:"-"`
-	XXX_sizecache        int32             `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	SplitDimension []*SplitDimension `protobuf:"bytes,1,rep,name=split_dimension,json=splitDimension,proto3" json:"split_dimension,omitempty"`
 }
 
-func (m *SplitsConfig) Reset()         { *m = SplitsConfig{} }
-func (m *SplitsConfig) String() string { return proto.CompactTextString(m) }
-func (*SplitsConfig) ProtoMessage()    {}
+func (x *SplitsConfig) Reset() {
+	*x = SplitsConfig{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SplitsConfig) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SplitsConfig) ProtoMessage() {}
+
+func (x *SplitsConfig) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[7]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SplitsConfig.ProtoReflect.Descriptor instead.
 func (*SplitsConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{7}
+	return file_config_proto_rawDescGZIP(), []int{7}
 }
 
-func (m *SplitsConfig) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SplitsConfig.Unmarshal(m, b)
-}
-func (m *SplitsConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SplitsConfig.Marshal(b, m, deterministic)
-}
-func (m *SplitsConfig) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SplitsConfig.Merge(m, src)
-}
-func (m *SplitsConfig) XXX_Size() int {
-	return xxx_messageInfo_SplitsConfig.Size(m)
-}
-func (m *SplitsConfig) XXX_DiscardUnknown() {
-	xxx_messageInfo_SplitsConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SplitsConfig proto.InternalMessageInfo
-
-func (m *SplitsConfig) GetSplitDimension() []*SplitDimension {
-	if m != nil {
-		return m.SplitDimension
+func (x *SplitsConfig) GetSplitDimension() []*SplitDimension {
+	if x != nil {
+		return x.SplitDimension
 	}
 	return nil
 }
 
 // Optimization configuration used to generate Standalone APKs.
 type StandaloneConfig struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Device targeting dimensions to shard.
 	SplitDimension []*SplitDimension `protobuf:"bytes,1,rep,name=split_dimension,json=splitDimension,proto3" json:"split_dimension,omitempty"`
 	// Whether 64 bit libraries should be stripped from Standalone APKs.
-	Strip_64BitLibraries bool     `protobuf:"varint,2,opt,name=strip_64_bit_libraries,json=strip64BitLibraries,proto3" json:"strip_64_bit_libraries,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Strip_64BitLibraries bool `protobuf:"varint,2,opt,name=strip_64_bit_libraries,json=strip64BitLibraries,proto3" json:"strip_64_bit_libraries,omitempty"`
 }
 
-func (m *StandaloneConfig) Reset()         { *m = StandaloneConfig{} }
-func (m *StandaloneConfig) String() string { return proto.CompactTextString(m) }
-func (*StandaloneConfig) ProtoMessage()    {}
+func (x *StandaloneConfig) Reset() {
+	*x = StandaloneConfig{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *StandaloneConfig) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StandaloneConfig) ProtoMessage() {}
+
+func (x *StandaloneConfig) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use StandaloneConfig.ProtoReflect.Descriptor instead.
 func (*StandaloneConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{8}
+	return file_config_proto_rawDescGZIP(), []int{8}
 }
 
-func (m *StandaloneConfig) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_StandaloneConfig.Unmarshal(m, b)
-}
-func (m *StandaloneConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_StandaloneConfig.Marshal(b, m, deterministic)
-}
-func (m *StandaloneConfig) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_StandaloneConfig.Merge(m, src)
-}
-func (m *StandaloneConfig) XXX_Size() int {
-	return xxx_messageInfo_StandaloneConfig.Size(m)
-}
-func (m *StandaloneConfig) XXX_DiscardUnknown() {
-	xxx_messageInfo_StandaloneConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_StandaloneConfig proto.InternalMessageInfo
-
-func (m *StandaloneConfig) GetSplitDimension() []*SplitDimension {
-	if m != nil {
-		return m.SplitDimension
+func (x *StandaloneConfig) GetSplitDimension() []*SplitDimension {
+	if x != nil {
+		return x.SplitDimension
 	}
 	return nil
 }
 
-func (m *StandaloneConfig) GetStrip_64BitLibraries() bool {
-	if m != nil {
-		return m.Strip_64BitLibraries
+func (x *StandaloneConfig) GetStrip_64BitLibraries() bool {
+	if x != nil {
+		return x.Strip_64BitLibraries
 	}
 	return false
 }
 
 type SplitDimension struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Value SplitDimension_Value `protobuf:"varint,1,opt,name=value,proto3,enum=android.bundle.SplitDimension_Value" json:"value,omitempty"`
 	// If set to 'true', indicates that APKs should *not* be split by this
 	// dimension.
 	Negate bool `protobuf:"varint,2,opt,name=negate,proto3" json:"negate,omitempty"`
 	// Optional transformation to be applied to asset directories where
 	// the targeting is encoded in the directory name (e.g: assets/foo#tcf_etc1)
-	SuffixStripping      *SuffixStripping `protobuf:"bytes,3,opt,name=suffix_stripping,json=suffixStripping,proto3" json:"suffix_stripping,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
-	XXX_unrecognized     []byte           `json:"-"`
-	XXX_sizecache        int32            `json:"-"`
+	SuffixStripping *SuffixStripping `protobuf:"bytes,3,opt,name=suffix_stripping,json=suffixStripping,proto3" json:"suffix_stripping,omitempty"`
 }
 
-func (m *SplitDimension) Reset()         { *m = SplitDimension{} }
-func (m *SplitDimension) String() string { return proto.CompactTextString(m) }
-func (*SplitDimension) ProtoMessage()    {}
+func (x *SplitDimension) Reset() {
+	*x = SplitDimension{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SplitDimension) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SplitDimension) ProtoMessage() {}
+
+func (x *SplitDimension) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[9]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SplitDimension.ProtoReflect.Descriptor instead.
 func (*SplitDimension) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{9}
+	return file_config_proto_rawDescGZIP(), []int{9}
 }
 
-func (m *SplitDimension) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SplitDimension.Unmarshal(m, b)
-}
-func (m *SplitDimension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SplitDimension.Marshal(b, m, deterministic)
-}
-func (m *SplitDimension) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SplitDimension.Merge(m, src)
-}
-func (m *SplitDimension) XXX_Size() int {
-	return xxx_messageInfo_SplitDimension.Size(m)
-}
-func (m *SplitDimension) XXX_DiscardUnknown() {
-	xxx_messageInfo_SplitDimension.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SplitDimension proto.InternalMessageInfo
-
-func (m *SplitDimension) GetValue() SplitDimension_Value {
-	if m != nil {
-		return m.Value
+func (x *SplitDimension) GetValue() SplitDimension_Value {
+	if x != nil {
+		return x.Value
 	}
 	return SplitDimension_UNSPECIFIED_VALUE
 }
 
-func (m *SplitDimension) GetNegate() bool {
-	if m != nil {
-		return m.Negate
+func (x *SplitDimension) GetNegate() bool {
+	if x != nil {
+		return x.Negate
 	}
 	return false
 }
 
-func (m *SplitDimension) GetSuffixStripping() *SuffixStripping {
-	if m != nil {
-		return m.SuffixStripping
+func (x *SplitDimension) GetSuffixStripping() *SuffixStripping {
+	if x != nil {
+		return x.SuffixStripping
 	}
 	return nil
 }
 
 type SuffixStripping struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// If set to 'true', indicates that the targeting suffix should be removed
 	// from assets paths for this dimension when splits (or asset slices) are
 	// generated.
@@ -632,47 +763,51 @@
 	// used (for example, if both "assets/level1_textures#tcf_etc1" and
 	// "assets/level1_textures" are present and the default suffix is empty,
 	// then only "assets/level1_textures" will be used).
-	DefaultSuffix        string   `protobuf:"bytes,2,opt,name=default_suffix,json=defaultSuffix,proto3" json:"default_suffix,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	DefaultSuffix string `protobuf:"bytes,2,opt,name=default_suffix,json=defaultSuffix,proto3" json:"default_suffix,omitempty"`
 }
 
-func (m *SuffixStripping) Reset()         { *m = SuffixStripping{} }
-func (m *SuffixStripping) String() string { return proto.CompactTextString(m) }
-func (*SuffixStripping) ProtoMessage()    {}
+func (x *SuffixStripping) Reset() {
+	*x = SuffixStripping{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[10]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SuffixStripping) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SuffixStripping) ProtoMessage() {}
+
+func (x *SuffixStripping) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[10]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SuffixStripping.ProtoReflect.Descriptor instead.
 func (*SuffixStripping) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{10}
+	return file_config_proto_rawDescGZIP(), []int{10}
 }
 
-func (m *SuffixStripping) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SuffixStripping.Unmarshal(m, b)
-}
-func (m *SuffixStripping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SuffixStripping.Marshal(b, m, deterministic)
-}
-func (m *SuffixStripping) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SuffixStripping.Merge(m, src)
-}
-func (m *SuffixStripping) XXX_Size() int {
-	return xxx_messageInfo_SuffixStripping.Size(m)
-}
-func (m *SuffixStripping) XXX_DiscardUnknown() {
-	xxx_messageInfo_SuffixStripping.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SuffixStripping proto.InternalMessageInfo
-
-func (m *SuffixStripping) GetEnabled() bool {
-	if m != nil {
-		return m.Enabled
+func (x *SuffixStripping) GetEnabled() bool {
+	if x != nil {
+		return x.Enabled
 	}
 	return false
 }
 
-func (m *SuffixStripping) GetDefaultSuffix() string {
-	if m != nil {
-		return m.DefaultSuffix
+func (x *SuffixStripping) GetDefaultSuffix() string {
+	if x != nil {
+		return x.DefaultSuffix
 	}
 	return ""
 }
@@ -680,273 +815,634 @@
 // Configuration for processing APEX bundles.
 // https://source.android.com/devices/tech/ota/apex
 type ApexConfig struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Configuration for processing of APKs embedded in an APEX image.
 	ApexEmbeddedApkConfig []*ApexEmbeddedApkConfig `protobuf:"bytes,1,rep,name=apex_embedded_apk_config,json=apexEmbeddedApkConfig,proto3" json:"apex_embedded_apk_config,omitempty"`
-	XXX_NoUnkeyedLiteral  struct{}                 `json:"-"`
-	XXX_unrecognized      []byte                   `json:"-"`
-	XXX_sizecache         int32                    `json:"-"`
 }
 
-func (m *ApexConfig) Reset()         { *m = ApexConfig{} }
-func (m *ApexConfig) String() string { return proto.CompactTextString(m) }
-func (*ApexConfig) ProtoMessage()    {}
+func (x *ApexConfig) Reset() {
+	*x = ApexConfig{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[11]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ApexConfig) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ApexConfig) ProtoMessage() {}
+
+func (x *ApexConfig) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[11]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ApexConfig.ProtoReflect.Descriptor instead.
 func (*ApexConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{11}
+	return file_config_proto_rawDescGZIP(), []int{11}
 }
 
-func (m *ApexConfig) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ApexConfig.Unmarshal(m, b)
-}
-func (m *ApexConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ApexConfig.Marshal(b, m, deterministic)
-}
-func (m *ApexConfig) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ApexConfig.Merge(m, src)
-}
-func (m *ApexConfig) XXX_Size() int {
-	return xxx_messageInfo_ApexConfig.Size(m)
-}
-func (m *ApexConfig) XXX_DiscardUnknown() {
-	xxx_messageInfo_ApexConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ApexConfig proto.InternalMessageInfo
-
-func (m *ApexConfig) GetApexEmbeddedApkConfig() []*ApexEmbeddedApkConfig {
-	if m != nil {
-		return m.ApexEmbeddedApkConfig
+func (x *ApexConfig) GetApexEmbeddedApkConfig() []*ApexEmbeddedApkConfig {
+	if x != nil {
+		return x.ApexEmbeddedApkConfig
 	}
 	return nil
 }
 
 type ApexEmbeddedApkConfig struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Android package name of the APK.
 	PackageName string `protobuf:"bytes,1,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
 	// Path to the APK within the APEX system image.
-	Path                 string   `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
 }
 
-func (m *ApexEmbeddedApkConfig) Reset()         { *m = ApexEmbeddedApkConfig{} }
-func (m *ApexEmbeddedApkConfig) String() string { return proto.CompactTextString(m) }
-func (*ApexEmbeddedApkConfig) ProtoMessage()    {}
+func (x *ApexEmbeddedApkConfig) Reset() {
+	*x = ApexEmbeddedApkConfig{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[12]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ApexEmbeddedApkConfig) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ApexEmbeddedApkConfig) ProtoMessage() {}
+
+func (x *ApexEmbeddedApkConfig) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[12]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ApexEmbeddedApkConfig.ProtoReflect.Descriptor instead.
 func (*ApexEmbeddedApkConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{12}
+	return file_config_proto_rawDescGZIP(), []int{12}
 }
 
-func (m *ApexEmbeddedApkConfig) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ApexEmbeddedApkConfig.Unmarshal(m, b)
-}
-func (m *ApexEmbeddedApkConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ApexEmbeddedApkConfig.Marshal(b, m, deterministic)
-}
-func (m *ApexEmbeddedApkConfig) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ApexEmbeddedApkConfig.Merge(m, src)
-}
-func (m *ApexEmbeddedApkConfig) XXX_Size() int {
-	return xxx_messageInfo_ApexEmbeddedApkConfig.Size(m)
-}
-func (m *ApexEmbeddedApkConfig) XXX_DiscardUnknown() {
-	xxx_messageInfo_ApexEmbeddedApkConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ApexEmbeddedApkConfig proto.InternalMessageInfo
-
-func (m *ApexEmbeddedApkConfig) GetPackageName() string {
-	if m != nil {
-		return m.PackageName
+func (x *ApexEmbeddedApkConfig) GetPackageName() string {
+	if x != nil {
+		return x.PackageName
 	}
 	return ""
 }
 
-func (m *ApexEmbeddedApkConfig) GetPath() string {
-	if m != nil {
-		return m.Path
+func (x *ApexEmbeddedApkConfig) GetPath() string {
+	if x != nil {
+		return x.Path
 	}
 	return ""
 }
 
 type UnsignedEmbeddedApkConfig struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Path to the APK inside the module (e.g. if the path inside the bundle
 	// is split/assets/example.apk, this will be assets/example.apk).
-	Path                 string   `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
 }
 
-func (m *UnsignedEmbeddedApkConfig) Reset()         { *m = UnsignedEmbeddedApkConfig{} }
-func (m *UnsignedEmbeddedApkConfig) String() string { return proto.CompactTextString(m) }
-func (*UnsignedEmbeddedApkConfig) ProtoMessage()    {}
+func (x *UnsignedEmbeddedApkConfig) Reset() {
+	*x = UnsignedEmbeddedApkConfig{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[13]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UnsignedEmbeddedApkConfig) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UnsignedEmbeddedApkConfig) ProtoMessage() {}
+
+func (x *UnsignedEmbeddedApkConfig) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[13]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UnsignedEmbeddedApkConfig.ProtoReflect.Descriptor instead.
 func (*UnsignedEmbeddedApkConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{13}
+	return file_config_proto_rawDescGZIP(), []int{13}
 }
 
-func (m *UnsignedEmbeddedApkConfig) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_UnsignedEmbeddedApkConfig.Unmarshal(m, b)
-}
-func (m *UnsignedEmbeddedApkConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_UnsignedEmbeddedApkConfig.Marshal(b, m, deterministic)
-}
-func (m *UnsignedEmbeddedApkConfig) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UnsignedEmbeddedApkConfig.Merge(m, src)
-}
-func (m *UnsignedEmbeddedApkConfig) XXX_Size() int {
-	return xxx_messageInfo_UnsignedEmbeddedApkConfig.Size(m)
-}
-func (m *UnsignedEmbeddedApkConfig) XXX_DiscardUnknown() {
-	xxx_messageInfo_UnsignedEmbeddedApkConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UnsignedEmbeddedApkConfig proto.InternalMessageInfo
-
-func (m *UnsignedEmbeddedApkConfig) GetPath() string {
-	if m != nil {
-		return m.Path
+func (x *UnsignedEmbeddedApkConfig) GetPath() string {
+	if x != nil {
+		return x.Path
 	}
 	return ""
 }
 
 type AssetModulesConfig struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// App versionCodes that will be updated with these asset modules.
 	// Only relevant for asset-only bundles.
 	AppVersion []int64 `protobuf:"varint,1,rep,packed,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"`
 	// Version tag for the asset upload.
 	// Only relevant for asset-only bundles.
-	AssetVersionTag      string   `protobuf:"bytes,2,opt,name=asset_version_tag,json=assetVersionTag,proto3" json:"asset_version_tag,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	AssetVersionTag string `protobuf:"bytes,2,opt,name=asset_version_tag,json=assetVersionTag,proto3" json:"asset_version_tag,omitempty"`
 }
 
-func (m *AssetModulesConfig) Reset()         { *m = AssetModulesConfig{} }
-func (m *AssetModulesConfig) String() string { return proto.CompactTextString(m) }
-func (*AssetModulesConfig) ProtoMessage()    {}
+func (x *AssetModulesConfig) Reset() {
+	*x = AssetModulesConfig{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_config_proto_msgTypes[14]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AssetModulesConfig) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AssetModulesConfig) ProtoMessage() {}
+
+func (x *AssetModulesConfig) ProtoReflect() protoreflect.Message {
+	mi := &file_config_proto_msgTypes[14]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AssetModulesConfig.ProtoReflect.Descriptor instead.
 func (*AssetModulesConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_3eaf2c85e69e9ea4, []int{14}
+	return file_config_proto_rawDescGZIP(), []int{14}
 }
 
-func (m *AssetModulesConfig) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_AssetModulesConfig.Unmarshal(m, b)
-}
-func (m *AssetModulesConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_AssetModulesConfig.Marshal(b, m, deterministic)
-}
-func (m *AssetModulesConfig) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_AssetModulesConfig.Merge(m, src)
-}
-func (m *AssetModulesConfig) XXX_Size() int {
-	return xxx_messageInfo_AssetModulesConfig.Size(m)
-}
-func (m *AssetModulesConfig) XXX_DiscardUnknown() {
-	xxx_messageInfo_AssetModulesConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AssetModulesConfig proto.InternalMessageInfo
-
-func (m *AssetModulesConfig) GetAppVersion() []int64 {
-	if m != nil {
-		return m.AppVersion
+func (x *AssetModulesConfig) GetAppVersion() []int64 {
+	if x != nil {
+		return x.AppVersion
 	}
 	return nil
 }
 
-func (m *AssetModulesConfig) GetAssetVersionTag() string {
-	if m != nil {
-		return m.AssetVersionTag
+func (x *AssetModulesConfig) GetAssetVersionTag() string {
+	if x != nil {
+		return x.AssetVersionTag
 	}
 	return ""
 }
 
-func init() {
-	proto.RegisterEnum("android.bundle.BundleConfig_BundleType", BundleConfig_BundleType_name, BundleConfig_BundleType_value)
-	proto.RegisterEnum("android.bundle.SplitDimension_Value", SplitDimension_Value_name, SplitDimension_Value_value)
-	proto.RegisterType((*BundleConfig)(nil), "android.bundle.BundleConfig")
-	proto.RegisterType((*Bundletool)(nil), "android.bundle.Bundletool")
-	proto.RegisterType((*Compression)(nil), "android.bundle.Compression")
-	proto.RegisterType((*MasterResources)(nil), "android.bundle.MasterResources")
-	proto.RegisterType((*Optimizations)(nil), "android.bundle.Optimizations")
-	proto.RegisterType((*UncompressNativeLibraries)(nil), "android.bundle.UncompressNativeLibraries")
-	proto.RegisterType((*UncompressDexFiles)(nil), "android.bundle.UncompressDexFiles")
-	proto.RegisterType((*SplitsConfig)(nil), "android.bundle.SplitsConfig")
-	proto.RegisterType((*StandaloneConfig)(nil), "android.bundle.StandaloneConfig")
-	proto.RegisterType((*SplitDimension)(nil), "android.bundle.SplitDimension")
-	proto.RegisterType((*SuffixStripping)(nil), "android.bundle.SuffixStripping")
-	proto.RegisterType((*ApexConfig)(nil), "android.bundle.ApexConfig")
-	proto.RegisterType((*ApexEmbeddedApkConfig)(nil), "android.bundle.ApexEmbeddedApkConfig")
-	proto.RegisterType((*UnsignedEmbeddedApkConfig)(nil), "android.bundle.UnsignedEmbeddedApkConfig")
-	proto.RegisterType((*AssetModulesConfig)(nil), "android.bundle.AssetModulesConfig")
+var File_config_proto protoreflect.FileDescriptor
+
+var file_config_proto_rawDesc = []byte{
+	0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e,
+	0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x8b,
+	0x05, 0x0a, 0x0c, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
+	0x3a, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x74, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75,
+	0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x74, 0x6f, 0x6f, 0x6c, 0x52,
+	0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x74, 0x6f, 0x6f, 0x6c, 0x12, 0x43, 0x0a, 0x0d, 0x6f,
+	0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e,
+	0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+	0x73, 0x52, 0x0d, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+	0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
+	0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
+	0x6f, 0x6e, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+	0x4a, 0x0a, 0x10, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+	0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x6e, 0x64, 0x72,
+	0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4d, 0x61, 0x73, 0x74, 0x65,
+	0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x0f, 0x6d, 0x61, 0x73, 0x74,
+	0x65, 0x72, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0b, 0x61,
+	0x70, 0x65, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x1a, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x2e, 0x41, 0x70, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x61, 0x70,
+	0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6a, 0x0a, 0x1c, 0x75, 0x6e, 0x73, 0x69,
+	0x67, 0x6e, 0x65, 0x64, 0x5f, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x70,
+	0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29,
+	0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
+	0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64,
+	0x41, 0x70, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x19, 0x75, 0x6e, 0x73, 0x69, 0x67,
+	0x6e, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x41, 0x70, 0x6b, 0x43, 0x6f,
+	0x6e, 0x66, 0x69, 0x67, 0x12, 0x54, 0x0a, 0x14, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x6d, 0x6f,
+	0x64, 0x75, 0x6c, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01,
+	0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e,
+	0x64, 0x6c, 0x65, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73,
+	0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x12, 0x61, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x6f, 0x64,
+	0x75, 0x6c, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x79,
+	0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+	0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x54, 0x79, 0x70,
+	0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x33, 0x0a, 0x0a, 0x42, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x45, 0x47, 0x55, 0x4c, 0x41, 0x52,
+	0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x50, 0x45, 0x58, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a,
+	0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x22, 0x2c, 0x0a, 0x0a,
+	0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x74, 0x6f, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72,
+	0x73, 0x69, 0x6f, 0x6e, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0x3a, 0x0a, 0x0b, 0x43, 0x6f,
+	0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x6e, 0x63,
+	0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x67, 0x6c, 0x6f, 0x62, 0x18, 0x01,
+	0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73,
+	0x65, 0x64, 0x47, 0x6c, 0x6f, 0x62, 0x22, 0x5b, 0x0a, 0x0f, 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72,
+	0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52,
+	0x0b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e,
+	0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02,
+	0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61,
+	0x6d, 0x65, 0x73, 0x22, 0xe2, 0x02, 0x0a, 0x0d, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x0d, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x73, 0x5f,
+	0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61,
+	0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x70,
+	0x6c, 0x69, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x73, 0x70, 0x6c, 0x69,
+	0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x69, 0x0a, 0x1b, 0x75, 0x6e, 0x63, 0x6f,
+	0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x6c, 0x69,
+	0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e,
+	0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x55,
+	0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4c,
+	0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x19, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70,
+	0x72, 0x65, 0x73, 0x73, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72,
+	0x69, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x14, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73,
+	0x73, 0x5f, 0x64, 0x65, 0x78, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x22, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64,
+	0x6c, 0x65, 0x2e, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x78,
+	0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x12, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73,
+	0x73, 0x44, 0x65, 0x78, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x11, 0x73, 0x74, 0x61,
+	0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62,
+	0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65,
+	0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f,
+	0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x35, 0x0a, 0x19, 0x55, 0x6e, 0x63, 0x6f,
+	0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4c, 0x69, 0x62, 0x72,
+	0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22,
+	0x2e, 0x0a, 0x12, 0x55, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x78,
+	0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22,
+	0x57, 0x0a, 0x0c, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
+	0x47, 0x0a, 0x0f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69,
+	0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+	0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x44,
+	0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x44,
+	0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x90, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61,
+	0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a,
+	0x0f, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+	0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x44, 0x69, 0x6d,
+	0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x73, 0x70, 0x6c, 0x69, 0x74, 0x44, 0x69, 0x6d,
+	0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x16, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f,
+	0x36, 0x34, 0x5f, 0x62, 0x69, 0x74, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x73, 0x74, 0x72, 0x69, 0x70, 0x36, 0x34, 0x42,
+	0x69, 0x74, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x0e,
+	0x53, 0x70, 0x6c, 0x69, 0x74, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3a,
+	0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e,
+	0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53,
+	0x70, 0x6c, 0x69, 0x74, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x61,
+	0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x65,
+	0x67, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6e, 0x65, 0x67, 0x61,
+	0x74, 0x65, 0x12, 0x4a, 0x0a, 0x10, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x5f, 0x73, 0x74, 0x72,
+	0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61,
+	0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x75,
+	0x66, 0x66, 0x69, 0x78, 0x53, 0x74, 0x72, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x73,
+	0x75, 0x66, 0x66, 0x69, 0x78, 0x53, 0x74, 0x72, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x7b,
+	0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x4e, 0x53, 0x50, 0x45,
+	0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x00, 0x12, 0x07,
+	0x0a, 0x03, 0x41, 0x42, 0x49, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x43, 0x52, 0x45, 0x45,
+	0x4e, 0x5f, 0x44, 0x45, 0x4e, 0x53, 0x49, 0x54, 0x59, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x4c,
+	0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x45, 0x58,
+	0x54, 0x55, 0x52, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e,
+	0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x47, 0x52, 0x41,
+	0x50, 0x48, 0x49, 0x43, 0x53, 0x5f, 0x41, 0x50, 0x49, 0x10, 0x05, 0x22, 0x52, 0x0a, 0x0f, 0x53,
+	0x75, 0x66, 0x66, 0x69, 0x78, 0x53, 0x74, 0x72, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x18,
+	0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
+	0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61,
+	0x75, 0x6c, 0x74, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x22,
+	0x6c, 0x0a, 0x0a, 0x41, 0x70, 0x65, 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x5e, 0x0a,
+	0x18, 0x61, 0x70, 0x65, 0x78, 0x5f, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x5f, 0x61,
+	0x70, 0x6b, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+	0x25, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x2e, 0x41, 0x70, 0x65, 0x78, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x41, 0x70, 0x6b,
+	0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x61, 0x70, 0x65, 0x78, 0x45, 0x6d, 0x62, 0x65,
+	0x64, 0x64, 0x65, 0x64, 0x41, 0x70, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x4e, 0x0a,
+	0x15, 0x41, 0x70, 0x65, 0x78, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x41, 0x70, 0x6b,
+	0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67,
+	0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61,
+	0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
+	0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2f, 0x0a,
+	0x19, 0x55, 0x6e, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x45, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65,
+	0x64, 0x41, 0x70, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
+	0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x61,
+	0x0a, 0x12, 0x41, 0x73, 0x73, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x43, 0x6f,
+	0x6e, 0x66, 0x69, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73,
+	0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x56, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x0a, 0x11, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x76,
+	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x61,
+	0x67, 0x42, 0x41, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5a, 0x2b, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x65, 0x78, 0x74, 0x72, 0x61,
+	0x63, 0x74, 0x5f, 0x61, 0x70, 0x6b, 0x73, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5f, 0x70,
+	0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
-func init() {
-	proto.RegisterFile("config.proto", fileDescriptor_3eaf2c85e69e9ea4)
+var (
+	file_config_proto_rawDescOnce sync.Once
+	file_config_proto_rawDescData = file_config_proto_rawDesc
+)
+
+func file_config_proto_rawDescGZIP() []byte {
+	file_config_proto_rawDescOnce.Do(func() {
+		file_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_config_proto_rawDescData)
+	})
+	return file_config_proto_rawDescData
 }
 
-var fileDescriptor_3eaf2c85e69e9ea4 = []byte{
-	// 1001 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdb, 0x6e, 0xdb, 0x46,
-	0x10, 0x0d, 0x75, 0xb1, 0xe5, 0x91, 0x2c, 0xd1, 0xdb, 0x38, 0x50, 0x2e, 0x4d, 0x5c, 0xa2, 0x41,
-	0xdd, 0xb4, 0x50, 0x01, 0x3b, 0xcd, 0x83, 0x83, 0x3e, 0xd0, 0x32, 0xad, 0x2a, 0xd0, 0x0d, 0x4b,
-	0xc9, 0x4d, 0x5a, 0xa0, 0x8b, 0x95, 0xb8, 0x52, 0xb7, 0xa6, 0x48, 0x82, 0x4b, 0x1a, 0x4a, 0xfb,
-	0x09, 0x7d, 0xe9, 0x8f, 0xf4, 0xa7, 0xfa, 0x25, 0x05, 0x97, 0xa4, 0x2c, 0x51, 0x52, 0x9e, 0xfa,
-	0x24, 0xce, 0xec, 0x39, 0xb3, 0x3b, 0xb3, 0x67, 0x67, 0x04, 0x95, 0x89, 0xeb, 0x4c, 0xf9, 0xac,
-	0xe1, 0xf9, 0x6e, 0xe0, 0xa2, 0x2a, 0x75, 0x2c, 0xdf, 0xe5, 0x56, 0x63, 0x1c, 0x3a, 0x96, 0xcd,
-	0xb4, 0xbf, 0x8a, 0x50, 0xb9, 0x94, 0x9f, 0x4d, 0x09, 0x43, 0x17, 0x00, 0xf1, 0x52, 0xe0, 0xba,
-	0x76, 0x5d, 0x39, 0x51, 0x4e, 0xcb, 0x67, 0x4f, 0x1a, 0xeb, 0xac, 0xc6, 0xe5, 0x12, 0x81, 0x57,
-	0xd0, 0xa8, 0x09, 0x87, 0xae, 0x17, 0xf0, 0x39, 0xff, 0x83, 0x06, 0xdc, 0x75, 0x44, 0x3d, 0x27,
-	0xe9, 0x9f, 0x67, 0xe9, 0xfd, 0x55, 0x10, 0x5e, 0xe7, 0xa0, 0x1f, 0xa0, 0x3c, 0x71, 0xe7, 0x9e,
-	0xcf, 0x84, 0xe0, 0xae, 0x53, 0xcf, 0xcb, 0x10, 0x4f, 0xb3, 0x21, 0x9a, 0xf7, 0x10, 0xbc, 0x8a,
-	0x47, 0xef, 0x40, 0x9d, 0x53, 0x11, 0x30, 0x9f, 0xf8, 0x4c, 0xb8, 0xa1, 0x3f, 0x61, 0xa2, 0x5e,
-	0x90, 0x31, 0x5e, 0x64, 0x63, 0x74, 0x25, 0x0e, 0xa7, 0x30, 0x5c, 0x9b, 0xaf, 0x3b, 0xd0, 0x5b,
-	0x28, 0x53, 0x8f, 0x2d, 0x48, 0x5c, 0xc1, 0x7a, 0x71, 0x7b, 0x31, 0x74, 0x8f, 0x2d, 0xe2, 0xe2,
-	0x61, 0xa0, 0xcb, 0x6f, 0xf4, 0x3b, 0x3c, 0x0b, 0x1d, 0xc1, 0x67, 0x0e, 0xb3, 0x08, 0x9b, 0x8f,
-	0x99, 0x65, 0x31, 0x8b, 0x50, 0xef, 0x36, 0x8d, 0xb6, 0x77, 0x92, 0x3f, 0x2d, 0x9f, 0x7d, 0x9d,
-	0x8d, 0x36, 0x4a, 0x38, 0x46, 0x42, 0xd1, 0xbd, 0xdb, 0x24, 0xf8, 0xe3, 0x70, 0xd7, 0x12, 0x1a,
-	0xc2, 0x43, 0x2a, 0x04, 0x0b, 0xc8, 0xdc, 0xb5, 0x42, 0x9b, 0x89, 0x74, 0x8f, 0x7d, 0x79, 0x62,
-	0x6d, 0xe3, 0xc4, 0x11, 0xb6, 0x1b, 0x43, 0x93, 0xe0, 0x88, 0x6e, 0xf8, 0xd0, 0x5b, 0x28, 0x04,
-	0x1f, 0x3d, 0x56, 0x2f, 0x9d, 0x28, 0xa7, 0xd5, 0xb3, 0xaf, 0xb6, 0x8b, 0x20, 0xc6, 0x26, 0xc6,
-	0xf0, 0xa3, 0xc7, 0xb0, 0x24, 0x69, 0xe7, 0x00, 0xf7, 0x3e, 0x54, 0x86, 0x7d, 0x6c, 0xb4, 0x46,
-	0x1d, 0x1d, 0xab, 0x0f, 0x50, 0x09, 0x0a, 0xfa, 0xc0, 0x78, 0xaf, 0x2a, 0xa8, 0x0a, 0xa0, 0x9b,
-	0xa6, 0x31, 0x24, 0xfd, 0x5e, 0xe7, 0x83, 0x9a, 0xd3, 0xbe, 0x4d, 0x49, 0x52, 0x4e, 0x75, 0xd8,
-	0xbf, 0x63, 0xbe, 0x54, 0x41, 0x24, 0xa4, 0x03, 0x9c, 0x9a, 0xef, 0x0a, 0x25, 0x45, 0xcd, 0x69,
-	0x17, 0x50, 0x5e, 0x91, 0x01, 0xfa, 0x06, 0x8e, 0x42, 0x27, 0x95, 0x02, 0xb3, 0xc8, 0xcc, 0x76,
-	0xc7, 0x75, 0xe5, 0x24, 0x7f, 0x7a, 0x80, 0xd5, 0xd5, 0x85, 0x96, 0xed, 0x8e, 0xb5, 0x5f, 0xa0,
-	0x96, 0xb9, 0x7e, 0xf4, 0x05, 0x54, 0x52, 0xc9, 0x10, 0x6e, 0x09, 0x49, 0x2d, 0xe2, 0x72, 0xea,
-	0x6b, 0x5b, 0x02, 0xbd, 0x84, 0xea, 0x12, 0xe2, 0xd0, 0x39, 0x8b, 0x14, 0x1e, 0xc5, 0x3f, 0x4c,
-	0xbd, 0xbd, 0xc8, 0xa9, 0xfd, 0x9b, 0x83, 0xc3, 0x35, 0x8d, 0x23, 0x1d, 0x0e, 0x85, 0x67, 0xf3,
-	0x60, 0x79, 0x33, 0xf1, 0xc3, 0x7a, 0x96, 0xad, 0xa9, 0x29, 0x41, 0xc9, 0x9d, 0x54, 0xc4, 0x8a,
-	0x85, 0x38, 0x3c, 0xbd, 0xcf, 0x82, 0x38, 0x34, 0xe0, 0x77, 0x8c, 0xd8, 0x7c, 0xec, 0x53, 0x9f,
-	0xb3, 0xf4, 0xa9, 0x6d, 0x91, 0x53, 0x4a, 0xe9, 0x49, 0x46, 0x27, 0x25, 0x44, 0x72, 0xda, 0xb1,
-	0x14, 0xc9, 0x69, 0x65, 0x2b, 0x8b, 0x2d, 0xc8, 0x94, 0xdb, 0x4c, 0x24, 0x6f, 0x51, 0xdb, 0xbd,
-	0xc7, 0x15, 0x5b, 0x5c, 0x47, 0x48, 0x8c, 0xc2, 0x0d, 0x1f, 0xea, 0xc2, 0x91, 0x08, 0xa8, 0x63,
-	0x51, 0xdb, 0x75, 0x58, 0x5a, 0x87, 0xf8, 0x69, 0x9e, 0x6c, 0xd4, 0x61, 0x09, 0x4c, 0x6a, 0xa1,
-	0x8a, 0x8c, 0x47, 0xfb, 0x1e, 0x1e, 0xef, 0x4c, 0x2e, 0x92, 0x0e, 0x73, 0xe8, 0xd8, 0x66, 0x96,
-	0xac, 0x74, 0x09, 0xa7, 0xa6, 0xd6, 0x00, 0xb4, 0x79, 0xde, 0x4f, 0xe0, 0x7f, 0x82, 0xca, 0xea,
-	0xa5, 0xa0, 0x16, 0xd4, 0xe4, 0xb5, 0x10, 0x8b, 0xcf, 0x99, 0x23, 0xc5, 0xa9, 0xc8, 0x97, 0xfc,
-	0x7c, 0xeb, 0x5d, 0x5e, 0xa5, 0x28, 0x5c, 0x15, 0x6b, 0xb6, 0xf6, 0xb7, 0x02, 0x6a, 0x36, 0xcd,
-	0xff, 0x2d, 0x3a, 0x3a, 0x87, 0x47, 0x22, 0xf0, 0xb9, 0x47, 0xde, 0xbc, 0x26, 0x63, 0x1e, 0x64,
-	0x84, 0x52, 0xc2, 0x9f, 0xc9, 0xd5, 0x37, 0xaf, 0x2f, 0x79, 0xb0, 0xac, 0x9a, 0xf6, 0x4f, 0x0e,
-	0xaa, 0xeb, 0x71, 0xd1, 0x05, 0x14, 0xef, 0xa8, 0x1d, 0x32, 0x59, 0x96, 0xea, 0xd9, 0x97, 0x9f,
-	0x3e, 0x46, 0xe3, 0x26, 0xc2, 0xe2, 0x98, 0x82, 0x1e, 0xc1, 0x9e, 0xc3, 0x66, 0x34, 0x60, 0xc9,
-	0x9e, 0x89, 0x15, 0xb5, 0x68, 0x11, 0x4e, 0xa7, 0x7c, 0x41, 0xe4, 0x21, 0x3c, 0xee, 0xcc, 0x12,
-	0x69, 0x6d, 0xb4, 0x68, 0x53, 0xe2, 0xcc, 0x14, 0x86, 0x6b, 0x62, 0xdd, 0xa1, 0xfd, 0x09, 0x45,
-	0xb9, 0x27, 0x3a, 0x86, 0xa3, 0x51, 0xcf, 0x1c, 0x18, 0xcd, 0xf6, 0x75, 0xdb, 0xb8, 0x22, 0x37,
-	0x7a, 0x67, 0x64, 0xa8, 0x0f, 0xd0, 0x3e, 0xe4, 0xf5, 0xcb, 0xb6, 0xaa, 0x20, 0x04, 0x55, 0xb3,
-	0x89, 0x0d, 0xa3, 0x47, 0xae, 0x8c, 0x9e, 0xd9, 0x1e, 0x7e, 0x50, 0x73, 0xa8, 0x02, 0xa5, 0x8e,
-	0xde, 0x6b, 0x8d, 0xf4, 0x96, 0xa1, 0xe6, 0xd1, 0x73, 0x78, 0x32, 0x34, 0xde, 0x0f, 0x47, 0xd8,
-	0x20, 0xcd, 0x7e, 0x77, 0x80, 0x0d, 0xd3, 0x6c, 0xf7, 0x7b, 0xe4, 0xba, 0x8f, 0xbb, 0xfa, 0x50,
-	0x2d, 0x20, 0x15, 0x2a, 0x2d, 0xac, 0x0f, 0x7e, 0x6c, 0x37, 0x4d, 0xa2, 0x0f, 0xda, 0x6a, 0x51,
-	0xc3, 0x50, 0xcb, 0x1c, 0x70, 0xb7, 0x90, 0xa2, 0xde, 0x61, 0xb1, 0x29, 0x0d, 0xed, 0x80, 0xc4,
-	0x49, 0x24, 0x4d, 0xed, 0x30, 0xf1, 0xc6, 0x91, 0x34, 0x1b, 0xe0, 0x7e, 0xa0, 0xa0, 0x5f, 0xa1,
-	0x2e, 0x27, 0xd0, 0xb6, 0x01, 0x12, 0x0b, 0xe3, 0xe5, 0xb6, 0x71, 0xb4, 0x39, 0x3c, 0x8e, 0xe9,
-	0x36, 0xb7, 0xd6, 0x83, 0xe3, 0xad, 0xf8, 0xa8, 0x19, 0x7a, 0x74, 0x72, 0x4b, 0x67, 0x71, 0xa3,
-	0x93, 0xc9, 0x1c, 0xe0, 0x72, 0xe2, 0x8b, 0xda, 0x1c, 0x42, 0x50, 0xf0, 0x68, 0xf0, 0x5b, 0x92,
-	0x86, 0xfc, 0xd6, 0xbe, 0x8b, 0x1e, 0xe5, 0xae, 0x29, 0x95, 0x12, 0x94, 0x15, 0x02, 0x05, 0xb4,
-	0x39, 0x8d, 0xd0, 0x8b, 0x68, 0xf0, 0x7a, 0x24, 0xed, 0xfe, 0x51, 0xa6, 0xf9, 0x68, 0xb8, 0x7a,
-	0x37, 0xb1, 0x07, 0xbd, 0x82, 0xa3, 0x78, 0xe0, 0x25, 0x10, 0x12, 0xd0, 0x59, 0x72, 0x90, 0x9a,
-	0x5c, 0x48, 0x80, 0x43, 0x3a, 0xbb, 0x7c, 0x05, 0x68, 0xe2, 0xce, 0x33, 0x65, 0xfa, 0xf9, 0x61,
-	0x62, 0x93, 0xd8, 0x26, 0xf2, 0xef, 0xd1, 0x78, 0x4f, 0xfe, 0x9c, 0xff, 0x17, 0x00, 0x00, 0xff,
-	0xff, 0x6b, 0x05, 0xbf, 0x99, 0x35, 0x09, 0x00, 0x00,
+var file_config_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
+var file_config_proto_goTypes = []interface{}{
+	(BundleConfig_BundleType)(0),      // 0: android.bundle.BundleConfig.BundleType
+	(SplitDimension_Value)(0),         // 1: android.bundle.SplitDimension.Value
+	(*BundleConfig)(nil),              // 2: android.bundle.BundleConfig
+	(*Bundletool)(nil),                // 3: android.bundle.Bundletool
+	(*Compression)(nil),               // 4: android.bundle.Compression
+	(*MasterResources)(nil),           // 5: android.bundle.MasterResources
+	(*Optimizations)(nil),             // 6: android.bundle.Optimizations
+	(*UncompressNativeLibraries)(nil), // 7: android.bundle.UncompressNativeLibraries
+	(*UncompressDexFiles)(nil),        // 8: android.bundle.UncompressDexFiles
+	(*SplitsConfig)(nil),              // 9: android.bundle.SplitsConfig
+	(*StandaloneConfig)(nil),          // 10: android.bundle.StandaloneConfig
+	(*SplitDimension)(nil),            // 11: android.bundle.SplitDimension
+	(*SuffixStripping)(nil),           // 12: android.bundle.SuffixStripping
+	(*ApexConfig)(nil),                // 13: android.bundle.ApexConfig
+	(*ApexEmbeddedApkConfig)(nil),     // 14: android.bundle.ApexEmbeddedApkConfig
+	(*UnsignedEmbeddedApkConfig)(nil), // 15: android.bundle.UnsignedEmbeddedApkConfig
+	(*AssetModulesConfig)(nil),        // 16: android.bundle.AssetModulesConfig
+}
+var file_config_proto_depIdxs = []int32{
+	3,  // 0: android.bundle.BundleConfig.bundletool:type_name -> android.bundle.Bundletool
+	6,  // 1: android.bundle.BundleConfig.optimizations:type_name -> android.bundle.Optimizations
+	4,  // 2: android.bundle.BundleConfig.compression:type_name -> android.bundle.Compression
+	5,  // 3: android.bundle.BundleConfig.master_resources:type_name -> android.bundle.MasterResources
+	13, // 4: android.bundle.BundleConfig.apex_config:type_name -> android.bundle.ApexConfig
+	15, // 5: android.bundle.BundleConfig.unsigned_embedded_apk_config:type_name -> android.bundle.UnsignedEmbeddedApkConfig
+	16, // 6: android.bundle.BundleConfig.asset_modules_config:type_name -> android.bundle.AssetModulesConfig
+	0,  // 7: android.bundle.BundleConfig.type:type_name -> android.bundle.BundleConfig.BundleType
+	9,  // 8: android.bundle.Optimizations.splits_config:type_name -> android.bundle.SplitsConfig
+	7,  // 9: android.bundle.Optimizations.uncompress_native_libraries:type_name -> android.bundle.UncompressNativeLibraries
+	8,  // 10: android.bundle.Optimizations.uncompress_dex_files:type_name -> android.bundle.UncompressDexFiles
+	10, // 11: android.bundle.Optimizations.standalone_config:type_name -> android.bundle.StandaloneConfig
+	11, // 12: android.bundle.SplitsConfig.split_dimension:type_name -> android.bundle.SplitDimension
+	11, // 13: android.bundle.StandaloneConfig.split_dimension:type_name -> android.bundle.SplitDimension
+	1,  // 14: android.bundle.SplitDimension.value:type_name -> android.bundle.SplitDimension.Value
+	12, // 15: android.bundle.SplitDimension.suffix_stripping:type_name -> android.bundle.SuffixStripping
+	14, // 16: android.bundle.ApexConfig.apex_embedded_apk_config:type_name -> android.bundle.ApexEmbeddedApkConfig
+	17, // [17:17] is the sub-list for method output_type
+	17, // [17:17] is the sub-list for method input_type
+	17, // [17:17] is the sub-list for extension type_name
+	17, // [17:17] is the sub-list for extension extendee
+	0,  // [0:17] is the sub-list for field type_name
+}
+
+func init() { file_config_proto_init() }
+func file_config_proto_init() {
+	if File_config_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BundleConfig); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Bundletool); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Compression); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MasterResources); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Optimizations); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UncompressNativeLibraries); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UncompressDexFiles); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SplitsConfig); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*StandaloneConfig); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SplitDimension); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SuffixStripping); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ApexConfig); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ApexEmbeddedApkConfig); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UnsignedEmbeddedApkConfig); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_config_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AssetModulesConfig); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_config_proto_rawDesc,
+			NumEnums:      2,
+			NumMessages:   15,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_config_proto_goTypes,
+		DependencyIndexes: file_config_proto_depIdxs,
+		EnumInfos:         file_config_proto_enumTypes,
+		MessageInfos:      file_config_proto_msgTypes,
+	}.Build()
+	File_config_proto = out.File
+	file_config_proto_rawDesc = nil
+	file_config_proto_goTypes = nil
+	file_config_proto_depIdxs = nil
 }
diff --git a/cmd/extract_apks/bundle_proto/config.proto b/cmd/extract_apks/bundle_proto/config.proto
index 1c161aa..d6fac03 100644
--- a/cmd/extract_apks/bundle_proto/config.proto
+++ b/cmd/extract_apks/bundle_proto/config.proto
@@ -6,7 +6,7 @@
 
 package android.bundle;
 
-option go_package = "android_bundle_proto";
+option go_package = "android/soong/cmd/extract_apks/bundle_proto";
 option java_package = "com.android.bundle";
 
 message BundleConfig {
diff --git a/cmd/extract_apks/bundle_proto/targeting.pb.go b/cmd/extract_apks/bundle_proto/targeting.pb.go
index 187bc44..66e6f0d 100644
--- a/cmd/extract_apks/bundle_proto/targeting.pb.go
+++ b/cmd/extract_apks/bundle_proto/targeting.pb.go
@@ -1,24 +1,29 @@
+// Messages describing APK Set's table of contents (toc.pb entry).
+// Please be advised that the ultimate source is at
+// https://github.com/google/bundletool/tree/master/src/main/proto
+// so you have been warned.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: targeting.proto
 
-package android_bundle_proto
+package bundle_proto
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 type ScreenDensity_DensityAlias int32
 
@@ -34,36 +39,57 @@
 	ScreenDensity_XXXHDPI             ScreenDensity_DensityAlias = 8
 )
 
-var ScreenDensity_DensityAlias_name = map[int32]string{
-	0: "DENSITY_UNSPECIFIED",
-	1: "NODPI",
-	2: "LDPI",
-	3: "MDPI",
-	4: "TVDPI",
-	5: "HDPI",
-	6: "XHDPI",
-	7: "XXHDPI",
-	8: "XXXHDPI",
-}
+// Enum value maps for ScreenDensity_DensityAlias.
+var (
+	ScreenDensity_DensityAlias_name = map[int32]string{
+		0: "DENSITY_UNSPECIFIED",
+		1: "NODPI",
+		2: "LDPI",
+		3: "MDPI",
+		4: "TVDPI",
+		5: "HDPI",
+		6: "XHDPI",
+		7: "XXHDPI",
+		8: "XXXHDPI",
+	}
+	ScreenDensity_DensityAlias_value = map[string]int32{
+		"DENSITY_UNSPECIFIED": 0,
+		"NODPI":               1,
+		"LDPI":                2,
+		"MDPI":                3,
+		"TVDPI":               4,
+		"HDPI":                5,
+		"XHDPI":               6,
+		"XXHDPI":              7,
+		"XXXHDPI":             8,
+	}
+)
 
-var ScreenDensity_DensityAlias_value = map[string]int32{
-	"DENSITY_UNSPECIFIED": 0,
-	"NODPI":               1,
-	"LDPI":                2,
-	"MDPI":                3,
-	"TVDPI":               4,
-	"HDPI":                5,
-	"XHDPI":               6,
-	"XXHDPI":              7,
-	"XXXHDPI":             8,
+func (x ScreenDensity_DensityAlias) Enum() *ScreenDensity_DensityAlias {
+	p := new(ScreenDensity_DensityAlias)
+	*p = x
+	return p
 }
 
 func (x ScreenDensity_DensityAlias) String() string {
-	return proto.EnumName(ScreenDensity_DensityAlias_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
+func (ScreenDensity_DensityAlias) Descriptor() protoreflect.EnumDescriptor {
+	return file_targeting_proto_enumTypes[0].Descriptor()
+}
+
+func (ScreenDensity_DensityAlias) Type() protoreflect.EnumType {
+	return &file_targeting_proto_enumTypes[0]
+}
+
+func (x ScreenDensity_DensityAlias) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ScreenDensity_DensityAlias.Descriptor instead.
 func (ScreenDensity_DensityAlias) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{4, 0}
+	return file_targeting_proto_rawDescGZIP(), []int{4, 0}
 }
 
 type TextureCompressionFormat_TextureCompressionFormatAlias int32
@@ -82,40 +108,61 @@
 	TextureCompressionFormat_ETC2                                   TextureCompressionFormat_TextureCompressionFormatAlias = 10
 )
 
-var TextureCompressionFormat_TextureCompressionFormatAlias_name = map[int32]string{
-	0:  "UNSPECIFIED_TEXTURE_COMPRESSION_FORMAT",
-	1:  "ETC1_RGB8",
-	2:  "PALETTED",
-	3:  "THREE_DC",
-	4:  "ATC",
-	5:  "LATC",
-	6:  "DXT1",
-	7:  "S3TC",
-	8:  "PVRTC",
-	9:  "ASTC",
-	10: "ETC2",
-}
+// Enum value maps for TextureCompressionFormat_TextureCompressionFormatAlias.
+var (
+	TextureCompressionFormat_TextureCompressionFormatAlias_name = map[int32]string{
+		0:  "UNSPECIFIED_TEXTURE_COMPRESSION_FORMAT",
+		1:  "ETC1_RGB8",
+		2:  "PALETTED",
+		3:  "THREE_DC",
+		4:  "ATC",
+		5:  "LATC",
+		6:  "DXT1",
+		7:  "S3TC",
+		8:  "PVRTC",
+		9:  "ASTC",
+		10: "ETC2",
+	}
+	TextureCompressionFormat_TextureCompressionFormatAlias_value = map[string]int32{
+		"UNSPECIFIED_TEXTURE_COMPRESSION_FORMAT": 0,
+		"ETC1_RGB8":                              1,
+		"PALETTED":                               2,
+		"THREE_DC":                               3,
+		"ATC":                                    4,
+		"LATC":                                   5,
+		"DXT1":                                   6,
+		"S3TC":                                   7,
+		"PVRTC":                                  8,
+		"ASTC":                                   9,
+		"ETC2":                                   10,
+	}
+)
 
-var TextureCompressionFormat_TextureCompressionFormatAlias_value = map[string]int32{
-	"UNSPECIFIED_TEXTURE_COMPRESSION_FORMAT": 0,
-	"ETC1_RGB8":                              1,
-	"PALETTED":                               2,
-	"THREE_DC":                               3,
-	"ATC":                                    4,
-	"LATC":                                   5,
-	"DXT1":                                   6,
-	"S3TC":                                   7,
-	"PVRTC":                                  8,
-	"ASTC":                                   9,
-	"ETC2":                                   10,
+func (x TextureCompressionFormat_TextureCompressionFormatAlias) Enum() *TextureCompressionFormat_TextureCompressionFormatAlias {
+	p := new(TextureCompressionFormat_TextureCompressionFormatAlias)
+	*p = x
+	return p
 }
 
 func (x TextureCompressionFormat_TextureCompressionFormatAlias) String() string {
-	return proto.EnumName(TextureCompressionFormat_TextureCompressionFormatAlias_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
+func (TextureCompressionFormat_TextureCompressionFormatAlias) Descriptor() protoreflect.EnumDescriptor {
+	return file_targeting_proto_enumTypes[1].Descriptor()
+}
+
+func (TextureCompressionFormat_TextureCompressionFormatAlias) Type() protoreflect.EnumType {
+	return &file_targeting_proto_enumTypes[1]
+}
+
+func (x TextureCompressionFormat_TextureCompressionFormatAlias) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use TextureCompressionFormat_TextureCompressionFormatAlias.Descriptor instead.
 func (TextureCompressionFormat_TextureCompressionFormatAlias) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{10, 0}
+	return file_targeting_proto_rawDescGZIP(), []int{10, 0}
 }
 
 type Abi_AbiAlias int32
@@ -131,34 +178,55 @@
 	Abi_MIPS64                       Abi_AbiAlias = 7
 )
 
-var Abi_AbiAlias_name = map[int32]string{
-	0: "UNSPECIFIED_CPU_ARCHITECTURE",
-	1: "ARMEABI",
-	2: "ARMEABI_V7A",
-	3: "ARM64_V8A",
-	4: "X86",
-	5: "X86_64",
-	6: "MIPS",
-	7: "MIPS64",
-}
+// Enum value maps for Abi_AbiAlias.
+var (
+	Abi_AbiAlias_name = map[int32]string{
+		0: "UNSPECIFIED_CPU_ARCHITECTURE",
+		1: "ARMEABI",
+		2: "ARMEABI_V7A",
+		3: "ARM64_V8A",
+		4: "X86",
+		5: "X86_64",
+		6: "MIPS",
+		7: "MIPS64",
+	}
+	Abi_AbiAlias_value = map[string]int32{
+		"UNSPECIFIED_CPU_ARCHITECTURE": 0,
+		"ARMEABI":                      1,
+		"ARMEABI_V7A":                  2,
+		"ARM64_V8A":                    3,
+		"X86":                          4,
+		"X86_64":                       5,
+		"MIPS":                         6,
+		"MIPS64":                       7,
+	}
+)
 
-var Abi_AbiAlias_value = map[string]int32{
-	"UNSPECIFIED_CPU_ARCHITECTURE": 0,
-	"ARMEABI":                      1,
-	"ARMEABI_V7A":                  2,
-	"ARM64_V8A":                    3,
-	"X86":                          4,
-	"X86_64":                       5,
-	"MIPS":                         6,
-	"MIPS64":                       7,
+func (x Abi_AbiAlias) Enum() *Abi_AbiAlias {
+	p := new(Abi_AbiAlias)
+	*p = x
+	return p
 }
 
 func (x Abi_AbiAlias) String() string {
-	return proto.EnumName(Abi_AbiAlias_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
+func (Abi_AbiAlias) Descriptor() protoreflect.EnumDescriptor {
+	return file_targeting_proto_enumTypes[2].Descriptor()
+}
+
+func (Abi_AbiAlias) Type() protoreflect.EnumType {
+	return &file_targeting_proto_enumTypes[2]
+}
+
+func (x Abi_AbiAlias) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Abi_AbiAlias.Descriptor instead.
 func (Abi_AbiAlias) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{11, 0}
+	return file_targeting_proto_rawDescGZIP(), []int{11, 0}
 }
 
 type Sanitizer_SanitizerAlias int32
@@ -168,98 +236,131 @@
 	Sanitizer_HWADDRESS Sanitizer_SanitizerAlias = 1
 )
 
-var Sanitizer_SanitizerAlias_name = map[int32]string{
-	0: "NONE",
-	1: "HWADDRESS",
-}
+// Enum value maps for Sanitizer_SanitizerAlias.
+var (
+	Sanitizer_SanitizerAlias_name = map[int32]string{
+		0: "NONE",
+		1: "HWADDRESS",
+	}
+	Sanitizer_SanitizerAlias_value = map[string]int32{
+		"NONE":      0,
+		"HWADDRESS": 1,
+	}
+)
 
-var Sanitizer_SanitizerAlias_value = map[string]int32{
-	"NONE":      0,
-	"HWADDRESS": 1,
+func (x Sanitizer_SanitizerAlias) Enum() *Sanitizer_SanitizerAlias {
+	p := new(Sanitizer_SanitizerAlias)
+	*p = x
+	return p
 }
 
 func (x Sanitizer_SanitizerAlias) String() string {
-	return proto.EnumName(Sanitizer_SanitizerAlias_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
+func (Sanitizer_SanitizerAlias) Descriptor() protoreflect.EnumDescriptor {
+	return file_targeting_proto_enumTypes[3].Descriptor()
+}
+
+func (Sanitizer_SanitizerAlias) Type() protoreflect.EnumType {
+	return &file_targeting_proto_enumTypes[3]
+}
+
+func (x Sanitizer_SanitizerAlias) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Sanitizer_SanitizerAlias.Descriptor instead.
 func (Sanitizer_SanitizerAlias) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{13, 0}
+	return file_targeting_proto_rawDescGZIP(), []int{13, 0}
 }
 
 // Targeting on the level of variants.
 type VariantTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	SdkVersionTargeting               *SdkVersionTargeting               `protobuf:"bytes,1,opt,name=sdk_version_targeting,json=sdkVersionTargeting,proto3" json:"sdk_version_targeting,omitempty"`
 	AbiTargeting                      *AbiTargeting                      `protobuf:"bytes,2,opt,name=abi_targeting,json=abiTargeting,proto3" json:"abi_targeting,omitempty"`
 	ScreenDensityTargeting            *ScreenDensityTargeting            `protobuf:"bytes,3,opt,name=screen_density_targeting,json=screenDensityTargeting,proto3" json:"screen_density_targeting,omitempty"`
 	MultiAbiTargeting                 *MultiAbiTargeting                 `protobuf:"bytes,4,opt,name=multi_abi_targeting,json=multiAbiTargeting,proto3" json:"multi_abi_targeting,omitempty"`
 	TextureCompressionFormatTargeting *TextureCompressionFormatTargeting `protobuf:"bytes,5,opt,name=texture_compression_format_targeting,json=textureCompressionFormatTargeting,proto3" json:"texture_compression_format_targeting,omitempty"`
-	XXX_NoUnkeyedLiteral              struct{}                           `json:"-"`
-	XXX_unrecognized                  []byte                             `json:"-"`
-	XXX_sizecache                     int32                              `json:"-"`
 }
 
-func (m *VariantTargeting) Reset()         { *m = VariantTargeting{} }
-func (m *VariantTargeting) String() string { return proto.CompactTextString(m) }
-func (*VariantTargeting) ProtoMessage()    {}
+func (x *VariantTargeting) Reset() {
+	*x = VariantTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *VariantTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VariantTargeting) ProtoMessage() {}
+
+func (x *VariantTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use VariantTargeting.ProtoReflect.Descriptor instead.
 func (*VariantTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{0}
+	return file_targeting_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *VariantTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_VariantTargeting.Unmarshal(m, b)
-}
-func (m *VariantTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_VariantTargeting.Marshal(b, m, deterministic)
-}
-func (m *VariantTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_VariantTargeting.Merge(m, src)
-}
-func (m *VariantTargeting) XXX_Size() int {
-	return xxx_messageInfo_VariantTargeting.Size(m)
-}
-func (m *VariantTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_VariantTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_VariantTargeting proto.InternalMessageInfo
-
-func (m *VariantTargeting) GetSdkVersionTargeting() *SdkVersionTargeting {
-	if m != nil {
-		return m.SdkVersionTargeting
+func (x *VariantTargeting) GetSdkVersionTargeting() *SdkVersionTargeting {
+	if x != nil {
+		return x.SdkVersionTargeting
 	}
 	return nil
 }
 
-func (m *VariantTargeting) GetAbiTargeting() *AbiTargeting {
-	if m != nil {
-		return m.AbiTargeting
+func (x *VariantTargeting) GetAbiTargeting() *AbiTargeting {
+	if x != nil {
+		return x.AbiTargeting
 	}
 	return nil
 }
 
-func (m *VariantTargeting) GetScreenDensityTargeting() *ScreenDensityTargeting {
-	if m != nil {
-		return m.ScreenDensityTargeting
+func (x *VariantTargeting) GetScreenDensityTargeting() *ScreenDensityTargeting {
+	if x != nil {
+		return x.ScreenDensityTargeting
 	}
 	return nil
 }
 
-func (m *VariantTargeting) GetMultiAbiTargeting() *MultiAbiTargeting {
-	if m != nil {
-		return m.MultiAbiTargeting
+func (x *VariantTargeting) GetMultiAbiTargeting() *MultiAbiTargeting {
+	if x != nil {
+		return x.MultiAbiTargeting
 	}
 	return nil
 }
 
-func (m *VariantTargeting) GetTextureCompressionFormatTargeting() *TextureCompressionFormatTargeting {
-	if m != nil {
-		return m.TextureCompressionFormatTargeting
+func (x *VariantTargeting) GetTextureCompressionFormatTargeting() *TextureCompressionFormatTargeting {
+	if x != nil {
+		return x.TextureCompressionFormatTargeting
 	}
 	return nil
 }
 
 // Targeting on the level of individual APKs.
 type ApkTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	AbiTargeting                      *AbiTargeting                      `protobuf:"bytes,1,opt,name=abi_targeting,json=abiTargeting,proto3" json:"abi_targeting,omitempty"`
 	GraphicsApiTargeting              *GraphicsApiTargeting              `protobuf:"bytes,2,opt,name=graphics_api_targeting,json=graphicsApiTargeting,proto3" json:"graphics_api_targeting,omitempty"`
 	LanguageTargeting                 *LanguageTargeting                 `protobuf:"bytes,3,opt,name=language_targeting,json=languageTargeting,proto3" json:"language_targeting,omitempty"`
@@ -268,88 +369,92 @@
 	TextureCompressionFormatTargeting *TextureCompressionFormatTargeting `protobuf:"bytes,6,opt,name=texture_compression_format_targeting,json=textureCompressionFormatTargeting,proto3" json:"texture_compression_format_targeting,omitempty"`
 	MultiAbiTargeting                 *MultiAbiTargeting                 `protobuf:"bytes,7,opt,name=multi_abi_targeting,json=multiAbiTargeting,proto3" json:"multi_abi_targeting,omitempty"`
 	SanitizerTargeting                *SanitizerTargeting                `protobuf:"bytes,8,opt,name=sanitizer_targeting,json=sanitizerTargeting,proto3" json:"sanitizer_targeting,omitempty"`
-	XXX_NoUnkeyedLiteral              struct{}                           `json:"-"`
-	XXX_unrecognized                  []byte                             `json:"-"`
-	XXX_sizecache                     int32                              `json:"-"`
 }
 
-func (m *ApkTargeting) Reset()         { *m = ApkTargeting{} }
-func (m *ApkTargeting) String() string { return proto.CompactTextString(m) }
-func (*ApkTargeting) ProtoMessage()    {}
+func (x *ApkTargeting) Reset() {
+	*x = ApkTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ApkTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ApkTargeting) ProtoMessage() {}
+
+func (x *ApkTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ApkTargeting.ProtoReflect.Descriptor instead.
 func (*ApkTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{1}
+	return file_targeting_proto_rawDescGZIP(), []int{1}
 }
 
-func (m *ApkTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ApkTargeting.Unmarshal(m, b)
-}
-func (m *ApkTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ApkTargeting.Marshal(b, m, deterministic)
-}
-func (m *ApkTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ApkTargeting.Merge(m, src)
-}
-func (m *ApkTargeting) XXX_Size() int {
-	return xxx_messageInfo_ApkTargeting.Size(m)
-}
-func (m *ApkTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_ApkTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ApkTargeting proto.InternalMessageInfo
-
-func (m *ApkTargeting) GetAbiTargeting() *AbiTargeting {
-	if m != nil {
-		return m.AbiTargeting
+func (x *ApkTargeting) GetAbiTargeting() *AbiTargeting {
+	if x != nil {
+		return x.AbiTargeting
 	}
 	return nil
 }
 
-func (m *ApkTargeting) GetGraphicsApiTargeting() *GraphicsApiTargeting {
-	if m != nil {
-		return m.GraphicsApiTargeting
+func (x *ApkTargeting) GetGraphicsApiTargeting() *GraphicsApiTargeting {
+	if x != nil {
+		return x.GraphicsApiTargeting
 	}
 	return nil
 }
 
-func (m *ApkTargeting) GetLanguageTargeting() *LanguageTargeting {
-	if m != nil {
-		return m.LanguageTargeting
+func (x *ApkTargeting) GetLanguageTargeting() *LanguageTargeting {
+	if x != nil {
+		return x.LanguageTargeting
 	}
 	return nil
 }
 
-func (m *ApkTargeting) GetScreenDensityTargeting() *ScreenDensityTargeting {
-	if m != nil {
-		return m.ScreenDensityTargeting
+func (x *ApkTargeting) GetScreenDensityTargeting() *ScreenDensityTargeting {
+	if x != nil {
+		return x.ScreenDensityTargeting
 	}
 	return nil
 }
 
-func (m *ApkTargeting) GetSdkVersionTargeting() *SdkVersionTargeting {
-	if m != nil {
-		return m.SdkVersionTargeting
+func (x *ApkTargeting) GetSdkVersionTargeting() *SdkVersionTargeting {
+	if x != nil {
+		return x.SdkVersionTargeting
 	}
 	return nil
 }
 
-func (m *ApkTargeting) GetTextureCompressionFormatTargeting() *TextureCompressionFormatTargeting {
-	if m != nil {
-		return m.TextureCompressionFormatTargeting
+func (x *ApkTargeting) GetTextureCompressionFormatTargeting() *TextureCompressionFormatTargeting {
+	if x != nil {
+		return x.TextureCompressionFormatTargeting
 	}
 	return nil
 }
 
-func (m *ApkTargeting) GetMultiAbiTargeting() *MultiAbiTargeting {
-	if m != nil {
-		return m.MultiAbiTargeting
+func (x *ApkTargeting) GetMultiAbiTargeting() *MultiAbiTargeting {
+	if x != nil {
+		return x.MultiAbiTargeting
 	}
 	return nil
 }
 
-func (m *ApkTargeting) GetSanitizerTargeting() *SanitizerTargeting {
-	if m != nil {
-		return m.SanitizerTargeting
+func (x *ApkTargeting) GetSanitizerTargeting() *SanitizerTargeting {
+	if x != nil {
+		return x.SanitizerTargeting
 	}
 	return nil
 }
@@ -357,56 +462,64 @@
 // Targeting on the module level.
 // The semantic of the targeting is the "AND" rule on all immediate values.
 type ModuleTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	SdkVersionTargeting    *SdkVersionTargeting      `protobuf:"bytes,1,opt,name=sdk_version_targeting,json=sdkVersionTargeting,proto3" json:"sdk_version_targeting,omitempty"`
 	DeviceFeatureTargeting []*DeviceFeatureTargeting `protobuf:"bytes,2,rep,name=device_feature_targeting,json=deviceFeatureTargeting,proto3" json:"device_feature_targeting,omitempty"`
 	UserCountriesTargeting *UserCountriesTargeting   `protobuf:"bytes,3,opt,name=user_countries_targeting,json=userCountriesTargeting,proto3" json:"user_countries_targeting,omitempty"`
-	XXX_NoUnkeyedLiteral   struct{}                  `json:"-"`
-	XXX_unrecognized       []byte                    `json:"-"`
-	XXX_sizecache          int32                     `json:"-"`
 }
 
-func (m *ModuleTargeting) Reset()         { *m = ModuleTargeting{} }
-func (m *ModuleTargeting) String() string { return proto.CompactTextString(m) }
-func (*ModuleTargeting) ProtoMessage()    {}
+func (x *ModuleTargeting) Reset() {
+	*x = ModuleTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ModuleTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModuleTargeting) ProtoMessage() {}
+
+func (x *ModuleTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ModuleTargeting.ProtoReflect.Descriptor instead.
 func (*ModuleTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{2}
+	return file_targeting_proto_rawDescGZIP(), []int{2}
 }
 
-func (m *ModuleTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ModuleTargeting.Unmarshal(m, b)
-}
-func (m *ModuleTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ModuleTargeting.Marshal(b, m, deterministic)
-}
-func (m *ModuleTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ModuleTargeting.Merge(m, src)
-}
-func (m *ModuleTargeting) XXX_Size() int {
-	return xxx_messageInfo_ModuleTargeting.Size(m)
-}
-func (m *ModuleTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_ModuleTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ModuleTargeting proto.InternalMessageInfo
-
-func (m *ModuleTargeting) GetSdkVersionTargeting() *SdkVersionTargeting {
-	if m != nil {
-		return m.SdkVersionTargeting
+func (x *ModuleTargeting) GetSdkVersionTargeting() *SdkVersionTargeting {
+	if x != nil {
+		return x.SdkVersionTargeting
 	}
 	return nil
 }
 
-func (m *ModuleTargeting) GetDeviceFeatureTargeting() []*DeviceFeatureTargeting {
-	if m != nil {
-		return m.DeviceFeatureTargeting
+func (x *ModuleTargeting) GetDeviceFeatureTargeting() []*DeviceFeatureTargeting {
+	if x != nil {
+		return x.DeviceFeatureTargeting
 	}
 	return nil
 }
 
-func (m *ModuleTargeting) GetUserCountriesTargeting() *UserCountriesTargeting {
-	if m != nil {
-		return m.UserCountriesTargeting
+func (x *ModuleTargeting) GetUserCountriesTargeting() *UserCountriesTargeting {
+	if x != nil {
+		return x.UserCountriesTargeting
 	}
 	return nil
 }
@@ -414,88 +527,125 @@
 // User Countries targeting describing an inclusive/exclusive list of country
 // codes that module targets.
 type UserCountriesTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// List of country codes in the two-letter CLDR territory format.
 	CountryCodes []string `protobuf:"bytes,1,rep,name=country_codes,json=countryCodes,proto3" json:"country_codes,omitempty"`
 	// Indicates if the list above is exclusive.
-	Exclude              bool     `protobuf:"varint,2,opt,name=exclude,proto3" json:"exclude,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Exclude bool `protobuf:"varint,2,opt,name=exclude,proto3" json:"exclude,omitempty"`
 }
 
-func (m *UserCountriesTargeting) Reset()         { *m = UserCountriesTargeting{} }
-func (m *UserCountriesTargeting) String() string { return proto.CompactTextString(m) }
-func (*UserCountriesTargeting) ProtoMessage()    {}
+func (x *UserCountriesTargeting) Reset() {
+	*x = UserCountriesTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserCountriesTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCountriesTargeting) ProtoMessage() {}
+
+func (x *UserCountriesTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserCountriesTargeting.ProtoReflect.Descriptor instead.
 func (*UserCountriesTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{3}
+	return file_targeting_proto_rawDescGZIP(), []int{3}
 }
 
-func (m *UserCountriesTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_UserCountriesTargeting.Unmarshal(m, b)
-}
-func (m *UserCountriesTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_UserCountriesTargeting.Marshal(b, m, deterministic)
-}
-func (m *UserCountriesTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_UserCountriesTargeting.Merge(m, src)
-}
-func (m *UserCountriesTargeting) XXX_Size() int {
-	return xxx_messageInfo_UserCountriesTargeting.Size(m)
-}
-func (m *UserCountriesTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_UserCountriesTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_UserCountriesTargeting proto.InternalMessageInfo
-
-func (m *UserCountriesTargeting) GetCountryCodes() []string {
-	if m != nil {
-		return m.CountryCodes
+func (x *UserCountriesTargeting) GetCountryCodes() []string {
+	if x != nil {
+		return x.CountryCodes
 	}
 	return nil
 }
 
-func (m *UserCountriesTargeting) GetExclude() bool {
-	if m != nil {
-		return m.Exclude
+func (x *UserCountriesTargeting) GetExclude() bool {
+	if x != nil {
+		return x.Exclude
 	}
 	return false
 }
 
 type ScreenDensity struct {
-	// Types that are valid to be assigned to DensityOneof:
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	// Types that are assignable to DensityOneof:
 	//	*ScreenDensity_DensityAlias_
 	//	*ScreenDensity_DensityDpi
-	DensityOneof         isScreenDensity_DensityOneof `protobuf_oneof:"density_oneof"`
-	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
-	XXX_unrecognized     []byte                       `json:"-"`
-	XXX_sizecache        int32                        `json:"-"`
+	DensityOneof isScreenDensity_DensityOneof `protobuf_oneof:"density_oneof"`
 }
 
-func (m *ScreenDensity) Reset()         { *m = ScreenDensity{} }
-func (m *ScreenDensity) String() string { return proto.CompactTextString(m) }
-func (*ScreenDensity) ProtoMessage()    {}
+func (x *ScreenDensity) Reset() {
+	*x = ScreenDensity{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ScreenDensity) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ScreenDensity) ProtoMessage() {}
+
+func (x *ScreenDensity) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ScreenDensity.ProtoReflect.Descriptor instead.
 func (*ScreenDensity) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{4}
+	return file_targeting_proto_rawDescGZIP(), []int{4}
 }
 
-func (m *ScreenDensity) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ScreenDensity.Unmarshal(m, b)
-}
-func (m *ScreenDensity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ScreenDensity.Marshal(b, m, deterministic)
-}
-func (m *ScreenDensity) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ScreenDensity.Merge(m, src)
-}
-func (m *ScreenDensity) XXX_Size() int {
-	return xxx_messageInfo_ScreenDensity.Size(m)
-}
-func (m *ScreenDensity) XXX_DiscardUnknown() {
-	xxx_messageInfo_ScreenDensity.DiscardUnknown(m)
+func (m *ScreenDensity) GetDensityOneof() isScreenDensity_DensityOneof {
+	if m != nil {
+		return m.DensityOneof
+	}
+	return nil
 }
 
-var xxx_messageInfo_ScreenDensity proto.InternalMessageInfo
+func (x *ScreenDensity) GetDensityAlias() ScreenDensity_DensityAlias {
+	if x, ok := x.GetDensityOneof().(*ScreenDensity_DensityAlias_); ok {
+		return x.DensityAlias
+	}
+	return ScreenDensity_DENSITY_UNSPECIFIED
+}
+
+func (x *ScreenDensity) GetDensityDpi() int32 {
+	if x, ok := x.GetDensityOneof().(*ScreenDensity_DensityDpi); ok {
+		return x.DensityDpi
+	}
+	return 0
+}
 
 type isScreenDensity_DensityOneof interface {
 	isScreenDensity_DensityOneof()
@@ -513,169 +663,148 @@
 
 func (*ScreenDensity_DensityDpi) isScreenDensity_DensityOneof() {}
 
-func (m *ScreenDensity) GetDensityOneof() isScreenDensity_DensityOneof {
-	if m != nil {
-		return m.DensityOneof
-	}
-	return nil
-}
-
-func (m *ScreenDensity) GetDensityAlias() ScreenDensity_DensityAlias {
-	if x, ok := m.GetDensityOneof().(*ScreenDensity_DensityAlias_); ok {
-		return x.DensityAlias
-	}
-	return ScreenDensity_DENSITY_UNSPECIFIED
-}
-
-func (m *ScreenDensity) GetDensityDpi() int32 {
-	if x, ok := m.GetDensityOneof().(*ScreenDensity_DensityDpi); ok {
-		return x.DensityDpi
-	}
-	return 0
-}
-
-// XXX_OneofWrappers is for the internal use of the proto package.
-func (*ScreenDensity) XXX_OneofWrappers() []interface{} {
-	return []interface{}{
-		(*ScreenDensity_DensityAlias_)(nil),
-		(*ScreenDensity_DensityDpi)(nil),
-	}
-}
-
 // Wrapper message for `int32`.
 //
 // The JSON representation for `Int32Value` is JSON number.
 type Int32Value struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The int32 value.
-	Value                int32    `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
 }
 
-func (m *Int32Value) Reset()         { *m = Int32Value{} }
-func (m *Int32Value) String() string { return proto.CompactTextString(m) }
-func (*Int32Value) ProtoMessage()    {}
+func (x *Int32Value) Reset() {
+	*x = Int32Value{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Int32Value) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int32Value) ProtoMessage() {}
+
+func (x *Int32Value) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int32Value.ProtoReflect.Descriptor instead.
 func (*Int32Value) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{5}
+	return file_targeting_proto_rawDescGZIP(), []int{5}
 }
 
-func (m *Int32Value) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Int32Value.Unmarshal(m, b)
-}
-func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic)
-}
-func (m *Int32Value) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Int32Value.Merge(m, src)
-}
-func (m *Int32Value) XXX_Size() int {
-	return xxx_messageInfo_Int32Value.Size(m)
-}
-func (m *Int32Value) XXX_DiscardUnknown() {
-	xxx_messageInfo_Int32Value.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Int32Value proto.InternalMessageInfo
-
-func (m *Int32Value) GetValue() int32 {
-	if m != nil {
-		return m.Value
+func (x *Int32Value) GetValue() int32 {
+	if x != nil {
+		return x.Value
 	}
 	return 0
 }
 
 type SdkVersion struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Inclusive.
-	Min                  *Int32Value `protobuf:"bytes,1,opt,name=min,proto3" json:"min,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
-	XXX_unrecognized     []byte      `json:"-"`
-	XXX_sizecache        int32       `json:"-"`
+	Min *Int32Value `protobuf:"bytes,1,opt,name=min,proto3" json:"min,omitempty"`
 }
 
-func (m *SdkVersion) Reset()         { *m = SdkVersion{} }
-func (m *SdkVersion) String() string { return proto.CompactTextString(m) }
-func (*SdkVersion) ProtoMessage()    {}
+func (x *SdkVersion) Reset() {
+	*x = SdkVersion{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SdkVersion) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SdkVersion) ProtoMessage() {}
+
+func (x *SdkVersion) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SdkVersion.ProtoReflect.Descriptor instead.
 func (*SdkVersion) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{6}
+	return file_targeting_proto_rawDescGZIP(), []int{6}
 }
 
-func (m *SdkVersion) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SdkVersion.Unmarshal(m, b)
-}
-func (m *SdkVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SdkVersion.Marshal(b, m, deterministic)
-}
-func (m *SdkVersion) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SdkVersion.Merge(m, src)
-}
-func (m *SdkVersion) XXX_Size() int {
-	return xxx_messageInfo_SdkVersion.Size(m)
-}
-func (m *SdkVersion) XXX_DiscardUnknown() {
-	xxx_messageInfo_SdkVersion.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SdkVersion proto.InternalMessageInfo
-
-func (m *SdkVersion) GetMin() *Int32Value {
-	if m != nil {
-		return m.Min
+func (x *SdkVersion) GetMin() *Int32Value {
+	if x != nil {
+		return x.Min
 	}
 	return nil
 }
 
 type GraphicsApi struct {
-	// Types that are valid to be assigned to ApiOneof:
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	// Types that are assignable to ApiOneof:
 	//	*GraphicsApi_MinOpenGlVersion
 	//	*GraphicsApi_MinVulkanVersion
-	ApiOneof             isGraphicsApi_ApiOneof `protobuf_oneof:"api_oneof"`
-	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
-	XXX_unrecognized     []byte                 `json:"-"`
-	XXX_sizecache        int32                  `json:"-"`
+	ApiOneof isGraphicsApi_ApiOneof `protobuf_oneof:"api_oneof"`
 }
 
-func (m *GraphicsApi) Reset()         { *m = GraphicsApi{} }
-func (m *GraphicsApi) String() string { return proto.CompactTextString(m) }
-func (*GraphicsApi) ProtoMessage()    {}
+func (x *GraphicsApi) Reset() {
+	*x = GraphicsApi{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *GraphicsApi) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GraphicsApi) ProtoMessage() {}
+
+func (x *GraphicsApi) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[7]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use GraphicsApi.ProtoReflect.Descriptor instead.
 func (*GraphicsApi) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{7}
+	return file_targeting_proto_rawDescGZIP(), []int{7}
 }
 
-func (m *GraphicsApi) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_GraphicsApi.Unmarshal(m, b)
-}
-func (m *GraphicsApi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_GraphicsApi.Marshal(b, m, deterministic)
-}
-func (m *GraphicsApi) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GraphicsApi.Merge(m, src)
-}
-func (m *GraphicsApi) XXX_Size() int {
-	return xxx_messageInfo_GraphicsApi.Size(m)
-}
-func (m *GraphicsApi) XXX_DiscardUnknown() {
-	xxx_messageInfo_GraphicsApi.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GraphicsApi proto.InternalMessageInfo
-
-type isGraphicsApi_ApiOneof interface {
-	isGraphicsApi_ApiOneof()
-}
-
-type GraphicsApi_MinOpenGlVersion struct {
-	MinOpenGlVersion *OpenGlVersion `protobuf:"bytes,1,opt,name=min_open_gl_version,json=minOpenGlVersion,proto3,oneof"`
-}
-
-type GraphicsApi_MinVulkanVersion struct {
-	MinVulkanVersion *VulkanVersion `protobuf:"bytes,2,opt,name=min_vulkan_version,json=minVulkanVersion,proto3,oneof"`
-}
-
-func (*GraphicsApi_MinOpenGlVersion) isGraphicsApi_ApiOneof() {}
-
-func (*GraphicsApi_MinVulkanVersion) isGraphicsApi_ApiOneof() {}
-
 func (m *GraphicsApi) GetApiOneof() isGraphicsApi_ApiOneof {
 	if m != nil {
 		return m.ApiOneof
@@ -683,874 +812,1028 @@
 	return nil
 }
 
-func (m *GraphicsApi) GetMinOpenGlVersion() *OpenGlVersion {
-	if x, ok := m.GetApiOneof().(*GraphicsApi_MinOpenGlVersion); ok {
+func (x *GraphicsApi) GetMinOpenGlVersion() *OpenGlVersion {
+	if x, ok := x.GetApiOneof().(*GraphicsApi_MinOpenGlVersion); ok {
 		return x.MinOpenGlVersion
 	}
 	return nil
 }
 
-func (m *GraphicsApi) GetMinVulkanVersion() *VulkanVersion {
-	if x, ok := m.GetApiOneof().(*GraphicsApi_MinVulkanVersion); ok {
+func (x *GraphicsApi) GetMinVulkanVersion() *VulkanVersion {
+	if x, ok := x.GetApiOneof().(*GraphicsApi_MinVulkanVersion); ok {
 		return x.MinVulkanVersion
 	}
 	return nil
 }
 
-// XXX_OneofWrappers is for the internal use of the proto package.
-func (*GraphicsApi) XXX_OneofWrappers() []interface{} {
-	return []interface{}{
-		(*GraphicsApi_MinOpenGlVersion)(nil),
-		(*GraphicsApi_MinVulkanVersion)(nil),
+type isGraphicsApi_ApiOneof interface {
+	isGraphicsApi_ApiOneof()
+}
+
+type GraphicsApi_MinOpenGlVersion struct {
+	// Inclusive.
+	MinOpenGlVersion *OpenGlVersion `protobuf:"bytes,1,opt,name=min_open_gl_version,json=minOpenGlVersion,proto3,oneof"`
+}
+
+type GraphicsApi_MinVulkanVersion struct {
+	// Inclusive.
+	MinVulkanVersion *VulkanVersion `protobuf:"bytes,2,opt,name=min_vulkan_version,json=minVulkanVersion,proto3,oneof"`
+}
+
+func (*GraphicsApi_MinOpenGlVersion) isGraphicsApi_ApiOneof() {}
+
+func (*GraphicsApi_MinVulkanVersion) isGraphicsApi_ApiOneof() {}
+
+type VulkanVersion struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Major int32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` // VK_VERSION_MAJOR
+	Minor int32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` // VK_VERSION_MINOR
+}
+
+func (x *VulkanVersion) Reset() {
+	*x = VulkanVersion{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
 	}
 }
 
-type VulkanVersion struct {
-	Major                int32    `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
-	Minor                int32    `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+func (x *VulkanVersion) String() string {
+	return protoimpl.X.MessageStringOf(x)
 }
 
-func (m *VulkanVersion) Reset()         { *m = VulkanVersion{} }
-func (m *VulkanVersion) String() string { return proto.CompactTextString(m) }
-func (*VulkanVersion) ProtoMessage()    {}
+func (*VulkanVersion) ProtoMessage() {}
+
+func (x *VulkanVersion) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use VulkanVersion.ProtoReflect.Descriptor instead.
 func (*VulkanVersion) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{8}
+	return file_targeting_proto_rawDescGZIP(), []int{8}
 }
 
-func (m *VulkanVersion) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_VulkanVersion.Unmarshal(m, b)
-}
-func (m *VulkanVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_VulkanVersion.Marshal(b, m, deterministic)
-}
-func (m *VulkanVersion) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_VulkanVersion.Merge(m, src)
-}
-func (m *VulkanVersion) XXX_Size() int {
-	return xxx_messageInfo_VulkanVersion.Size(m)
-}
-func (m *VulkanVersion) XXX_DiscardUnknown() {
-	xxx_messageInfo_VulkanVersion.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_VulkanVersion proto.InternalMessageInfo
-
-func (m *VulkanVersion) GetMajor() int32 {
-	if m != nil {
-		return m.Major
+func (x *VulkanVersion) GetMajor() int32 {
+	if x != nil {
+		return x.Major
 	}
 	return 0
 }
 
-func (m *VulkanVersion) GetMinor() int32 {
-	if m != nil {
-		return m.Minor
+func (x *VulkanVersion) GetMinor() int32 {
+	if x != nil {
+		return x.Minor
 	}
 	return 0
 }
 
 type OpenGlVersion struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// e.g. OpenGL ES 3.2 is represented as { major: 3, minor: 2 }
-	Major                int32    `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"`
-	Minor                int32    `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Major int32 `protobuf:"varint,1,opt,name=major,proto3" json:"major,omitempty"` // GL_MAJOR_VERSION
+	Minor int32 `protobuf:"varint,2,opt,name=minor,proto3" json:"minor,omitempty"` // GL_MINOR_VERSION
 }
 
-func (m *OpenGlVersion) Reset()         { *m = OpenGlVersion{} }
-func (m *OpenGlVersion) String() string { return proto.CompactTextString(m) }
-func (*OpenGlVersion) ProtoMessage()    {}
+func (x *OpenGlVersion) Reset() {
+	*x = OpenGlVersion{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[9]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *OpenGlVersion) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OpenGlVersion) ProtoMessage() {}
+
+func (x *OpenGlVersion) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[9]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use OpenGlVersion.ProtoReflect.Descriptor instead.
 func (*OpenGlVersion) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{9}
+	return file_targeting_proto_rawDescGZIP(), []int{9}
 }
 
-func (m *OpenGlVersion) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_OpenGlVersion.Unmarshal(m, b)
-}
-func (m *OpenGlVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_OpenGlVersion.Marshal(b, m, deterministic)
-}
-func (m *OpenGlVersion) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_OpenGlVersion.Merge(m, src)
-}
-func (m *OpenGlVersion) XXX_Size() int {
-	return xxx_messageInfo_OpenGlVersion.Size(m)
-}
-func (m *OpenGlVersion) XXX_DiscardUnknown() {
-	xxx_messageInfo_OpenGlVersion.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_OpenGlVersion proto.InternalMessageInfo
-
-func (m *OpenGlVersion) GetMajor() int32 {
-	if m != nil {
-		return m.Major
+func (x *OpenGlVersion) GetMajor() int32 {
+	if x != nil {
+		return x.Major
 	}
 	return 0
 }
 
-func (m *OpenGlVersion) GetMinor() int32 {
-	if m != nil {
-		return m.Minor
+func (x *OpenGlVersion) GetMinor() int32 {
+	if x != nil {
+		return x.Minor
 	}
 	return 0
 }
 
 type TextureCompressionFormat struct {
-	Alias                TextureCompressionFormat_TextureCompressionFormatAlias `protobuf:"varint,1,opt,name=alias,proto3,enum=android.bundle.TextureCompressionFormat_TextureCompressionFormatAlias" json:"alias,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                                               `json:"-"`
-	XXX_unrecognized     []byte                                                 `json:"-"`
-	XXX_sizecache        int32                                                  `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Alias TextureCompressionFormat_TextureCompressionFormatAlias `protobuf:"varint,1,opt,name=alias,proto3,enum=android.bundle.TextureCompressionFormat_TextureCompressionFormatAlias" json:"alias,omitempty"`
 }
 
-func (m *TextureCompressionFormat) Reset()         { *m = TextureCompressionFormat{} }
-func (m *TextureCompressionFormat) String() string { return proto.CompactTextString(m) }
-func (*TextureCompressionFormat) ProtoMessage()    {}
+func (x *TextureCompressionFormat) Reset() {
+	*x = TextureCompressionFormat{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[10]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *TextureCompressionFormat) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TextureCompressionFormat) ProtoMessage() {}
+
+func (x *TextureCompressionFormat) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[10]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use TextureCompressionFormat.ProtoReflect.Descriptor instead.
 func (*TextureCompressionFormat) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{10}
+	return file_targeting_proto_rawDescGZIP(), []int{10}
 }
 
-func (m *TextureCompressionFormat) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_TextureCompressionFormat.Unmarshal(m, b)
-}
-func (m *TextureCompressionFormat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_TextureCompressionFormat.Marshal(b, m, deterministic)
-}
-func (m *TextureCompressionFormat) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_TextureCompressionFormat.Merge(m, src)
-}
-func (m *TextureCompressionFormat) XXX_Size() int {
-	return xxx_messageInfo_TextureCompressionFormat.Size(m)
-}
-func (m *TextureCompressionFormat) XXX_DiscardUnknown() {
-	xxx_messageInfo_TextureCompressionFormat.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_TextureCompressionFormat proto.InternalMessageInfo
-
-func (m *TextureCompressionFormat) GetAlias() TextureCompressionFormat_TextureCompressionFormatAlias {
-	if m != nil {
-		return m.Alias
+func (x *TextureCompressionFormat) GetAlias() TextureCompressionFormat_TextureCompressionFormatAlias {
+	if x != nil {
+		return x.Alias
 	}
 	return TextureCompressionFormat_UNSPECIFIED_TEXTURE_COMPRESSION_FORMAT
 }
 
 type Abi struct {
-	Alias                Abi_AbiAlias `protobuf:"varint,1,opt,name=alias,proto3,enum=android.bundle.Abi_AbiAlias" json:"alias,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
-	XXX_unrecognized     []byte       `json:"-"`
-	XXX_sizecache        int32        `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Alias Abi_AbiAlias `protobuf:"varint,1,opt,name=alias,proto3,enum=android.bundle.Abi_AbiAlias" json:"alias,omitempty"`
 }
 
-func (m *Abi) Reset()         { *m = Abi{} }
-func (m *Abi) String() string { return proto.CompactTextString(m) }
-func (*Abi) ProtoMessage()    {}
+func (x *Abi) Reset() {
+	*x = Abi{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[11]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Abi) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Abi) ProtoMessage() {}
+
+func (x *Abi) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[11]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Abi.ProtoReflect.Descriptor instead.
 func (*Abi) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{11}
+	return file_targeting_proto_rawDescGZIP(), []int{11}
 }
 
-func (m *Abi) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Abi.Unmarshal(m, b)
-}
-func (m *Abi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Abi.Marshal(b, m, deterministic)
-}
-func (m *Abi) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Abi.Merge(m, src)
-}
-func (m *Abi) XXX_Size() int {
-	return xxx_messageInfo_Abi.Size(m)
-}
-func (m *Abi) XXX_DiscardUnknown() {
-	xxx_messageInfo_Abi.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Abi proto.InternalMessageInfo
-
-func (m *Abi) GetAlias() Abi_AbiAlias {
-	if m != nil {
-		return m.Alias
+func (x *Abi) GetAlias() Abi_AbiAlias {
+	if x != nil {
+		return x.Alias
 	}
 	return Abi_UNSPECIFIED_CPU_ARCHITECTURE
 }
 
 type MultiAbi struct {
-	Abi                  []*Abi   `protobuf:"bytes,1,rep,name=abi,proto3" json:"abi,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Abi []*Abi `protobuf:"bytes,1,rep,name=abi,proto3" json:"abi,omitempty"`
 }
 
-func (m *MultiAbi) Reset()         { *m = MultiAbi{} }
-func (m *MultiAbi) String() string { return proto.CompactTextString(m) }
-func (*MultiAbi) ProtoMessage()    {}
+func (x *MultiAbi) Reset() {
+	*x = MultiAbi{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[12]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MultiAbi) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MultiAbi) ProtoMessage() {}
+
+func (x *MultiAbi) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[12]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use MultiAbi.ProtoReflect.Descriptor instead.
 func (*MultiAbi) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{12}
+	return file_targeting_proto_rawDescGZIP(), []int{12}
 }
 
-func (m *MultiAbi) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_MultiAbi.Unmarshal(m, b)
-}
-func (m *MultiAbi) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_MultiAbi.Marshal(b, m, deterministic)
-}
-func (m *MultiAbi) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MultiAbi.Merge(m, src)
-}
-func (m *MultiAbi) XXX_Size() int {
-	return xxx_messageInfo_MultiAbi.Size(m)
-}
-func (m *MultiAbi) XXX_DiscardUnknown() {
-	xxx_messageInfo_MultiAbi.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_MultiAbi proto.InternalMessageInfo
-
-func (m *MultiAbi) GetAbi() []*Abi {
-	if m != nil {
-		return m.Abi
+func (x *MultiAbi) GetAbi() []*Abi {
+	if x != nil {
+		return x.Abi
 	}
 	return nil
 }
 
 type Sanitizer struct {
-	Alias                Sanitizer_SanitizerAlias `protobuf:"varint,1,opt,name=alias,proto3,enum=android.bundle.Sanitizer_SanitizerAlias" json:"alias,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
-	XXX_unrecognized     []byte                   `json:"-"`
-	XXX_sizecache        int32                    `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Alias Sanitizer_SanitizerAlias `protobuf:"varint,1,opt,name=alias,proto3,enum=android.bundle.Sanitizer_SanitizerAlias" json:"alias,omitempty"`
 }
 
-func (m *Sanitizer) Reset()         { *m = Sanitizer{} }
-func (m *Sanitizer) String() string { return proto.CompactTextString(m) }
-func (*Sanitizer) ProtoMessage()    {}
+func (x *Sanitizer) Reset() {
+	*x = Sanitizer{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[13]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Sanitizer) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Sanitizer) ProtoMessage() {}
+
+func (x *Sanitizer) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[13]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Sanitizer.ProtoReflect.Descriptor instead.
 func (*Sanitizer) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{13}
+	return file_targeting_proto_rawDescGZIP(), []int{13}
 }
 
-func (m *Sanitizer) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Sanitizer.Unmarshal(m, b)
-}
-func (m *Sanitizer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Sanitizer.Marshal(b, m, deterministic)
-}
-func (m *Sanitizer) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Sanitizer.Merge(m, src)
-}
-func (m *Sanitizer) XXX_Size() int {
-	return xxx_messageInfo_Sanitizer.Size(m)
-}
-func (m *Sanitizer) XXX_DiscardUnknown() {
-	xxx_messageInfo_Sanitizer.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Sanitizer proto.InternalMessageInfo
-
-func (m *Sanitizer) GetAlias() Sanitizer_SanitizerAlias {
-	if m != nil {
-		return m.Alias
+func (x *Sanitizer) GetAlias() Sanitizer_SanitizerAlias {
+	if x != nil {
+		return x.Alias
 	}
 	return Sanitizer_NONE
 }
 
 type DeviceFeature struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	FeatureName string `protobuf:"bytes,1,opt,name=feature_name,json=featureName,proto3" json:"feature_name,omitempty"`
 	// Equivalent of android:glEsVersion or android:version in <uses-feature>.
-	FeatureVersion       int32    `protobuf:"varint,2,opt,name=feature_version,json=featureVersion,proto3" json:"feature_version,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	FeatureVersion int32 `protobuf:"varint,2,opt,name=feature_version,json=featureVersion,proto3" json:"feature_version,omitempty"`
 }
 
-func (m *DeviceFeature) Reset()         { *m = DeviceFeature{} }
-func (m *DeviceFeature) String() string { return proto.CompactTextString(m) }
-func (*DeviceFeature) ProtoMessage()    {}
+func (x *DeviceFeature) Reset() {
+	*x = DeviceFeature{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[14]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DeviceFeature) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceFeature) ProtoMessage() {}
+
+func (x *DeviceFeature) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[14]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceFeature.ProtoReflect.Descriptor instead.
 func (*DeviceFeature) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{14}
+	return file_targeting_proto_rawDescGZIP(), []int{14}
 }
 
-func (m *DeviceFeature) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_DeviceFeature.Unmarshal(m, b)
-}
-func (m *DeviceFeature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_DeviceFeature.Marshal(b, m, deterministic)
-}
-func (m *DeviceFeature) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DeviceFeature.Merge(m, src)
-}
-func (m *DeviceFeature) XXX_Size() int {
-	return xxx_messageInfo_DeviceFeature.Size(m)
-}
-func (m *DeviceFeature) XXX_DiscardUnknown() {
-	xxx_messageInfo_DeviceFeature.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeviceFeature proto.InternalMessageInfo
-
-func (m *DeviceFeature) GetFeatureName() string {
-	if m != nil {
-		return m.FeatureName
+func (x *DeviceFeature) GetFeatureName() string {
+	if x != nil {
+		return x.FeatureName
 	}
 	return ""
 }
 
-func (m *DeviceFeature) GetFeatureVersion() int32 {
-	if m != nil {
-		return m.FeatureVersion
+func (x *DeviceFeature) GetFeatureVersion() int32 {
+	if x != nil {
+		return x.FeatureVersion
 	}
 	return 0
 }
 
 // Targeting specific for directories under assets/.
 type AssetsDirectoryTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Abi                      *AbiTargeting                      `protobuf:"bytes,1,opt,name=abi,proto3" json:"abi,omitempty"`
 	GraphicsApi              *GraphicsApiTargeting              `protobuf:"bytes,2,opt,name=graphics_api,json=graphicsApi,proto3" json:"graphics_api,omitempty"`
 	TextureCompressionFormat *TextureCompressionFormatTargeting `protobuf:"bytes,3,opt,name=texture_compression_format,json=textureCompressionFormat,proto3" json:"texture_compression_format,omitempty"`
 	Language                 *LanguageTargeting                 `protobuf:"bytes,4,opt,name=language,proto3" json:"language,omitempty"`
-	XXX_NoUnkeyedLiteral     struct{}                           `json:"-"`
-	XXX_unrecognized         []byte                             `json:"-"`
-	XXX_sizecache            int32                              `json:"-"`
 }
 
-func (m *AssetsDirectoryTargeting) Reset()         { *m = AssetsDirectoryTargeting{} }
-func (m *AssetsDirectoryTargeting) String() string { return proto.CompactTextString(m) }
-func (*AssetsDirectoryTargeting) ProtoMessage()    {}
+func (x *AssetsDirectoryTargeting) Reset() {
+	*x = AssetsDirectoryTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[15]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AssetsDirectoryTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AssetsDirectoryTargeting) ProtoMessage() {}
+
+func (x *AssetsDirectoryTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[15]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AssetsDirectoryTargeting.ProtoReflect.Descriptor instead.
 func (*AssetsDirectoryTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{15}
+	return file_targeting_proto_rawDescGZIP(), []int{15}
 }
 
-func (m *AssetsDirectoryTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_AssetsDirectoryTargeting.Unmarshal(m, b)
-}
-func (m *AssetsDirectoryTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_AssetsDirectoryTargeting.Marshal(b, m, deterministic)
-}
-func (m *AssetsDirectoryTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_AssetsDirectoryTargeting.Merge(m, src)
-}
-func (m *AssetsDirectoryTargeting) XXX_Size() int {
-	return xxx_messageInfo_AssetsDirectoryTargeting.Size(m)
-}
-func (m *AssetsDirectoryTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_AssetsDirectoryTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AssetsDirectoryTargeting proto.InternalMessageInfo
-
-func (m *AssetsDirectoryTargeting) GetAbi() *AbiTargeting {
-	if m != nil {
-		return m.Abi
+func (x *AssetsDirectoryTargeting) GetAbi() *AbiTargeting {
+	if x != nil {
+		return x.Abi
 	}
 	return nil
 }
 
-func (m *AssetsDirectoryTargeting) GetGraphicsApi() *GraphicsApiTargeting {
-	if m != nil {
-		return m.GraphicsApi
+func (x *AssetsDirectoryTargeting) GetGraphicsApi() *GraphicsApiTargeting {
+	if x != nil {
+		return x.GraphicsApi
 	}
 	return nil
 }
 
-func (m *AssetsDirectoryTargeting) GetTextureCompressionFormat() *TextureCompressionFormatTargeting {
-	if m != nil {
-		return m.TextureCompressionFormat
+func (x *AssetsDirectoryTargeting) GetTextureCompressionFormat() *TextureCompressionFormatTargeting {
+	if x != nil {
+		return x.TextureCompressionFormat
 	}
 	return nil
 }
 
-func (m *AssetsDirectoryTargeting) GetLanguage() *LanguageTargeting {
-	if m != nil {
-		return m.Language
+func (x *AssetsDirectoryTargeting) GetLanguage() *LanguageTargeting {
+	if x != nil {
+		return x.Language
 	}
 	return nil
 }
 
 // Targeting specific for directories under lib/.
 type NativeDirectoryTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Abi                      *Abi                      `protobuf:"bytes,1,opt,name=abi,proto3" json:"abi,omitempty"`
 	GraphicsApi              *GraphicsApi              `protobuf:"bytes,2,opt,name=graphics_api,json=graphicsApi,proto3" json:"graphics_api,omitempty"`
 	TextureCompressionFormat *TextureCompressionFormat `protobuf:"bytes,3,opt,name=texture_compression_format,json=textureCompressionFormat,proto3" json:"texture_compression_format,omitempty"`
 	Sanitizer                *Sanitizer                `protobuf:"bytes,4,opt,name=sanitizer,proto3" json:"sanitizer,omitempty"`
-	XXX_NoUnkeyedLiteral     struct{}                  `json:"-"`
-	XXX_unrecognized         []byte                    `json:"-"`
-	XXX_sizecache            int32                     `json:"-"`
 }
 
-func (m *NativeDirectoryTargeting) Reset()         { *m = NativeDirectoryTargeting{} }
-func (m *NativeDirectoryTargeting) String() string { return proto.CompactTextString(m) }
-func (*NativeDirectoryTargeting) ProtoMessage()    {}
+func (x *NativeDirectoryTargeting) Reset() {
+	*x = NativeDirectoryTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[16]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *NativeDirectoryTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NativeDirectoryTargeting) ProtoMessage() {}
+
+func (x *NativeDirectoryTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[16]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use NativeDirectoryTargeting.ProtoReflect.Descriptor instead.
 func (*NativeDirectoryTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{16}
+	return file_targeting_proto_rawDescGZIP(), []int{16}
 }
 
-func (m *NativeDirectoryTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_NativeDirectoryTargeting.Unmarshal(m, b)
-}
-func (m *NativeDirectoryTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_NativeDirectoryTargeting.Marshal(b, m, deterministic)
-}
-func (m *NativeDirectoryTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_NativeDirectoryTargeting.Merge(m, src)
-}
-func (m *NativeDirectoryTargeting) XXX_Size() int {
-	return xxx_messageInfo_NativeDirectoryTargeting.Size(m)
-}
-func (m *NativeDirectoryTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_NativeDirectoryTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_NativeDirectoryTargeting proto.InternalMessageInfo
-
-func (m *NativeDirectoryTargeting) GetAbi() *Abi {
-	if m != nil {
-		return m.Abi
+func (x *NativeDirectoryTargeting) GetAbi() *Abi {
+	if x != nil {
+		return x.Abi
 	}
 	return nil
 }
 
-func (m *NativeDirectoryTargeting) GetGraphicsApi() *GraphicsApi {
-	if m != nil {
-		return m.GraphicsApi
+func (x *NativeDirectoryTargeting) GetGraphicsApi() *GraphicsApi {
+	if x != nil {
+		return x.GraphicsApi
 	}
 	return nil
 }
 
-func (m *NativeDirectoryTargeting) GetTextureCompressionFormat() *TextureCompressionFormat {
-	if m != nil {
-		return m.TextureCompressionFormat
+func (x *NativeDirectoryTargeting) GetTextureCompressionFormat() *TextureCompressionFormat {
+	if x != nil {
+		return x.TextureCompressionFormat
 	}
 	return nil
 }
 
-func (m *NativeDirectoryTargeting) GetSanitizer() *Sanitizer {
-	if m != nil {
-		return m.Sanitizer
+func (x *NativeDirectoryTargeting) GetSanitizer() *Sanitizer {
+	if x != nil {
+		return x.Sanitizer
 	}
 	return nil
 }
 
 // Targeting specific for image files under apex/.
 type ApexImageTargeting struct {
-	MultiAbi             *MultiAbiTargeting `protobuf:"bytes,1,opt,name=multi_abi,json=multiAbi,proto3" json:"multi_abi,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
-	XXX_unrecognized     []byte             `json:"-"`
-	XXX_sizecache        int32              `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	MultiAbi *MultiAbiTargeting `protobuf:"bytes,1,opt,name=multi_abi,json=multiAbi,proto3" json:"multi_abi,omitempty"`
 }
 
-func (m *ApexImageTargeting) Reset()         { *m = ApexImageTargeting{} }
-func (m *ApexImageTargeting) String() string { return proto.CompactTextString(m) }
-func (*ApexImageTargeting) ProtoMessage()    {}
+func (x *ApexImageTargeting) Reset() {
+	*x = ApexImageTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[17]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ApexImageTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ApexImageTargeting) ProtoMessage() {}
+
+func (x *ApexImageTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[17]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ApexImageTargeting.ProtoReflect.Descriptor instead.
 func (*ApexImageTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{17}
+	return file_targeting_proto_rawDescGZIP(), []int{17}
 }
 
-func (m *ApexImageTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ApexImageTargeting.Unmarshal(m, b)
-}
-func (m *ApexImageTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ApexImageTargeting.Marshal(b, m, deterministic)
-}
-func (m *ApexImageTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ApexImageTargeting.Merge(m, src)
-}
-func (m *ApexImageTargeting) XXX_Size() int {
-	return xxx_messageInfo_ApexImageTargeting.Size(m)
-}
-func (m *ApexImageTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_ApexImageTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ApexImageTargeting proto.InternalMessageInfo
-
-func (m *ApexImageTargeting) GetMultiAbi() *MultiAbiTargeting {
-	if m != nil {
-		return m.MultiAbi
+func (x *ApexImageTargeting) GetMultiAbi() *MultiAbiTargeting {
+	if x != nil {
+		return x.MultiAbi
 	}
 	return nil
 }
 
 type AbiTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Value []*Abi `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	// Targeting of other sibling directories that were in the Bundle.
 	// For master splits this is targeting of other master splits.
-	Alternatives         []*Abi   `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Alternatives []*Abi `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
 }
 
-func (m *AbiTargeting) Reset()         { *m = AbiTargeting{} }
-func (m *AbiTargeting) String() string { return proto.CompactTextString(m) }
-func (*AbiTargeting) ProtoMessage()    {}
+func (x *AbiTargeting) Reset() {
+	*x = AbiTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[18]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AbiTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AbiTargeting) ProtoMessage() {}
+
+func (x *AbiTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[18]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use AbiTargeting.ProtoReflect.Descriptor instead.
 func (*AbiTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{18}
+	return file_targeting_proto_rawDescGZIP(), []int{18}
 }
 
-func (m *AbiTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_AbiTargeting.Unmarshal(m, b)
-}
-func (m *AbiTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_AbiTargeting.Marshal(b, m, deterministic)
-}
-func (m *AbiTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_AbiTargeting.Merge(m, src)
-}
-func (m *AbiTargeting) XXX_Size() int {
-	return xxx_messageInfo_AbiTargeting.Size(m)
-}
-func (m *AbiTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_AbiTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_AbiTargeting proto.InternalMessageInfo
-
-func (m *AbiTargeting) GetValue() []*Abi {
-	if m != nil {
-		return m.Value
+func (x *AbiTargeting) GetValue() []*Abi {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
 
-func (m *AbiTargeting) GetAlternatives() []*Abi {
-	if m != nil {
-		return m.Alternatives
+func (x *AbiTargeting) GetAlternatives() []*Abi {
+	if x != nil {
+		return x.Alternatives
 	}
 	return nil
 }
 
 type MultiAbiTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Value []*MultiAbi `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	// Targeting of other sibling directories that were in the Bundle.
 	// For master splits this is targeting of other master splits.
-	Alternatives         []*MultiAbi `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
-	XXX_unrecognized     []byte      `json:"-"`
-	XXX_sizecache        int32       `json:"-"`
+	Alternatives []*MultiAbi `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
 }
 
-func (m *MultiAbiTargeting) Reset()         { *m = MultiAbiTargeting{} }
-func (m *MultiAbiTargeting) String() string { return proto.CompactTextString(m) }
-func (*MultiAbiTargeting) ProtoMessage()    {}
+func (x *MultiAbiTargeting) Reset() {
+	*x = MultiAbiTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[19]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MultiAbiTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MultiAbiTargeting) ProtoMessage() {}
+
+func (x *MultiAbiTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[19]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use MultiAbiTargeting.ProtoReflect.Descriptor instead.
 func (*MultiAbiTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{19}
+	return file_targeting_proto_rawDescGZIP(), []int{19}
 }
 
-func (m *MultiAbiTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_MultiAbiTargeting.Unmarshal(m, b)
-}
-func (m *MultiAbiTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_MultiAbiTargeting.Marshal(b, m, deterministic)
-}
-func (m *MultiAbiTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MultiAbiTargeting.Merge(m, src)
-}
-func (m *MultiAbiTargeting) XXX_Size() int {
-	return xxx_messageInfo_MultiAbiTargeting.Size(m)
-}
-func (m *MultiAbiTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_MultiAbiTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_MultiAbiTargeting proto.InternalMessageInfo
-
-func (m *MultiAbiTargeting) GetValue() []*MultiAbi {
-	if m != nil {
-		return m.Value
+func (x *MultiAbiTargeting) GetValue() []*MultiAbi {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
 
-func (m *MultiAbiTargeting) GetAlternatives() []*MultiAbi {
-	if m != nil {
-		return m.Alternatives
+func (x *MultiAbiTargeting) GetAlternatives() []*MultiAbi {
+	if x != nil {
+		return x.Alternatives
 	}
 	return nil
 }
 
 type ScreenDensityTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Value []*ScreenDensity `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	// Targeting of other sibling directories that were in the Bundle.
 	// For master splits this is targeting of other master splits.
-	Alternatives         []*ScreenDensity `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
-	XXX_unrecognized     []byte           `json:"-"`
-	XXX_sizecache        int32            `json:"-"`
+	Alternatives []*ScreenDensity `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
 }
 
-func (m *ScreenDensityTargeting) Reset()         { *m = ScreenDensityTargeting{} }
-func (m *ScreenDensityTargeting) String() string { return proto.CompactTextString(m) }
-func (*ScreenDensityTargeting) ProtoMessage()    {}
+func (x *ScreenDensityTargeting) Reset() {
+	*x = ScreenDensityTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[20]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ScreenDensityTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ScreenDensityTargeting) ProtoMessage() {}
+
+func (x *ScreenDensityTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[20]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ScreenDensityTargeting.ProtoReflect.Descriptor instead.
 func (*ScreenDensityTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{20}
+	return file_targeting_proto_rawDescGZIP(), []int{20}
 }
 
-func (m *ScreenDensityTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ScreenDensityTargeting.Unmarshal(m, b)
-}
-func (m *ScreenDensityTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ScreenDensityTargeting.Marshal(b, m, deterministic)
-}
-func (m *ScreenDensityTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ScreenDensityTargeting.Merge(m, src)
-}
-func (m *ScreenDensityTargeting) XXX_Size() int {
-	return xxx_messageInfo_ScreenDensityTargeting.Size(m)
-}
-func (m *ScreenDensityTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_ScreenDensityTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ScreenDensityTargeting proto.InternalMessageInfo
-
-func (m *ScreenDensityTargeting) GetValue() []*ScreenDensity {
-	if m != nil {
-		return m.Value
+func (x *ScreenDensityTargeting) GetValue() []*ScreenDensity {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
 
-func (m *ScreenDensityTargeting) GetAlternatives() []*ScreenDensity {
-	if m != nil {
-		return m.Alternatives
+func (x *ScreenDensityTargeting) GetAlternatives() []*ScreenDensity {
+	if x != nil {
+		return x.Alternatives
 	}
 	return nil
 }
 
 type LanguageTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// ISO-639: 2 or 3 letter language code.
 	Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	// Targeting of other sibling directories that were in the Bundle.
 	// For master splits this is targeting of other master splits.
-	Alternatives         []string `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Alternatives []string `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
 }
 
-func (m *LanguageTargeting) Reset()         { *m = LanguageTargeting{} }
-func (m *LanguageTargeting) String() string { return proto.CompactTextString(m) }
-func (*LanguageTargeting) ProtoMessage()    {}
+func (x *LanguageTargeting) Reset() {
+	*x = LanguageTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[21]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *LanguageTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LanguageTargeting) ProtoMessage() {}
+
+func (x *LanguageTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[21]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use LanguageTargeting.ProtoReflect.Descriptor instead.
 func (*LanguageTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{21}
+	return file_targeting_proto_rawDescGZIP(), []int{21}
 }
 
-func (m *LanguageTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_LanguageTargeting.Unmarshal(m, b)
-}
-func (m *LanguageTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_LanguageTargeting.Marshal(b, m, deterministic)
-}
-func (m *LanguageTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_LanguageTargeting.Merge(m, src)
-}
-func (m *LanguageTargeting) XXX_Size() int {
-	return xxx_messageInfo_LanguageTargeting.Size(m)
-}
-func (m *LanguageTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_LanguageTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_LanguageTargeting proto.InternalMessageInfo
-
-func (m *LanguageTargeting) GetValue() []string {
-	if m != nil {
-		return m.Value
+func (x *LanguageTargeting) GetValue() []string {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
 
-func (m *LanguageTargeting) GetAlternatives() []string {
-	if m != nil {
-		return m.Alternatives
+func (x *LanguageTargeting) GetAlternatives() []string {
+	if x != nil {
+		return x.Alternatives
 	}
 	return nil
 }
 
 type GraphicsApiTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Value []*GraphicsApi `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	// Targeting of other sibling directories that were in the Bundle.
 	// For master splits this is targeting of other master splits.
-	Alternatives         []*GraphicsApi `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
-	XXX_unrecognized     []byte         `json:"-"`
-	XXX_sizecache        int32          `json:"-"`
+	Alternatives []*GraphicsApi `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
 }
 
-func (m *GraphicsApiTargeting) Reset()         { *m = GraphicsApiTargeting{} }
-func (m *GraphicsApiTargeting) String() string { return proto.CompactTextString(m) }
-func (*GraphicsApiTargeting) ProtoMessage()    {}
+func (x *GraphicsApiTargeting) Reset() {
+	*x = GraphicsApiTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[22]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *GraphicsApiTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GraphicsApiTargeting) ProtoMessage() {}
+
+func (x *GraphicsApiTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[22]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use GraphicsApiTargeting.ProtoReflect.Descriptor instead.
 func (*GraphicsApiTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{22}
+	return file_targeting_proto_rawDescGZIP(), []int{22}
 }
 
-func (m *GraphicsApiTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_GraphicsApiTargeting.Unmarshal(m, b)
-}
-func (m *GraphicsApiTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_GraphicsApiTargeting.Marshal(b, m, deterministic)
-}
-func (m *GraphicsApiTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_GraphicsApiTargeting.Merge(m, src)
-}
-func (m *GraphicsApiTargeting) XXX_Size() int {
-	return xxx_messageInfo_GraphicsApiTargeting.Size(m)
-}
-func (m *GraphicsApiTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_GraphicsApiTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_GraphicsApiTargeting proto.InternalMessageInfo
-
-func (m *GraphicsApiTargeting) GetValue() []*GraphicsApi {
-	if m != nil {
-		return m.Value
+func (x *GraphicsApiTargeting) GetValue() []*GraphicsApi {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
 
-func (m *GraphicsApiTargeting) GetAlternatives() []*GraphicsApi {
-	if m != nil {
-		return m.Alternatives
+func (x *GraphicsApiTargeting) GetAlternatives() []*GraphicsApi {
+	if x != nil {
+		return x.Alternatives
 	}
 	return nil
 }
 
 type SdkVersionTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Value []*SdkVersion `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	// Targeting of other sibling directories that were in the Bundle.
 	// For master splits this is targeting of other master splits.
-	Alternatives         []*SdkVersion `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
-	XXX_unrecognized     []byte        `json:"-"`
-	XXX_sizecache        int32         `json:"-"`
+	Alternatives []*SdkVersion `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
 }
 
-func (m *SdkVersionTargeting) Reset()         { *m = SdkVersionTargeting{} }
-func (m *SdkVersionTargeting) String() string { return proto.CompactTextString(m) }
-func (*SdkVersionTargeting) ProtoMessage()    {}
+func (x *SdkVersionTargeting) Reset() {
+	*x = SdkVersionTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[23]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SdkVersionTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SdkVersionTargeting) ProtoMessage() {}
+
+func (x *SdkVersionTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[23]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SdkVersionTargeting.ProtoReflect.Descriptor instead.
 func (*SdkVersionTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{23}
+	return file_targeting_proto_rawDescGZIP(), []int{23}
 }
 
-func (m *SdkVersionTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SdkVersionTargeting.Unmarshal(m, b)
-}
-func (m *SdkVersionTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SdkVersionTargeting.Marshal(b, m, deterministic)
-}
-func (m *SdkVersionTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SdkVersionTargeting.Merge(m, src)
-}
-func (m *SdkVersionTargeting) XXX_Size() int {
-	return xxx_messageInfo_SdkVersionTargeting.Size(m)
-}
-func (m *SdkVersionTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_SdkVersionTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SdkVersionTargeting proto.InternalMessageInfo
-
-func (m *SdkVersionTargeting) GetValue() []*SdkVersion {
-	if m != nil {
-		return m.Value
+func (x *SdkVersionTargeting) GetValue() []*SdkVersion {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
 
-func (m *SdkVersionTargeting) GetAlternatives() []*SdkVersion {
-	if m != nil {
-		return m.Alternatives
+func (x *SdkVersionTargeting) GetAlternatives() []*SdkVersion {
+	if x != nil {
+		return x.Alternatives
 	}
 	return nil
 }
 
 type TextureCompressionFormatTargeting struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	Value []*TextureCompressionFormat `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	// Targeting of other sibling directories that were in the Bundle.
 	// For master splits this is targeting of other master splits.
-	Alternatives         []*TextureCompressionFormat `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                    `json:"-"`
-	XXX_unrecognized     []byte                      `json:"-"`
-	XXX_sizecache        int32                       `json:"-"`
+	Alternatives []*TextureCompressionFormat `protobuf:"bytes,2,rep,name=alternatives,proto3" json:"alternatives,omitempty"`
 }
 
-func (m *TextureCompressionFormatTargeting) Reset()         { *m = TextureCompressionFormatTargeting{} }
-func (m *TextureCompressionFormatTargeting) String() string { return proto.CompactTextString(m) }
-func (*TextureCompressionFormatTargeting) ProtoMessage()    {}
+func (x *TextureCompressionFormatTargeting) Reset() {
+	*x = TextureCompressionFormatTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[24]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *TextureCompressionFormatTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TextureCompressionFormatTargeting) ProtoMessage() {}
+
+func (x *TextureCompressionFormatTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[24]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use TextureCompressionFormatTargeting.ProtoReflect.Descriptor instead.
 func (*TextureCompressionFormatTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{24}
+	return file_targeting_proto_rawDescGZIP(), []int{24}
 }
 
-func (m *TextureCompressionFormatTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_TextureCompressionFormatTargeting.Unmarshal(m, b)
-}
-func (m *TextureCompressionFormatTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_TextureCompressionFormatTargeting.Marshal(b, m, deterministic)
-}
-func (m *TextureCompressionFormatTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_TextureCompressionFormatTargeting.Merge(m, src)
-}
-func (m *TextureCompressionFormatTargeting) XXX_Size() int {
-	return xxx_messageInfo_TextureCompressionFormatTargeting.Size(m)
-}
-func (m *TextureCompressionFormatTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_TextureCompressionFormatTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_TextureCompressionFormatTargeting proto.InternalMessageInfo
-
-func (m *TextureCompressionFormatTargeting) GetValue() []*TextureCompressionFormat {
-	if m != nil {
-		return m.Value
+func (x *TextureCompressionFormatTargeting) GetValue() []*TextureCompressionFormat {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
 
-func (m *TextureCompressionFormatTargeting) GetAlternatives() []*TextureCompressionFormat {
-	if m != nil {
-		return m.Alternatives
+func (x *TextureCompressionFormatTargeting) GetAlternatives() []*TextureCompressionFormat {
+	if x != nil {
+		return x.Alternatives
 	}
 	return nil
 }
 
 type SanitizerTargeting struct {
-	Value                []*Sanitizer `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
-	XXX_unrecognized     []byte       `json:"-"`
-	XXX_sizecache        int32        `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Value []*Sanitizer `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 }
 
-func (m *SanitizerTargeting) Reset()         { *m = SanitizerTargeting{} }
-func (m *SanitizerTargeting) String() string { return proto.CompactTextString(m) }
-func (*SanitizerTargeting) ProtoMessage()    {}
+func (x *SanitizerTargeting) Reset() {
+	*x = SanitizerTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[25]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SanitizerTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SanitizerTargeting) ProtoMessage() {}
+
+func (x *SanitizerTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[25]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SanitizerTargeting.ProtoReflect.Descriptor instead.
 func (*SanitizerTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{25}
+	return file_targeting_proto_rawDescGZIP(), []int{25}
 }
 
-func (m *SanitizerTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SanitizerTargeting.Unmarshal(m, b)
-}
-func (m *SanitizerTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SanitizerTargeting.Marshal(b, m, deterministic)
-}
-func (m *SanitizerTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SanitizerTargeting.Merge(m, src)
-}
-func (m *SanitizerTargeting) XXX_Size() int {
-	return xxx_messageInfo_SanitizerTargeting.Size(m)
-}
-func (m *SanitizerTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_SanitizerTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SanitizerTargeting proto.InternalMessageInfo
-
-func (m *SanitizerTargeting) GetValue() []*Sanitizer {
-	if m != nil {
-		return m.Value
+func (x *SanitizerTargeting) GetValue() []*Sanitizer {
+	if x != nil {
+		return x.Value
 	}
 	return nil
 }
@@ -1559,176 +1842,829 @@
 // the DeviceFeatureTargeting represents only one device feature to retain
 // that convention.
 type DeviceFeatureTargeting struct {
-	RequiredFeature      *DeviceFeature `protobuf:"bytes,1,opt,name=required_feature,json=requiredFeature,proto3" json:"required_feature,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
-	XXX_unrecognized     []byte         `json:"-"`
-	XXX_sizecache        int32          `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	RequiredFeature *DeviceFeature `protobuf:"bytes,1,opt,name=required_feature,json=requiredFeature,proto3" json:"required_feature,omitempty"`
 }
 
-func (m *DeviceFeatureTargeting) Reset()         { *m = DeviceFeatureTargeting{} }
-func (m *DeviceFeatureTargeting) String() string { return proto.CompactTextString(m) }
-func (*DeviceFeatureTargeting) ProtoMessage()    {}
+func (x *DeviceFeatureTargeting) Reset() {
+	*x = DeviceFeatureTargeting{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_targeting_proto_msgTypes[26]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DeviceFeatureTargeting) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeviceFeatureTargeting) ProtoMessage() {}
+
+func (x *DeviceFeatureTargeting) ProtoReflect() protoreflect.Message {
+	mi := &file_targeting_proto_msgTypes[26]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeviceFeatureTargeting.ProtoReflect.Descriptor instead.
 func (*DeviceFeatureTargeting) Descriptor() ([]byte, []int) {
-	return fileDescriptor_df45b505afdf471e, []int{26}
+	return file_targeting_proto_rawDescGZIP(), []int{26}
 }
 
-func (m *DeviceFeatureTargeting) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_DeviceFeatureTargeting.Unmarshal(m, b)
-}
-func (m *DeviceFeatureTargeting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_DeviceFeatureTargeting.Marshal(b, m, deterministic)
-}
-func (m *DeviceFeatureTargeting) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_DeviceFeatureTargeting.Merge(m, src)
-}
-func (m *DeviceFeatureTargeting) XXX_Size() int {
-	return xxx_messageInfo_DeviceFeatureTargeting.Size(m)
-}
-func (m *DeviceFeatureTargeting) XXX_DiscardUnknown() {
-	xxx_messageInfo_DeviceFeatureTargeting.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_DeviceFeatureTargeting proto.InternalMessageInfo
-
-func (m *DeviceFeatureTargeting) GetRequiredFeature() *DeviceFeature {
-	if m != nil {
-		return m.RequiredFeature
+func (x *DeviceFeatureTargeting) GetRequiredFeature() *DeviceFeature {
+	if x != nil {
+		return x.RequiredFeature
 	}
 	return nil
 }
 
-func init() {
-	proto.RegisterEnum("android.bundle.ScreenDensity_DensityAlias", ScreenDensity_DensityAlias_name, ScreenDensity_DensityAlias_value)
-	proto.RegisterEnum("android.bundle.TextureCompressionFormat_TextureCompressionFormatAlias", TextureCompressionFormat_TextureCompressionFormatAlias_name, TextureCompressionFormat_TextureCompressionFormatAlias_value)
-	proto.RegisterEnum("android.bundle.Abi_AbiAlias", Abi_AbiAlias_name, Abi_AbiAlias_value)
-	proto.RegisterEnum("android.bundle.Sanitizer_SanitizerAlias", Sanitizer_SanitizerAlias_name, Sanitizer_SanitizerAlias_value)
-	proto.RegisterType((*VariantTargeting)(nil), "android.bundle.VariantTargeting")
-	proto.RegisterType((*ApkTargeting)(nil), "android.bundle.ApkTargeting")
-	proto.RegisterType((*ModuleTargeting)(nil), "android.bundle.ModuleTargeting")
-	proto.RegisterType((*UserCountriesTargeting)(nil), "android.bundle.UserCountriesTargeting")
-	proto.RegisterType((*ScreenDensity)(nil), "android.bundle.ScreenDensity")
-	proto.RegisterType((*Int32Value)(nil), "android.bundle.Int32Value")
-	proto.RegisterType((*SdkVersion)(nil), "android.bundle.SdkVersion")
-	proto.RegisterType((*GraphicsApi)(nil), "android.bundle.GraphicsApi")
-	proto.RegisterType((*VulkanVersion)(nil), "android.bundle.VulkanVersion")
-	proto.RegisterType((*OpenGlVersion)(nil), "android.bundle.OpenGlVersion")
-	proto.RegisterType((*TextureCompressionFormat)(nil), "android.bundle.TextureCompressionFormat")
-	proto.RegisterType((*Abi)(nil), "android.bundle.Abi")
-	proto.RegisterType((*MultiAbi)(nil), "android.bundle.MultiAbi")
-	proto.RegisterType((*Sanitizer)(nil), "android.bundle.Sanitizer")
-	proto.RegisterType((*DeviceFeature)(nil), "android.bundle.DeviceFeature")
-	proto.RegisterType((*AssetsDirectoryTargeting)(nil), "android.bundle.AssetsDirectoryTargeting")
-	proto.RegisterType((*NativeDirectoryTargeting)(nil), "android.bundle.NativeDirectoryTargeting")
-	proto.RegisterType((*ApexImageTargeting)(nil), "android.bundle.ApexImageTargeting")
-	proto.RegisterType((*AbiTargeting)(nil), "android.bundle.AbiTargeting")
-	proto.RegisterType((*MultiAbiTargeting)(nil), "android.bundle.MultiAbiTargeting")
-	proto.RegisterType((*ScreenDensityTargeting)(nil), "android.bundle.ScreenDensityTargeting")
-	proto.RegisterType((*LanguageTargeting)(nil), "android.bundle.LanguageTargeting")
-	proto.RegisterType((*GraphicsApiTargeting)(nil), "android.bundle.GraphicsApiTargeting")
-	proto.RegisterType((*SdkVersionTargeting)(nil), "android.bundle.SdkVersionTargeting")
-	proto.RegisterType((*TextureCompressionFormatTargeting)(nil), "android.bundle.TextureCompressionFormatTargeting")
-	proto.RegisterType((*SanitizerTargeting)(nil), "android.bundle.SanitizerTargeting")
-	proto.RegisterType((*DeviceFeatureTargeting)(nil), "android.bundle.DeviceFeatureTargeting")
+var File_targeting_proto protoreflect.FileDescriptor
+
+var file_targeting_proto_rawDesc = []byte{
+	0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x12, 0x0e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x22, 0xe8, 0x03, 0x0a, 0x10, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x54, 0x61, 0x72,
+	0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x57, 0x0a, 0x15, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
+	0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+	0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x73, 0x64, 0x6b, 0x56,
+	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12,
+	0x41, 0x0a, 0x0d, 0x61, 0x62, 0x69, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65,
+	0x74, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x61, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69,
+	0x6e, 0x67, 0x12, 0x60, 0x0a, 0x18, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6e,
+	0x73, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62,
+	0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x65, 0x6e, 0x73,
+	0x69, 0x74, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x16, 0x73, 0x63,
+	0x72, 0x65, 0x65, 0x6e, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65,
+	0x74, 0x69, 0x6e, 0x67, 0x12, 0x51, 0x0a, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x61, 0x62,
+	0x69, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x21, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64,
+	0x6c, 0x65, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65,
+	0x74, 0x69, 0x6e, 0x67, 0x52, 0x11, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x62, 0x69, 0x54, 0x61,
+	0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x24, 0x74, 0x65, 0x78, 0x74,
+	0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
+	0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43,
+	0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74,
+	0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x21, 0x74, 0x65, 0x78, 0x74, 0x75,
+	0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72,
+	0x6d, 0x61, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xe7, 0x05, 0x0a,
+	0x0c, 0x41, 0x70, 0x6b, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a,
+	0x0d, 0x61, 0x62, 0x69, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62,
+	0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69,
+	0x6e, 0x67, 0x52, 0x0c, 0x61, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67,
+	0x12, 0x5a, 0x0a, 0x16, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x5f, 0x61, 0x70, 0x69,
+	0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x24, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x41, 0x70, 0x69, 0x54, 0x61, 0x72,
+	0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73,
+	0x41, 0x70, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x50, 0x0a, 0x12,
+	0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69,
+	0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+	0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61,
+	0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x11, 0x6c, 0x61, 0x6e,
+	0x67, 0x75, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x60,
+	0x0a, 0x18, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79,
+	0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
+	0x32, 0x26, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x54,
+	0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x16, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e,
+	0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67,
+	0x12, 0x57, 0x0a, 0x15, 0x73, 0x64, 0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f,
+	0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x23, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x2e, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65,
+	0x74, 0x69, 0x6e, 0x67, 0x52, 0x13, 0x73, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+	0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x24, 0x74, 0x65,
+	0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f,
+	0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69,
+	0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+	0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72,
+	0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d,
+	0x61, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x21, 0x74, 0x65, 0x78,
+	0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46,
+	0x6f, 0x72, 0x6d, 0x61, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x51,
+	0x0a, 0x13, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f, 0x61, 0x62, 0x69, 0x5f, 0x74, 0x61, 0x72, 0x67,
+	0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x6e,
+	0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4d, 0x75, 0x6c,
+	0x74, 0x69, 0x41, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x11,
+	0x6d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e,
+	0x67, 0x12, 0x53, 0x0a, 0x13, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72, 0x5f, 0x74,
+	0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22,
+	0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
+	0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69,
+	0x6e, 0x67, 0x52, 0x12, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72, 0x54, 0x61, 0x72,
+	0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x22, 0xae, 0x02, 0x0a, 0x0f, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
+	0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x57, 0x0a, 0x15, 0x73, 0x64,
+	0x6b, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
+	0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x6e, 0x64, 0x72,
+	0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x64, 0x6b, 0x56, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x13,
+	0x73, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74,
+	0x69, 0x6e, 0x67, 0x12, 0x60, 0x0a, 0x18, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x66, 0x65,
+	0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18,
+	0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
+	0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x61,
+	0x74, 0x75, 0x72, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x16, 0x64,
+	0x65, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x54, 0x61, 0x72, 0x67,
+	0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x60, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x63, 0x6f,
+	0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e,
+	0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69,
+	0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75,
+	0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52,
+	0x16, 0x75, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x54, 0x61,
+	0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x57, 0x0a, 0x16, 0x55, 0x73, 0x65, 0x72, 0x43,
+	0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e,
+	0x67, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x64,
+	0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x72,
+	0x79, 0x43, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64,
+	0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65,
+	0x22, 0x97, 0x02, 0x0a, 0x0d, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x65, 0x6e, 0x73, 0x69,
+	0x74, 0x79, 0x12, 0x51, 0x0a, 0x0d, 0x64, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x5f, 0x61, 0x6c,
+	0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x61, 0x6e, 0x64, 0x72,
+	0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65,
+	0x6e, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x2e, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79,
+	0x41, 0x6c, 0x69, 0x61, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x64, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79,
+	0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x21, 0x0a, 0x0b, 0x64, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79,
+	0x5f, 0x64, 0x70, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65,
+	0x6e, 0x73, 0x69, 0x74, 0x79, 0x44, 0x70, 0x69, 0x22, 0x7f, 0x0a, 0x0c, 0x44, 0x65, 0x6e, 0x73,
+	0x69, 0x74, 0x79, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x45, 0x4e, 0x53,
+	0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
+	0x00, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x44, 0x50, 0x49, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04,
+	0x4c, 0x44, 0x50, 0x49, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x44, 0x50, 0x49, 0x10, 0x03,
+	0x12, 0x09, 0x0a, 0x05, 0x54, 0x56, 0x44, 0x50, 0x49, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x48,
+	0x44, 0x50, 0x49, 0x10, 0x05, 0x12, 0x09, 0x0a, 0x05, 0x58, 0x48, 0x44, 0x50, 0x49, 0x10, 0x06,
+	0x12, 0x0a, 0x0a, 0x06, 0x58, 0x58, 0x48, 0x44, 0x50, 0x49, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07,
+	0x58, 0x58, 0x58, 0x48, 0x44, 0x50, 0x49, 0x10, 0x08, 0x42, 0x0f, 0x0a, 0x0d, 0x64, 0x65, 0x6e,
+	0x73, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x22, 0x0a, 0x0a, 0x49, 0x6e,
+	0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a,
+	0x0a, 0x0a, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2c, 0x0a, 0x03,
+	0x6d, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x6e, 0x64, 0x72,
+	0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32,
+	0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x6d, 0x69, 0x6e, 0x22, 0xb9, 0x01, 0x0a, 0x0b, 0x47,
+	0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x41, 0x70, 0x69, 0x12, 0x4e, 0x0a, 0x13, 0x6d, 0x69,
+	0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x5f, 0x67, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+	0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69,
+	0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x47, 0x6c, 0x56,
+	0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x4f, 0x70, 0x65,
+	0x6e, 0x47, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x69,
+	0x6e, 0x5f, 0x76, 0x75, 0x6c, 0x6b, 0x61, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x56, 0x75, 0x6c, 0x6b, 0x61, 0x6e, 0x56, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x56, 0x75, 0x6c, 0x6b,
+	0x61, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x0b, 0x0a, 0x09, 0x61, 0x70, 0x69,
+	0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x3b, 0x0a, 0x0d, 0x56, 0x75, 0x6c, 0x6b, 0x61, 0x6e,
+	0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a,
+	0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x69,
+	0x6e, 0x6f, 0x72, 0x22, 0x3b, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x6e, 0x47, 0x6c, 0x56, 0x65, 0x72,
+	0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69,
+	0x6e, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72,
+	0x22, 0xb7, 0x02, 0x0a, 0x18, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70,
+	0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x5c, 0x0a,
+	0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x46, 0x2e, 0x61,
+	0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x54, 0x65,
+	0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
+	0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f,
+	0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x41,
+	0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0xbc, 0x01, 0x0a, 0x1d,
+	0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
+	0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2a, 0x0a,
+	0x26, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x45, 0x58,
+	0x54, 0x55, 0x52, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x49, 0x4f, 0x4e,
+	0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x54, 0x43,
+	0x31, 0x5f, 0x52, 0x47, 0x42, 0x38, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x41, 0x4c, 0x45,
+	0x54, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x48, 0x52, 0x45, 0x45, 0x5f,
+	0x44, 0x43, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x54, 0x43, 0x10, 0x04, 0x12, 0x08, 0x0a,
+	0x04, 0x4c, 0x41, 0x54, 0x43, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x58, 0x54, 0x31, 0x10,
+	0x06, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x33, 0x54, 0x43, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x50,
+	0x56, 0x52, 0x54, 0x43, 0x10, 0x08, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x53, 0x54, 0x43, 0x10, 0x09,
+	0x12, 0x08, 0x0a, 0x04, 0x45, 0x54, 0x43, 0x32, 0x10, 0x0a, 0x22, 0xc0, 0x01, 0x0a, 0x03, 0x41,
+	0x62, 0x69, 0x12, 0x32, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x0e, 0x32, 0x1c, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64,
+	0x6c, 0x65, 0x2e, 0x41, 0x62, 0x69, 0x2e, 0x41, 0x62, 0x69, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52,
+	0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x08, 0x41, 0x62, 0x69, 0x41, 0x6c,
+	0x69, 0x61, 0x73, 0x12, 0x20, 0x0a, 0x1c, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+	0x45, 0x44, 0x5f, 0x43, 0x50, 0x55, 0x5f, 0x41, 0x52, 0x43, 0x48, 0x49, 0x54, 0x45, 0x43, 0x54,
+	0x55, 0x52, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x52, 0x4d, 0x45, 0x41, 0x42, 0x49,
+	0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x52, 0x4d, 0x45, 0x41, 0x42, 0x49, 0x5f, 0x56, 0x37,
+	0x41, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x52, 0x4d, 0x36, 0x34, 0x5f, 0x56, 0x38, 0x41,
+	0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x58, 0x38, 0x36, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x58,
+	0x38, 0x36, 0x5f, 0x36, 0x34, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x49, 0x50, 0x53, 0x10,
+	0x06, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x49, 0x50, 0x53, 0x36, 0x34, 0x10, 0x07, 0x22, 0x31, 0x0a,
+	0x08, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x62, 0x69, 0x12, 0x25, 0x0a, 0x03, 0x61, 0x62, 0x69,
+	0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x62, 0x69, 0x52, 0x03, 0x61, 0x62, 0x69,
+	0x22, 0x76, 0x0a, 0x09, 0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72, 0x12, 0x3e, 0x0a,
+	0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61,
+	0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x61,
+	0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72, 0x2e, 0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65,
+	0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x52, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0x29, 0x0a,
+	0x0e, 0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12,
+	0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x48, 0x57, 0x41,
+	0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x22, 0x5b, 0x0a, 0x0d, 0x44, 0x65, 0x76, 0x69,
+	0x63, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x66, 0x65, 0x61,
+	0x74, 0x75, 0x72, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0b, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f,
+	0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x56, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc3, 0x02, 0x0a, 0x18, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73,
+	0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69,
+	0x6e, 0x67, 0x12, 0x2e, 0x0a, 0x03, 0x61, 0x62, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x1c, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x2e, 0x41, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x03, 0x61,
+	0x62, 0x69, 0x12, 0x47, 0x0a, 0x0c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x5f, 0x61,
+	0x70, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+	0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69,
+	0x63, 0x73, 0x41, 0x70, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x0b,
+	0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x41, 0x70, 0x69, 0x12, 0x6f, 0x0a, 0x1a, 0x74,
+	0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
+	0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x31, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x2e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73,
+	0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69,
+	0x6e, 0x67, 0x52, 0x18, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72,
+	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x3d, 0x0a, 0x08,
+	0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
+	0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
+	0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e,
+	0x67, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0xa2, 0x02, 0x0a, 0x18,
+	0x4e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x54,
+	0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x25, 0x0a, 0x03, 0x61, 0x62, 0x69, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
+	0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x62, 0x69, 0x52, 0x03, 0x61, 0x62, 0x69, 0x12,
+	0x3e, 0x0a, 0x0c, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x5f, 0x61, 0x70, 0x69, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
+	0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x41,
+	0x70, 0x69, 0x52, 0x0b, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x41, 0x70, 0x69, 0x12,
+	0x66, 0x0a, 0x1a, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x72,
+	0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75,
+	0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70,
+	0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x18, 0x74,
+	0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f,
+	0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x73, 0x61, 0x6e, 0x69, 0x74,
+	0x69, 0x7a, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x6e, 0x64,
+	0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x61, 0x6e, 0x69,
+	0x74, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x09, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72,
+	0x22, 0x54, 0x0a, 0x12, 0x41, 0x70, 0x65, 0x78, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72,
+	0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x09, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x5f,
+	0x61, 0x62, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x6e, 0x64, 0x72,
+	0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69,
+	0x41, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x75,
+	0x6c, 0x74, 0x69, 0x41, 0x62, 0x69, 0x22, 0x72, 0x0a, 0x0c, 0x41, 0x62, 0x69, 0x54, 0x61, 0x72,
+	0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x29, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+	0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e,
+	0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x62, 0x69, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
+	0x65, 0x12, 0x37, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
+	0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69,
+	0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x41, 0x62, 0x69, 0x52, 0x0c, 0x61, 0x6c,
+	0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x22, 0x81, 0x01, 0x0a, 0x11, 0x4d,
+	0x75, 0x6c, 0x74, 0x69, 0x41, 0x62, 0x69, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67,
+	0x12, 0x2e, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+	0x18, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
+	0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x62, 0x69, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+	0x12, 0x3c, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73,
+	0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x41, 0x62, 0x69,
+	0x52, 0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x22, 0x90,
+	0x01, 0x0a, 0x16, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79,
+	0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+	0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+	0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e,
+	0x44, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x41,
+	0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x02,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62,
+	0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x44, 0x65, 0x6e, 0x73,
+	0x69, 0x74, 0x79, 0x52, 0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65,
+	0x73, 0x22, 0x4d, 0x0a, 0x11, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72,
+	0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+	0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x22, 0x0a, 0x0c,
+	0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
+	0x28, 0x09, 0x52, 0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73,
+	0x22, 0x8a, 0x01, 0x0a, 0x14, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x41, 0x70, 0x69,
+	0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x31, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+	0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f,
+	0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69,
+	0x63, 0x73, 0x41, 0x70, 0x69, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3f, 0x0a, 0x0c,
+	0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
+	0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e,
+	0x64, 0x6c, 0x65, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x41, 0x70, 0x69, 0x52,
+	0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x22, 0x87, 0x01,
+	0x0a, 0x13, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67,
+	0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62,
+	0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53, 0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+	0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72,
+	0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e,
+	0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x53,
+	0x64, 0x6b, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72,
+	0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x21, 0x54, 0x65, 0x78, 0x74,
+	0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f,
+	0x72, 0x6d, 0x61, 0x74, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x3e, 0x0a,
+	0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61,
+	0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x54, 0x65,
+	0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
+	0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4c, 0x0a,
+	0x0c, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x02, 0x20,
+	0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75,
+	0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6d, 0x70,
+	0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0c, 0x61,
+	0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x12, 0x53,
+	0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e,
+	0x67, 0x12, 0x2f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x19, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
+	0x65, 0x2e, 0x53, 0x61, 0x6e, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c,
+	0x75, 0x65, 0x22, 0x62, 0x0a, 0x16, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x61, 0x74,
+	0x75, 0x72, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x48, 0x0a, 0x10,
+	0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65,
+	0x61, 0x74, 0x75, 0x72, 0x65, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x46,
+	0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x42, 0x41, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x6e,
+	0x64, 0x72, 0x6f, 0x69, 0x64, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x5a, 0x2b, 0x61, 0x6e,
+	0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x63, 0x6d, 0x64, 0x2f,
+	0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x70, 0x6b, 0x73, 0x2f, 0x62, 0x75, 0x6e,
+	0x64, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x33,
 }
 
-func init() {
-	proto.RegisterFile("targeting.proto", fileDescriptor_df45b505afdf471e)
+var (
+	file_targeting_proto_rawDescOnce sync.Once
+	file_targeting_proto_rawDescData = file_targeting_proto_rawDesc
+)
+
+func file_targeting_proto_rawDescGZIP() []byte {
+	file_targeting_proto_rawDescOnce.Do(func() {
+		file_targeting_proto_rawDescData = protoimpl.X.CompressGZIP(file_targeting_proto_rawDescData)
+	})
+	return file_targeting_proto_rawDescData
 }
 
-var fileDescriptor_df45b505afdf471e = []byte{
-	// 1504 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5b, 0x6f, 0xe3, 0xc4,
-	0x17, 0xaf, 0x93, 0xa6, 0x4d, 0x4e, 0x92, 0xd6, 0x3b, 0xe9, 0xbf, 0xff, 0xb0, 0xec, 0x4a, 0x5b,
-	0xef, 0x85, 0xee, 0x0a, 0x05, 0xda, 0xae, 0xba, 0x15, 0x97, 0x22, 0xd7, 0x71, 0x9b, 0x48, 0x4d,
-	0x9a, 0x75, 0xdc, 0x6c, 0x59, 0x90, 0xbc, 0x4e, 0x3c, 0x0d, 0xa6, 0x89, 0x1d, 0x6c, 0xa7, 0xda,
-	0xe5, 0x05, 0x81, 0x90, 0x90, 0x78, 0xe2, 0x8d, 0x77, 0x3e, 0x00, 0x12, 0x4f, 0x08, 0x89, 0x07,
-	0x24, 0x3e, 0x0c, 0x7c, 0x0c, 0x34, 0xbe, 0x24, 0x9e, 0xc4, 0x4e, 0xb3, 0x2c, 0xf0, 0x50, 0xe5,
-	0xcc, 0xf1, 0x39, 0xbf, 0x73, 0x99, 0x73, 0x66, 0xce, 0x14, 0x56, 0x1d, 0xd5, 0xea, 0x62, 0x47,
-	0x37, 0xba, 0xa5, 0x81, 0x65, 0x3a, 0x26, 0x5a, 0x51, 0x0d, 0xcd, 0x32, 0x75, 0xad, 0xd4, 0x1e,
-	0x1a, 0x5a, 0x0f, 0x73, 0x7f, 0x26, 0x81, 0x6d, 0xa9, 0x96, 0xae, 0x1a, 0x8e, 0x1c, 0x88, 0xa2,
-	0x27, 0xf0, 0x3f, 0x5b, 0xbb, 0x50, 0x2e, 0xb1, 0x65, 0xeb, 0xa6, 0xa1, 0x8c, 0x30, 0x8a, 0xcc,
-	0x2d, 0x66, 0x33, 0xbb, 0x7d, 0xbb, 0x44, 0x83, 0x94, 0x9a, 0xda, 0x45, 0xcb, 0x93, 0x1d, 0x61,
-	0x48, 0x05, 0x7b, 0x9a, 0x89, 0x78, 0xc8, 0xab, 0x6d, 0x3d, 0x04, 0x98, 0x70, 0x01, 0x6f, 0x4c,
-	0x02, 0xf2, 0x6d, 0x7d, 0x8c, 0x94, 0x53, 0x43, 0x2b, 0xf4, 0x0c, 0x8a, 0x76, 0xc7, 0xc2, 0xd8,
-	0x50, 0x34, 0x6c, 0xd8, 0xba, 0xf3, 0x22, 0x84, 0x96, 0x74, 0xd1, 0xee, 0x4d, 0xb9, 0xe7, 0xca,
-	0x97, 0x3d, 0xf1, 0x31, 0xee, 0xba, 0x1d, 0xc9, 0x47, 0x8f, 0xa1, 0xd0, 0x1f, 0xf6, 0x1c, 0x5d,
-	0xa1, 0x5d, 0x5d, 0x74, 0xc1, 0x37, 0x26, 0xc1, 0x6b, 0x44, 0x94, 0xf2, 0xf7, 0x5a, 0x7f, 0x92,
-	0x85, 0xbe, 0x62, 0xe0, 0x8e, 0x83, 0x9f, 0x3b, 0x43, 0x0b, 0x2b, 0x1d, 0xb3, 0x3f, 0xb0, 0xb0,
-	0xed, 0x66, 0xf6, 0xdc, 0xb4, 0xfa, 0xaa, 0x13, 0x32, 0x92, 0x72, 0x8d, 0x6c, 0x4d, 0x1a, 0x91,
-	0x3d, 0x5d, 0x61, 0xac, 0x7a, 0xe8, 0x6a, 0x8e, 0x8d, 0x6e, 0x38, 0x57, 0x89, 0x70, 0x7f, 0xa4,
-	0x20, 0xc7, 0x0f, 0x2e, 0x66, 0xec, 0x06, 0xf3, 0xd2, 0xbb, 0xf1, 0x14, 0xd6, 0xbb, 0x96, 0x3a,
-	0xf8, 0x44, 0xef, 0xd8, 0x8a, 0x3a, 0x98, 0xde, 0xd9, 0x3b, 0x93, 0x58, 0x47, 0xbe, 0x34, 0x3f,
-	0x08, 0x61, 0xae, 0x75, 0x23, 0xb8, 0xa8, 0x01, 0xa8, 0xa7, 0x1a, 0xdd, 0xa1, 0xda, 0xc5, 0x53,
-	0x7b, 0x3c, 0xb5, 0x0d, 0xc7, 0xbe, 0x64, 0x68, 0x1b, 0x7a, 0x93, 0xac, 0x99, 0xb5, 0xb3, 0xf8,
-	0x8f, 0xd4, 0x4e, 0x6c, 0xe7, 0xa4, 0x5e, 0xb1, 0x73, 0xe6, 0xae, 0xa0, 0xa5, 0x7f, 0xaf, 0x82,
-	0xe2, 0x3a, 0x63, 0xf9, 0x15, 0x3a, 0xa3, 0x09, 0x05, 0x5b, 0x35, 0x74, 0x47, 0xff, 0x1c, 0x5b,
-	0x21, 0xc8, 0xb4, 0x0b, 0xc9, 0x4d, 0xa5, 0x2b, 0x10, 0x1d, 0x63, 0x22, 0x7b, 0x8a, 0xc7, 0xfd,
-	0x98, 0x80, 0xd5, 0x9a, 0xa9, 0x0d, 0x7b, 0xf8, 0x3f, 0x38, 0xd3, 0x9e, 0x41, 0x51, 0xc3, 0x97,
-	0x7a, 0x07, 0x2b, 0xe7, 0x58, 0x75, 0xf7, 0x27, 0xdc, 0x04, 0xc9, 0xa8, 0xa2, 0x2a, 0xbb, 0xf2,
-	0x87, 0x9e, 0x78, 0xa8, 0xa8, 0xb4, 0x48, 0x3e, 0xb1, 0x30, 0xb4, 0xb1, 0xa5, 0x74, 0xcc, 0xa1,
-	0xe1, 0x58, 0x3a, 0xb6, 0xaf, 0x3e, 0xf2, 0x4e, 0x6d, 0x6c, 0x09, 0x81, 0x78, 0xc8, 0xc2, 0x30,
-	0x92, 0xcf, 0x3d, 0x81, 0xf5, 0x68, 0x0d, 0x74, 0x1b, 0xf2, 0x9e, 0xd9, 0x17, 0x4a, 0xc7, 0xd4,
-	0xb0, 0x5d, 0x64, 0x6e, 0x25, 0x37, 0x33, 0x52, 0xce, 0x67, 0x0a, 0x84, 0x87, 0x8a, 0xb0, 0x8c,
-	0x9f, 0x77, 0x7a, 0x43, 0x0d, 0xbb, 0x6d, 0x9f, 0x96, 0x82, 0x25, 0xf7, 0x7d, 0x02, 0xf2, 0x54,
-	0x0b, 0xa1, 0xc7, 0x90, 0x0f, 0x9a, 0x4f, 0xed, 0xe9, 0xaa, 0xed, 0xe6, 0x7f, 0x65, 0xfb, 0xc1,
-	0xcc, 0xc6, 0x2b, 0xf9, 0xbf, 0x3c, 0xd1, 0xa8, 0x2c, 0x48, 0x39, 0x2d, 0xb4, 0x46, 0x1b, 0x90,
-	0x0d, 0x20, 0xb5, 0x81, 0xee, 0xba, 0x90, 0xaa, 0x2c, 0x48, 0xe0, 0x33, 0xcb, 0x03, 0x9d, 0xfb,
-	0x02, 0x72, 0x61, 0x08, 0xf4, 0x7f, 0x28, 0x94, 0xc5, 0x7a, 0xb3, 0x2a, 0x7f, 0xa8, 0x9c, 0xd6,
-	0x9b, 0x0d, 0x51, 0xa8, 0x1e, 0x56, 0xc5, 0x32, 0xbb, 0x80, 0x32, 0x90, 0xaa, 0x9f, 0x94, 0x1b,
-	0x55, 0x96, 0x41, 0x69, 0x58, 0x3c, 0x26, 0x54, 0x82, 0x50, 0x35, 0x42, 0x25, 0xc9, 0x67, 0xb9,
-	0x45, 0xc8, 0x45, 0xc2, 0xac, 0x10, 0x2a, 0x45, 0x98, 0x67, 0x2e, 0xb9, 0x84, 0x00, 0x96, 0xce,
-	0x3c, 0x7a, 0x19, 0x65, 0x61, 0xf9, 0xcc, 0x5f, 0xa4, 0x0f, 0x56, 0xc7, 0x61, 0x9b, 0x06, 0x36,
-	0xcf, 0x39, 0x0e, 0xa0, 0x6a, 0x38, 0x3b, 0xdb, 0x2d, 0xb5, 0x37, 0xc4, 0x68, 0x0d, 0x52, 0x97,
-	0x84, 0x70, 0xb3, 0x91, 0x92, 0xbc, 0x05, 0xf7, 0x0e, 0xc0, 0xb8, 0x0c, 0xd1, 0x9b, 0x90, 0xec,
-	0xeb, 0x86, 0x5f, 0xaf, 0xd7, 0x27, 0xf3, 0x35, 0x06, 0x93, 0x88, 0x18, 0xf7, 0x0b, 0x03, 0xd9,
-	0xd0, 0x61, 0x8b, 0xea, 0x50, 0xe8, 0xeb, 0x86, 0x62, 0x0e, 0xb0, 0xa1, 0x74, 0x7b, 0x41, 0x1f,
-	0xf8, 0x68, 0x37, 0x27, 0xd1, 0x4e, 0x06, 0xd8, 0x38, 0xea, 0xf9, 0x96, 0x2b, 0x0b, 0x12, 0xdb,
-	0xd7, 0x0d, 0x8a, 0x87, 0x6a, 0x80, 0x08, 0xde, 0xe5, 0xb0, 0x77, 0xa1, 0x1a, 0x23, 0xb8, 0x44,
-	0x34, 0x5c, 0xcb, 0x95, 0xa2, 0xe1, 0x28, 0xde, 0x41, 0x16, 0x32, 0xe4, 0xfe, 0xf0, 0x72, 0xf3,
-	0x2e, 0xe4, 0xa9, 0xaf, 0x24, 0x3d, 0x7d, 0xf5, 0x53, 0xd3, 0x0a, 0xd2, 0xe3, 0x2e, 0x5c, 0xae,
-	0x6e, 0x98, 0x96, 0xb7, 0xe3, 0x92, 0xb7, 0x20, 0xca, 0xb4, 0xa7, 0x2f, 0xa3, 0xfc, 0x73, 0x02,
-	0x8a, 0x71, 0x47, 0x25, 0xfa, 0x18, 0x52, 0xe1, 0x92, 0x3d, 0x9c, 0xf7, 0x8c, 0x8d, 0xfd, 0xe0,
-	0xd6, 0xa2, 0xe4, 0x81, 0x72, 0xbf, 0x32, 0x70, 0x73, 0xa6, 0x20, 0x7a, 0x00, 0xf7, 0x42, 0xc5,
-	0xaa, 0xc8, 0xe2, 0x99, 0x7c, 0x2a, 0x89, 0x8a, 0x70, 0x52, 0x6b, 0x48, 0x62, 0xb3, 0x59, 0x3d,
-	0xa9, 0x2b, 0x87, 0x27, 0x52, 0x8d, 0x97, 0xd9, 0x05, 0x94, 0x87, 0x8c, 0x28, 0x0b, 0x5b, 0x8a,
-	0x74, 0x74, 0xb0, 0xc7, 0x32, 0x28, 0x07, 0xe9, 0x06, 0x7f, 0x2c, 0xca, 0xb2, 0x58, 0x66, 0x13,
-	0x64, 0x25, 0x57, 0x24, 0x51, 0x54, 0xca, 0x02, 0x9b, 0x44, 0xcb, 0x90, 0xe4, 0x65, 0xc1, 0xab,
-	0xe8, 0x63, 0x42, 0xa5, 0x08, 0x55, 0x3e, 0x93, 0xb7, 0xd8, 0x25, 0x42, 0x35, 0x77, 0x64, 0x81,
-	0x5d, 0x26, 0x55, 0xde, 0x68, 0x49, 0xb2, 0xc0, 0xa6, 0x09, 0x93, 0x6f, 0xca, 0x02, 0x9b, 0x21,
-	0x94, 0x28, 0x0b, 0xdb, 0x2c, 0x70, 0xbf, 0x31, 0x90, 0xe4, 0xdb, 0x3a, 0xda, 0xa6, 0x93, 0x14,
-	0x35, 0x4c, 0x90, 0x3f, 0x2a, 0xf4, 0xaf, 0x19, 0x48, 0x07, 0x3c, 0x74, 0x0b, 0x6e, 0x84, 0xa3,
-	0x14, 0x1a, 0xa7, 0x0a, 0x2f, 0x09, 0x95, 0xaa, 0x2c, 0x0a, 0x24, 0x5c, 0x76, 0x81, 0x34, 0x16,
-	0x2f, 0xd5, 0x44, 0xfe, 0x80, 0x74, 0xe9, 0x2a, 0x64, 0xfd, 0x85, 0xd2, 0x7a, 0xc4, 0xb3, 0x09,
-	0x12, 0x39, 0x2f, 0xd5, 0x76, 0x1f, 0x2a, 0xad, 0x3d, 0xde, 0x8b, 0xee, 0x6c, 0x6f, 0x97, 0x5d,
-	0x74, 0x5b, 0x73, 0x6f, 0x57, 0xd9, 0x7d, 0xe8, 0xc5, 0x57, 0xab, 0x36, 0x9a, 0x5e, 0xc3, 0x12,
-	0x6a, 0xf7, 0x21, 0xbb, 0xcc, 0x6d, 0x41, 0x3a, 0xb8, 0xb3, 0xd0, 0x5d, 0x48, 0xaa, 0x6d, 0xdd,
-	0x3d, 0xed, 0xb2, 0xdb, 0x85, 0x88, 0x20, 0x24, 0xf2, 0x9d, 0xbb, 0x84, 0xcc, 0xe8, 0x4e, 0x42,
-	0xfb, 0x74, 0xe8, 0x9b, 0xb1, 0xb7, 0xd7, 0x98, 0xa2, 0xd2, 0x70, 0x1f, 0x56, 0xe8, 0x0f, 0xc4,
-	0xcf, 0xfa, 0x49, 0x5d, 0xf4, 0xf6, 0xb3, 0xf2, 0x84, 0x2f, 0x97, 0xc9, 0x46, 0xb3, 0x0c, 0xf7,
-	0x11, 0xe4, 0xa9, 0x4b, 0x04, 0x6d, 0x40, 0x2e, 0xb8, 0x7e, 0x0c, 0xb5, 0xef, 0x9d, 0x23, 0x19,
-	0x29, 0xeb, 0xf3, 0xea, 0x6a, 0x1f, 0xa3, 0x37, 0x60, 0x35, 0x10, 0x09, 0xb7, 0x6b, 0x4a, 0x5a,
-	0xf1, 0xd9, 0x7e, 0xc3, 0x70, 0xbf, 0x27, 0xa0, 0xc8, 0xdb, 0x36, 0x76, 0xec, 0xb2, 0x6e, 0xe1,
-	0x8e, 0x63, 0x5a, 0xa1, 0x09, 0xa7, 0x14, 0x24, 0xe6, 0xea, 0x51, 0x91, 0x08, 0xa2, 0x23, 0xc8,
-	0x85, 0x27, 0xc4, 0x97, 0x9a, 0x0b, 0xb3, 0xa1, 0xb9, 0x10, 0x99, 0x70, 0x3d, 0x7e, 0x00, 0xf2,
-	0xef, 0xc1, 0xbf, 0x31, 0xf6, 0x14, 0xe3, 0xc6, 0x1e, 0xf4, 0x3e, 0xa4, 0x83, 0x11, 0x32, 0x6e,
-	0xf8, 0x9f, 0x9e, 0x3a, 0x47, 0x2a, 0xdc, 0x0f, 0x09, 0x28, 0xd6, 0x55, 0x47, 0xbf, 0xc4, 0x11,
-	0x59, 0xbc, 0x1b, 0xce, 0x62, 0x6c, 0x79, 0xa1, 0xfd, 0xc8, 0xe4, 0xbd, 0x3e, 0x23, 0x79, 0x74,
-	0xce, 0xce, 0xe7, 0xc8, 0xd9, 0xe6, 0xbc, 0x39, 0x9b, 0x91, 0xaa, 0x47, 0x90, 0x19, 0x8d, 0x61,
-	0x7e, 0xae, 0x5e, 0x8b, 0xad, 0x7e, 0x69, 0x2c, 0xcb, 0xc9, 0x80, 0xf8, 0x01, 0x7e, 0x5e, 0xed,
-	0x53, 0x73, 0xfa, 0x3e, 0x64, 0x46, 0x73, 0xa6, 0x9f, 0xa3, 0x39, 0xa6, 0xcb, 0x74, 0x30, 0x5d,
-	0x72, 0x16, 0xe4, 0xa8, 0x21, 0xf3, 0xfe, 0xf8, 0x76, 0x8d, 0x6d, 0x67, 0x4f, 0x02, 0x3d, 0x82,
-	0x9c, 0xda, 0x73, 0xb0, 0x65, 0xb8, 0x3b, 0x67, 0xfb, 0x13, 0x5c, 0xa4, 0x06, 0x25, 0xc8, 0x7d,
-	0xc9, 0xc0, 0xb5, 0x29, 0x9f, 0x50, 0x89, 0xb6, 0x5c, 0x8c, 0x8b, 0x22, 0x30, 0xff, 0x5e, 0xa4,
-	0xf9, 0x78, 0x35, 0xda, 0x87, 0xef, 0x18, 0x58, 0x8f, 0x7e, 0xb0, 0xa0, 0x1d, 0xda, 0x91, 0x9b,
-	0x33, 0xc7, 0xad, 0xc0, 0x1b, 0x3e, 0xd2, 0x9b, 0x2b, 0x74, 0x69, 0x97, 0x6a, 0x70, 0x6d, 0xaa,
-	0x49, 0xc2, 0xd3, 0x0e, 0x19, 0x26, 0x7d, 0x6b, 0x5c, 0x84, 0xb5, 0xcc, 0x04, 0xdc, 0xb7, 0x0c,
-	0xac, 0x45, 0x1d, 0x15, 0x68, 0x8b, 0x8e, 0x6f, 0x66, 0x8b, 0xf8, 0xf6, 0x3e, 0x88, 0x8c, 0x6e,
-	0xa6, 0x26, 0xed, 0xcc, 0x37, 0x0c, 0x14, 0x22, 0x9e, 0x09, 0xe8, 0x6d, 0xda, 0x97, 0xeb, 0xf1,
-	0x4f, 0x8b, 0xc0, 0x95, 0xfd, 0x48, 0x57, 0x66, 0x29, 0xd2, 0x9e, 0xfc, 0xc4, 0xc0, 0xc6, 0x95,
-	0x47, 0x1d, 0xb9, 0x9f, 0xc2, 0x7e, 0xcd, 0xdf, 0xf8, 0xbe, 0x97, 0xc7, 0x91, 0x5e, 0xce, 0x0f,
-	0x43, 0xfb, 0x2c, 0x02, 0x9a, 0x7e, 0xce, 0xa1, 0xb7, 0x68, 0x1f, 0x67, 0x9c, 0x22, 0xfe, 0x8c,
-	0xdc, 0x86, 0xf5, 0xe8, 0xe7, 0x14, 0xaa, 0x00, 0x6b, 0xe1, 0xcf, 0x86, 0xba, 0x85, 0xb5, 0xe0,
-	0x69, 0x16, 0x37, 0xee, 0x52, 0x08, 0xd2, 0x6a, 0xa0, 0xe6, 0x33, 0x0e, 0x1e, 0x00, 0xea, 0x98,
-	0xfd, 0x09, 0xa5, 0xa7, 0x6b, 0xfe, 0x5a, 0xf1, 0xd6, 0x8a, 0xfb, 0x0f, 0xb6, 0xf6, 0x92, 0xfb,
-	0xb3, 0xf3, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, 0xe0, 0x85, 0xa8, 0x7a, 0x13, 0x00, 0x00,
+var file_targeting_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
+var file_targeting_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
+var file_targeting_proto_goTypes = []interface{}{
+	(ScreenDensity_DensityAlias)(0),                             // 0: android.bundle.ScreenDensity.DensityAlias
+	(TextureCompressionFormat_TextureCompressionFormatAlias)(0), // 1: android.bundle.TextureCompressionFormat.TextureCompressionFormatAlias
+	(Abi_AbiAlias)(0),                         // 2: android.bundle.Abi.AbiAlias
+	(Sanitizer_SanitizerAlias)(0),             // 3: android.bundle.Sanitizer.SanitizerAlias
+	(*VariantTargeting)(nil),                  // 4: android.bundle.VariantTargeting
+	(*ApkTargeting)(nil),                      // 5: android.bundle.ApkTargeting
+	(*ModuleTargeting)(nil),                   // 6: android.bundle.ModuleTargeting
+	(*UserCountriesTargeting)(nil),            // 7: android.bundle.UserCountriesTargeting
+	(*ScreenDensity)(nil),                     // 8: android.bundle.ScreenDensity
+	(*Int32Value)(nil),                        // 9: android.bundle.Int32Value
+	(*SdkVersion)(nil),                        // 10: android.bundle.SdkVersion
+	(*GraphicsApi)(nil),                       // 11: android.bundle.GraphicsApi
+	(*VulkanVersion)(nil),                     // 12: android.bundle.VulkanVersion
+	(*OpenGlVersion)(nil),                     // 13: android.bundle.OpenGlVersion
+	(*TextureCompressionFormat)(nil),          // 14: android.bundle.TextureCompressionFormat
+	(*Abi)(nil),                               // 15: android.bundle.Abi
+	(*MultiAbi)(nil),                          // 16: android.bundle.MultiAbi
+	(*Sanitizer)(nil),                         // 17: android.bundle.Sanitizer
+	(*DeviceFeature)(nil),                     // 18: android.bundle.DeviceFeature
+	(*AssetsDirectoryTargeting)(nil),          // 19: android.bundle.AssetsDirectoryTargeting
+	(*NativeDirectoryTargeting)(nil),          // 20: android.bundle.NativeDirectoryTargeting
+	(*ApexImageTargeting)(nil),                // 21: android.bundle.ApexImageTargeting
+	(*AbiTargeting)(nil),                      // 22: android.bundle.AbiTargeting
+	(*MultiAbiTargeting)(nil),                 // 23: android.bundle.MultiAbiTargeting
+	(*ScreenDensityTargeting)(nil),            // 24: android.bundle.ScreenDensityTargeting
+	(*LanguageTargeting)(nil),                 // 25: android.bundle.LanguageTargeting
+	(*GraphicsApiTargeting)(nil),              // 26: android.bundle.GraphicsApiTargeting
+	(*SdkVersionTargeting)(nil),               // 27: android.bundle.SdkVersionTargeting
+	(*TextureCompressionFormatTargeting)(nil), // 28: android.bundle.TextureCompressionFormatTargeting
+	(*SanitizerTargeting)(nil),                // 29: android.bundle.SanitizerTargeting
+	(*DeviceFeatureTargeting)(nil),            // 30: android.bundle.DeviceFeatureTargeting
+}
+var file_targeting_proto_depIdxs = []int32{
+	27, // 0: android.bundle.VariantTargeting.sdk_version_targeting:type_name -> android.bundle.SdkVersionTargeting
+	22, // 1: android.bundle.VariantTargeting.abi_targeting:type_name -> android.bundle.AbiTargeting
+	24, // 2: android.bundle.VariantTargeting.screen_density_targeting:type_name -> android.bundle.ScreenDensityTargeting
+	23, // 3: android.bundle.VariantTargeting.multi_abi_targeting:type_name -> android.bundle.MultiAbiTargeting
+	28, // 4: android.bundle.VariantTargeting.texture_compression_format_targeting:type_name -> android.bundle.TextureCompressionFormatTargeting
+	22, // 5: android.bundle.ApkTargeting.abi_targeting:type_name -> android.bundle.AbiTargeting
+	26, // 6: android.bundle.ApkTargeting.graphics_api_targeting:type_name -> android.bundle.GraphicsApiTargeting
+	25, // 7: android.bundle.ApkTargeting.language_targeting:type_name -> android.bundle.LanguageTargeting
+	24, // 8: android.bundle.ApkTargeting.screen_density_targeting:type_name -> android.bundle.ScreenDensityTargeting
+	27, // 9: android.bundle.ApkTargeting.sdk_version_targeting:type_name -> android.bundle.SdkVersionTargeting
+	28, // 10: android.bundle.ApkTargeting.texture_compression_format_targeting:type_name -> android.bundle.TextureCompressionFormatTargeting
+	23, // 11: android.bundle.ApkTargeting.multi_abi_targeting:type_name -> android.bundle.MultiAbiTargeting
+	29, // 12: android.bundle.ApkTargeting.sanitizer_targeting:type_name -> android.bundle.SanitizerTargeting
+	27, // 13: android.bundle.ModuleTargeting.sdk_version_targeting:type_name -> android.bundle.SdkVersionTargeting
+	30, // 14: android.bundle.ModuleTargeting.device_feature_targeting:type_name -> android.bundle.DeviceFeatureTargeting
+	7,  // 15: android.bundle.ModuleTargeting.user_countries_targeting:type_name -> android.bundle.UserCountriesTargeting
+	0,  // 16: android.bundle.ScreenDensity.density_alias:type_name -> android.bundle.ScreenDensity.DensityAlias
+	9,  // 17: android.bundle.SdkVersion.min:type_name -> android.bundle.Int32Value
+	13, // 18: android.bundle.GraphicsApi.min_open_gl_version:type_name -> android.bundle.OpenGlVersion
+	12, // 19: android.bundle.GraphicsApi.min_vulkan_version:type_name -> android.bundle.VulkanVersion
+	1,  // 20: android.bundle.TextureCompressionFormat.alias:type_name -> android.bundle.TextureCompressionFormat.TextureCompressionFormatAlias
+	2,  // 21: android.bundle.Abi.alias:type_name -> android.bundle.Abi.AbiAlias
+	15, // 22: android.bundle.MultiAbi.abi:type_name -> android.bundle.Abi
+	3,  // 23: android.bundle.Sanitizer.alias:type_name -> android.bundle.Sanitizer.SanitizerAlias
+	22, // 24: android.bundle.AssetsDirectoryTargeting.abi:type_name -> android.bundle.AbiTargeting
+	26, // 25: android.bundle.AssetsDirectoryTargeting.graphics_api:type_name -> android.bundle.GraphicsApiTargeting
+	28, // 26: android.bundle.AssetsDirectoryTargeting.texture_compression_format:type_name -> android.bundle.TextureCompressionFormatTargeting
+	25, // 27: android.bundle.AssetsDirectoryTargeting.language:type_name -> android.bundle.LanguageTargeting
+	15, // 28: android.bundle.NativeDirectoryTargeting.abi:type_name -> android.bundle.Abi
+	11, // 29: android.bundle.NativeDirectoryTargeting.graphics_api:type_name -> android.bundle.GraphicsApi
+	14, // 30: android.bundle.NativeDirectoryTargeting.texture_compression_format:type_name -> android.bundle.TextureCompressionFormat
+	17, // 31: android.bundle.NativeDirectoryTargeting.sanitizer:type_name -> android.bundle.Sanitizer
+	23, // 32: android.bundle.ApexImageTargeting.multi_abi:type_name -> android.bundle.MultiAbiTargeting
+	15, // 33: android.bundle.AbiTargeting.value:type_name -> android.bundle.Abi
+	15, // 34: android.bundle.AbiTargeting.alternatives:type_name -> android.bundle.Abi
+	16, // 35: android.bundle.MultiAbiTargeting.value:type_name -> android.bundle.MultiAbi
+	16, // 36: android.bundle.MultiAbiTargeting.alternatives:type_name -> android.bundle.MultiAbi
+	8,  // 37: android.bundle.ScreenDensityTargeting.value:type_name -> android.bundle.ScreenDensity
+	8,  // 38: android.bundle.ScreenDensityTargeting.alternatives:type_name -> android.bundle.ScreenDensity
+	11, // 39: android.bundle.GraphicsApiTargeting.value:type_name -> android.bundle.GraphicsApi
+	11, // 40: android.bundle.GraphicsApiTargeting.alternatives:type_name -> android.bundle.GraphicsApi
+	10, // 41: android.bundle.SdkVersionTargeting.value:type_name -> android.bundle.SdkVersion
+	10, // 42: android.bundle.SdkVersionTargeting.alternatives:type_name -> android.bundle.SdkVersion
+	14, // 43: android.bundle.TextureCompressionFormatTargeting.value:type_name -> android.bundle.TextureCompressionFormat
+	14, // 44: android.bundle.TextureCompressionFormatTargeting.alternatives:type_name -> android.bundle.TextureCompressionFormat
+	17, // 45: android.bundle.SanitizerTargeting.value:type_name -> android.bundle.Sanitizer
+	18, // 46: android.bundle.DeviceFeatureTargeting.required_feature:type_name -> android.bundle.DeviceFeature
+	47, // [47:47] is the sub-list for method output_type
+	47, // [47:47] is the sub-list for method input_type
+	47, // [47:47] is the sub-list for extension type_name
+	47, // [47:47] is the sub-list for extension extendee
+	0,  // [0:47] is the sub-list for field type_name
+}
+
+func init() { file_targeting_proto_init() }
+func file_targeting_proto_init() {
+	if File_targeting_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_targeting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*VariantTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ApkTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ModuleTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserCountriesTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ScreenDensity); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Int32Value); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SdkVersion); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GraphicsApi); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*VulkanVersion); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*OpenGlVersion); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TextureCompressionFormat); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Abi); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MultiAbi); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Sanitizer); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DeviceFeature); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AssetsDirectoryTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*NativeDirectoryTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ApexImageTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AbiTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MultiAbiTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ScreenDensityTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*LanguageTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GraphicsApiTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SdkVersionTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TextureCompressionFormatTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SanitizerTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_targeting_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DeviceFeatureTargeting); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	file_targeting_proto_msgTypes[4].OneofWrappers = []interface{}{
+		(*ScreenDensity_DensityAlias_)(nil),
+		(*ScreenDensity_DensityDpi)(nil),
+	}
+	file_targeting_proto_msgTypes[7].OneofWrappers = []interface{}{
+		(*GraphicsApi_MinOpenGlVersion)(nil),
+		(*GraphicsApi_MinVulkanVersion)(nil),
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_targeting_proto_rawDesc,
+			NumEnums:      4,
+			NumMessages:   27,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_targeting_proto_goTypes,
+		DependencyIndexes: file_targeting_proto_depIdxs,
+		EnumInfos:         file_targeting_proto_enumTypes,
+		MessageInfos:      file_targeting_proto_msgTypes,
+	}.Build()
+	File_targeting_proto = out.File
+	file_targeting_proto_rawDesc = nil
+	file_targeting_proto_goTypes = nil
+	file_targeting_proto_depIdxs = nil
 }
diff --git a/cmd/extract_apks/bundle_proto/targeting.proto b/cmd/extract_apks/bundle_proto/targeting.proto
index cdc910b..a33edc7 100644
--- a/cmd/extract_apks/bundle_proto/targeting.proto
+++ b/cmd/extract_apks/bundle_proto/targeting.proto
@@ -6,7 +6,7 @@
 
 package android.bundle;
 
-option go_package = "android_bundle_proto";
+option go_package = "android/soong/cmd/extract_apks/bundle_proto";
 option java_package = "com.android.bundle";
 
 // Targeting on the level of variants.
diff --git a/cmd/extract_apks/main.go b/cmd/extract_apks/main.go
index db54ffb..6e51a28 100644
--- a/cmd/extract_apks/main.go
+++ b/cmd/extract_apks/main.go
@@ -27,9 +27,9 @@
 	"sort"
 	"strings"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/proto"
 
-	"android/soong/cmd/extract_apks/bundle_proto"
+	android_bundle_proto "android/soong/cmd/extract_apks/bundle_proto"
 	"android/soong/third_party/zip"
 )
 
diff --git a/cmd/extract_apks/main_test.go b/cmd/extract_apks/main_test.go
index c3e6a2d..9fcf324 100644
--- a/cmd/extract_apks/main_test.go
+++ b/cmd/extract_apks/main_test.go
@@ -19,7 +19,7 @@
 	"reflect"
 	"testing"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/encoding/prototext"
 
 	bp "android/soong/cmd/extract_apks/bundle_proto"
 	"android/soong/third_party/zip"
@@ -253,7 +253,7 @@
 	}
 	for _, testCase := range testCases {
 		var toc bp.BuildApksResult
-		if err := proto.UnmarshalText(testCase.protoText, &toc); err != nil {
+		if err := prototext.Unmarshal([]byte(testCase.protoText), &toc); err != nil {
 			t.Fatal(err)
 		}
 		for _, config := range testCase.configs {
@@ -407,7 +407,7 @@
 	}
 	for _, testCase := range testCases {
 		var toc bp.BuildApksResult
-		if err := proto.UnmarshalText(testCase.protoText, &toc); err != nil {
+		if err := prototext.Unmarshal([]byte(testCase.protoText), &toc); err != nil {
 			t.Fatal(err)
 		}
 		for _, config := range testCase.configs {
diff --git a/cmd/sbox/Android.bp b/cmd/sbox/Android.bp
index b8d75ed..454cfd8 100644
--- a/cmd/sbox/Android.bp
+++ b/cmd/sbox/Android.bp
@@ -19,6 +19,7 @@
 blueprint_go_binary {
     name: "sbox",
     deps: [
+        "golang-protobuf-encoding-prototext",
         "sbox_proto",
         "soong-makedeps",
         "soong-response",
@@ -31,7 +32,10 @@
 bootstrap_go_package {
     name: "sbox_proto",
     pkgPath: "android/soong/cmd/sbox/sbox_proto",
-    deps: ["golang-protobuf-proto"],
+    deps: [
+        "golang-protobuf-reflect-protoreflect",
+        "golang-protobuf-runtime-protoimpl",
+    ],
     srcs: [
         "sbox_proto/sbox.pb.go",
     ],
diff --git a/cmd/sbox/sbox.go b/cmd/sbox/sbox.go
index f124e40..c7f3f6a 100644
--- a/cmd/sbox/sbox.go
+++ b/cmd/sbox/sbox.go
@@ -34,7 +34,7 @@
 	"android/soong/makedeps"
 	"android/soong/response"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/encoding/prototext"
 )
 
 var (
@@ -203,7 +203,7 @@
 
 	manifest := sbox_proto.Manifest{}
 
-	err = proto.UnmarshalText(string(manifestData), &manifest)
+	err = prototext.Unmarshal(manifestData, &manifest)
 	if err != nil {
 		return nil, fmt.Errorf("error parsing manifest %q: %w", file, err)
 	}
diff --git a/cmd/sbox/sbox_proto/sbox.pb.go b/cmd/sbox/sbox_proto/sbox.pb.go
index b996481..7c84f2c 100644
--- a/cmd/sbox/sbox_proto/sbox.pb.go
+++ b/cmd/sbox/sbox_proto/sbox.pb.go
@@ -1,78 +1,104 @@
+// Copyright 2020 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: sbox.proto
 
 package sbox_proto
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 // A set of commands to run in a sandbox.
 type Manifest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// A list of commands to run in the sandbox.
 	Commands []*Command `protobuf:"bytes,1,rep,name=commands" json:"commands,omitempty"`
 	// If set, GCC-style dependency files from any command that references __SBOX_DEPFILE__ will be
 	// merged into the given output file relative to the $PWD when sbox was started.
-	OutputDepfile        *string  `protobuf:"bytes,2,opt,name=output_depfile,json=outputDepfile" json:"output_depfile,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	OutputDepfile *string `protobuf:"bytes,2,opt,name=output_depfile,json=outputDepfile" json:"output_depfile,omitempty"`
 }
 
-func (m *Manifest) Reset()         { *m = Manifest{} }
-func (m *Manifest) String() string { return proto.CompactTextString(m) }
-func (*Manifest) ProtoMessage()    {}
+func (x *Manifest) Reset() {
+	*x = Manifest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_sbox_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Manifest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Manifest) ProtoMessage() {}
+
+func (x *Manifest) ProtoReflect() protoreflect.Message {
+	mi := &file_sbox_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Manifest.ProtoReflect.Descriptor instead.
 func (*Manifest) Descriptor() ([]byte, []int) {
-	return fileDescriptor_9d0425bf0de86ed1, []int{0}
+	return file_sbox_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *Manifest) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Manifest.Unmarshal(m, b)
-}
-func (m *Manifest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Manifest.Marshal(b, m, deterministic)
-}
-func (m *Manifest) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Manifest.Merge(m, src)
-}
-func (m *Manifest) XXX_Size() int {
-	return xxx_messageInfo_Manifest.Size(m)
-}
-func (m *Manifest) XXX_DiscardUnknown() {
-	xxx_messageInfo_Manifest.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Manifest proto.InternalMessageInfo
-
-func (m *Manifest) GetCommands() []*Command {
-	if m != nil {
-		return m.Commands
+func (x *Manifest) GetCommands() []*Command {
+	if x != nil {
+		return x.Commands
 	}
 	return nil
 }
 
-func (m *Manifest) GetOutputDepfile() string {
-	if m != nil && m.OutputDepfile != nil {
-		return *m.OutputDepfile
+func (x *Manifest) GetOutputDepfile() string {
+	if x != nil && x.OutputDepfile != nil {
+		return *x.OutputDepfile
 	}
 	return ""
 }
 
 // SandboxManifest describes a command to run in the sandbox.
 type Command struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// A list of copy rules to run before the sandboxed command.  The from field is relative to the
 	// $PWD when sbox was run, the to field is relative to the top of the temporary sandbox directory.
 	CopyBefore []*Copy `protobuf:"bytes,1,rep,name=copy_before,json=copyBefore" json:"copy_before,omitempty"`
@@ -89,75 +115,79 @@
 	InputHash *string `protobuf:"bytes,5,opt,name=input_hash,json=inputHash" json:"input_hash,omitempty"`
 	// A list of files that will be copied before the sandboxed command, and whose contents should be
 	// copied as if they were listed in copy_before.
-	RspFiles             []*RspFile `protobuf:"bytes,6,rep,name=rsp_files,json=rspFiles" json:"rsp_files,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
-	XXX_unrecognized     []byte     `json:"-"`
-	XXX_sizecache        int32      `json:"-"`
+	RspFiles []*RspFile `protobuf:"bytes,6,rep,name=rsp_files,json=rspFiles" json:"rsp_files,omitempty"`
 }
 
-func (m *Command) Reset()         { *m = Command{} }
-func (m *Command) String() string { return proto.CompactTextString(m) }
-func (*Command) ProtoMessage()    {}
+func (x *Command) Reset() {
+	*x = Command{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_sbox_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Command) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Command) ProtoMessage() {}
+
+func (x *Command) ProtoReflect() protoreflect.Message {
+	mi := &file_sbox_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Command.ProtoReflect.Descriptor instead.
 func (*Command) Descriptor() ([]byte, []int) {
-	return fileDescriptor_9d0425bf0de86ed1, []int{1}
+	return file_sbox_proto_rawDescGZIP(), []int{1}
 }
 
-func (m *Command) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Command.Unmarshal(m, b)
-}
-func (m *Command) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Command.Marshal(b, m, deterministic)
-}
-func (m *Command) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Command.Merge(m, src)
-}
-func (m *Command) XXX_Size() int {
-	return xxx_messageInfo_Command.Size(m)
-}
-func (m *Command) XXX_DiscardUnknown() {
-	xxx_messageInfo_Command.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Command proto.InternalMessageInfo
-
-func (m *Command) GetCopyBefore() []*Copy {
-	if m != nil {
-		return m.CopyBefore
+func (x *Command) GetCopyBefore() []*Copy {
+	if x != nil {
+		return x.CopyBefore
 	}
 	return nil
 }
 
-func (m *Command) GetChdir() bool {
-	if m != nil && m.Chdir != nil {
-		return *m.Chdir
+func (x *Command) GetChdir() bool {
+	if x != nil && x.Chdir != nil {
+		return *x.Chdir
 	}
 	return false
 }
 
-func (m *Command) GetCommand() string {
-	if m != nil && m.Command != nil {
-		return *m.Command
+func (x *Command) GetCommand() string {
+	if x != nil && x.Command != nil {
+		return *x.Command
 	}
 	return ""
 }
 
-func (m *Command) GetCopyAfter() []*Copy {
-	if m != nil {
-		return m.CopyAfter
+func (x *Command) GetCopyAfter() []*Copy {
+	if x != nil {
+		return x.CopyAfter
 	}
 	return nil
 }
 
-func (m *Command) GetInputHash() string {
-	if m != nil && m.InputHash != nil {
-		return *m.InputHash
+func (x *Command) GetInputHash() string {
+	if x != nil && x.InputHash != nil {
+		return *x.InputHash
 	}
 	return ""
 }
 
-func (m *Command) GetRspFiles() []*RspFile {
-	if m != nil {
-		return m.RspFiles
+func (x *Command) GetRspFiles() []*RspFile {
+	if x != nil {
+		return x.RspFiles
 	}
 	return nil
 }
@@ -166,193 +196,341 @@
 // are relative to is specific to the context the Copy is used in and will be different for
 // from and to.
 type Copy struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	From *string `protobuf:"bytes,1,req,name=from" json:"from,omitempty"`
 	To   *string `protobuf:"bytes,2,req,name=to" json:"to,omitempty"`
 	// If true, make the file executable after copying it.
-	Executable           *bool    `protobuf:"varint,3,opt,name=executable" json:"executable,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Executable *bool `protobuf:"varint,3,opt,name=executable" json:"executable,omitempty"`
 }
 
-func (m *Copy) Reset()         { *m = Copy{} }
-func (m *Copy) String() string { return proto.CompactTextString(m) }
-func (*Copy) ProtoMessage()    {}
+func (x *Copy) Reset() {
+	*x = Copy{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_sbox_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Copy) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Copy) ProtoMessage() {}
+
+func (x *Copy) ProtoReflect() protoreflect.Message {
+	mi := &file_sbox_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Copy.ProtoReflect.Descriptor instead.
 func (*Copy) Descriptor() ([]byte, []int) {
-	return fileDescriptor_9d0425bf0de86ed1, []int{2}
+	return file_sbox_proto_rawDescGZIP(), []int{2}
 }
 
-func (m *Copy) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Copy.Unmarshal(m, b)
-}
-func (m *Copy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Copy.Marshal(b, m, deterministic)
-}
-func (m *Copy) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Copy.Merge(m, src)
-}
-func (m *Copy) XXX_Size() int {
-	return xxx_messageInfo_Copy.Size(m)
-}
-func (m *Copy) XXX_DiscardUnknown() {
-	xxx_messageInfo_Copy.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Copy proto.InternalMessageInfo
-
-func (m *Copy) GetFrom() string {
-	if m != nil && m.From != nil {
-		return *m.From
+func (x *Copy) GetFrom() string {
+	if x != nil && x.From != nil {
+		return *x.From
 	}
 	return ""
 }
 
-func (m *Copy) GetTo() string {
-	if m != nil && m.To != nil {
-		return *m.To
+func (x *Copy) GetTo() string {
+	if x != nil && x.To != nil {
+		return *x.To
 	}
 	return ""
 }
 
-func (m *Copy) GetExecutable() bool {
-	if m != nil && m.Executable != nil {
-		return *m.Executable
+func (x *Copy) GetExecutable() bool {
+	if x != nil && x.Executable != nil {
+		return *x.Executable
 	}
 	return false
 }
 
 // RspFile describes an rspfile that should be copied into the sandbox directory.
 type RspFile struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The path to the rsp file.
 	File *string `protobuf:"bytes,1,req,name=file" json:"file,omitempty"`
 	// A list of path mappings that should be applied to each file listed in the rsp file.
-	PathMappings         []*PathMapping `protobuf:"bytes,2,rep,name=path_mappings,json=pathMappings" json:"path_mappings,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
-	XXX_unrecognized     []byte         `json:"-"`
-	XXX_sizecache        int32          `json:"-"`
+	PathMappings []*PathMapping `protobuf:"bytes,2,rep,name=path_mappings,json=pathMappings" json:"path_mappings,omitempty"`
 }
 
-func (m *RspFile) Reset()         { *m = RspFile{} }
-func (m *RspFile) String() string { return proto.CompactTextString(m) }
-func (*RspFile) ProtoMessage()    {}
+func (x *RspFile) Reset() {
+	*x = RspFile{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_sbox_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *RspFile) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RspFile) ProtoMessage() {}
+
+func (x *RspFile) ProtoReflect() protoreflect.Message {
+	mi := &file_sbox_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use RspFile.ProtoReflect.Descriptor instead.
 func (*RspFile) Descriptor() ([]byte, []int) {
-	return fileDescriptor_9d0425bf0de86ed1, []int{3}
+	return file_sbox_proto_rawDescGZIP(), []int{3}
 }
 
-func (m *RspFile) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_RspFile.Unmarshal(m, b)
-}
-func (m *RspFile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_RspFile.Marshal(b, m, deterministic)
-}
-func (m *RspFile) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_RspFile.Merge(m, src)
-}
-func (m *RspFile) XXX_Size() int {
-	return xxx_messageInfo_RspFile.Size(m)
-}
-func (m *RspFile) XXX_DiscardUnknown() {
-	xxx_messageInfo_RspFile.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_RspFile proto.InternalMessageInfo
-
-func (m *RspFile) GetFile() string {
-	if m != nil && m.File != nil {
-		return *m.File
+func (x *RspFile) GetFile() string {
+	if x != nil && x.File != nil {
+		return *x.File
 	}
 	return ""
 }
 
-func (m *RspFile) GetPathMappings() []*PathMapping {
-	if m != nil {
-		return m.PathMappings
+func (x *RspFile) GetPathMappings() []*PathMapping {
+	if x != nil {
+		return x.PathMappings
 	}
 	return nil
 }
 
 // PathMapping describes a mapping from a path outside the sandbox to the path inside the sandbox.
 type PathMapping struct {
-	From                 *string  `protobuf:"bytes,1,req,name=from" json:"from,omitempty"`
-	To                   *string  `protobuf:"bytes,2,req,name=to" json:"to,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	From *string `protobuf:"bytes,1,req,name=from" json:"from,omitempty"`
+	To   *string `protobuf:"bytes,2,req,name=to" json:"to,omitempty"`
 }
 
-func (m *PathMapping) Reset()         { *m = PathMapping{} }
-func (m *PathMapping) String() string { return proto.CompactTextString(m) }
-func (*PathMapping) ProtoMessage()    {}
+func (x *PathMapping) Reset() {
+	*x = PathMapping{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_sbox_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *PathMapping) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PathMapping) ProtoMessage() {}
+
+func (x *PathMapping) ProtoReflect() protoreflect.Message {
+	mi := &file_sbox_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use PathMapping.ProtoReflect.Descriptor instead.
 func (*PathMapping) Descriptor() ([]byte, []int) {
-	return fileDescriptor_9d0425bf0de86ed1, []int{4}
+	return file_sbox_proto_rawDescGZIP(), []int{4}
 }
 
-func (m *PathMapping) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_PathMapping.Unmarshal(m, b)
-}
-func (m *PathMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_PathMapping.Marshal(b, m, deterministic)
-}
-func (m *PathMapping) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_PathMapping.Merge(m, src)
-}
-func (m *PathMapping) XXX_Size() int {
-	return xxx_messageInfo_PathMapping.Size(m)
-}
-func (m *PathMapping) XXX_DiscardUnknown() {
-	xxx_messageInfo_PathMapping.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PathMapping proto.InternalMessageInfo
-
-func (m *PathMapping) GetFrom() string {
-	if m != nil && m.From != nil {
-		return *m.From
+func (x *PathMapping) GetFrom() string {
+	if x != nil && x.From != nil {
+		return *x.From
 	}
 	return ""
 }
 
-func (m *PathMapping) GetTo() string {
-	if m != nil && m.To != nil {
-		return *m.To
+func (x *PathMapping) GetTo() string {
+	if x != nil && x.To != nil {
+		return *x.To
 	}
 	return ""
 }
 
-func init() {
-	proto.RegisterType((*Manifest)(nil), "sbox.Manifest")
-	proto.RegisterType((*Command)(nil), "sbox.Command")
-	proto.RegisterType((*Copy)(nil), "sbox.Copy")
-	proto.RegisterType((*RspFile)(nil), "sbox.RspFile")
-	proto.RegisterType((*PathMapping)(nil), "sbox.PathMapping")
+var File_sbox_proto protoreflect.FileDescriptor
+
+var file_sbox_proto_rawDesc = []byte{
+	0x0a, 0x0a, 0x73, 0x62, 0x6f, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x04, 0x73, 0x62,
+	0x6f, 0x78, 0x22, 0x5c, 0x0a, 0x08, 0x4d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x29,
+	0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x0d, 0x2e, 0x73, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52,
+	0x08, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x75, 0x74,
+	0x70, 0x75, 0x74, 0x5f, 0x64, 0x65, 0x70, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x0d, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x44, 0x65, 0x70, 0x66, 0x69, 0x6c, 0x65,
+	0x22, 0xdc, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x2b, 0x0a, 0x0b,
+	0x63, 0x6f, 0x70, 0x79, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x0a, 0x2e, 0x73, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x70, 0x79, 0x52, 0x0a, 0x63,
+	0x6f, 0x70, 0x79, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x64,
+	0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x68, 0x64, 0x69, 0x72, 0x12,
+	0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x02, 0x28, 0x09,
+	0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x29, 0x0a, 0x0a, 0x63, 0x6f, 0x70,
+	0x79, 0x5f, 0x61, 0x66, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e,
+	0x73, 0x62, 0x6f, 0x78, 0x2e, 0x43, 0x6f, 0x70, 0x79, 0x52, 0x09, 0x63, 0x6f, 0x70, 0x79, 0x41,
+	0x66, 0x74, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x68, 0x61,
+	0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x48,
+	0x61, 0x73, 0x68, 0x12, 0x2a, 0x0a, 0x09, 0x72, 0x73, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73,
+	0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x73, 0x62, 0x6f, 0x78, 0x2e, 0x52, 0x73,
+	0x70, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x08, 0x72, 0x73, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22,
+	0x4a, 0x0a, 0x04, 0x43, 0x6f, 0x70, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18,
+	0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74,
+	0x6f, 0x18, 0x02, 0x20, 0x02, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x65,
+	0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
+	0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x22, 0x55, 0x0a, 0x07, 0x52,
+	0x73, 0x70, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01,
+	0x20, 0x02, 0x28, 0x09, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x36, 0x0a, 0x0d, 0x70, 0x61,
+	0x74, 0x68, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x11, 0x2e, 0x73, 0x62, 0x6f, 0x78, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x70,
+	0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x70, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+	0x67, 0x73, 0x22, 0x31, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+	0x67, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52,
+	0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x02, 0x20, 0x02, 0x28,
+	0x09, 0x52, 0x02, 0x74, 0x6f, 0x42, 0x23, 0x5a, 0x21, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64,
+	0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x73, 0x62, 0x6f, 0x78, 0x2f,
+	0x73, 0x62, 0x6f, 0x78, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
 }
 
-func init() {
-	proto.RegisterFile("sbox.proto", fileDescriptor_9d0425bf0de86ed1)
+var (
+	file_sbox_proto_rawDescOnce sync.Once
+	file_sbox_proto_rawDescData = file_sbox_proto_rawDesc
+)
+
+func file_sbox_proto_rawDescGZIP() []byte {
+	file_sbox_proto_rawDescOnce.Do(func() {
+		file_sbox_proto_rawDescData = protoimpl.X.CompressGZIP(file_sbox_proto_rawDescData)
+	})
+	return file_sbox_proto_rawDescData
 }
 
-var fileDescriptor_9d0425bf0de86ed1 = []byte{
-	// 342 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x5f, 0x4b, 0xc3, 0x30,
-	0x14, 0xc5, 0x69, 0xd7, 0xb9, 0xf6, 0xee, 0x0f, 0x18, 0x7c, 0xc8, 0x8b, 0x32, 0x0a, 0xc2, 0xa6,
-	0x30, 0xd0, 0x07, 0xdf, 0x9d, 0x22, 0x22, 0x0c, 0x24, 0xe0, 0x8b, 0x08, 0x25, 0xeb, 0x52, 0x5b,
-	0x58, 0x9b, 0x90, 0x64, 0xb0, 0x7d, 0x57, 0x3f, 0x8c, 0xe4, 0xa6, 0xd3, 0x82, 0x2f, 0xbe, 0xdd,
-	0x7b, 0x0e, 0xf7, 0xdc, 0x5f, 0xc2, 0x05, 0x30, 0x6b, 0xb9, 0x5f, 0x28, 0x2d, 0xad, 0x24, 0x91,
-	0xab, 0xd3, 0x0f, 0x88, 0x57, 0xbc, 0xa9, 0x0a, 0x61, 0x2c, 0x99, 0x43, 0x9c, 0xcb, 0xba, 0xe6,
-	0xcd, 0xc6, 0xd0, 0x60, 0xda, 0x9b, 0x0d, 0x6f, 0xc7, 0x0b, 0x1c, 0x78, 0xf0, 0x2a, 0xfb, 0xb1,
-	0xc9, 0x25, 0x4c, 0xe4, 0xce, 0xaa, 0x9d, 0xcd, 0x36, 0x42, 0x15, 0xd5, 0x56, 0xd0, 0x70, 0x1a,
-	0xcc, 0x12, 0x36, 0xf6, 0xea, 0xa3, 0x17, 0xd3, 0xaf, 0x00, 0x06, 0xed, 0x30, 0xb9, 0x86, 0x61,
-	0x2e, 0xd5, 0x21, 0x5b, 0x8b, 0x42, 0x6a, 0xd1, 0x2e, 0x80, 0xe3, 0x02, 0x75, 0x60, 0xe0, 0xec,
-	0x25, 0xba, 0xe4, 0x0c, 0xfa, 0x79, 0xb9, 0xa9, 0x34, 0xc6, 0xc6, 0xcc, 0x37, 0x84, 0xc2, 0xa0,
-	0x25, 0xa0, 0xbd, 0x69, 0x38, 0x4b, 0xd8, 0xb1, 0x25, 0x73, 0xc0, 0xe9, 0x8c, 0x17, 0x56, 0x68,
-	0x1a, 0xfd, 0xc9, 0x4e, 0x9c, 0x7b, 0xef, 0x4c, 0x72, 0x0e, 0x50, 0x35, 0x8e, 0xbc, 0xe4, 0xa6,
-	0xa4, 0x7d, 0xc4, 0x4e, 0x50, 0x79, 0xe6, 0xa6, 0x24, 0x57, 0x90, 0x68, 0xa3, 0x32, 0x87, 0x6f,
-	0xe8, 0x49, 0xf7, 0x17, 0x98, 0x51, 0x4f, 0xd5, 0x56, 0xb0, 0x58, 0xfb, 0xc2, 0xa4, 0x2f, 0x10,
-	0xb9, 0x74, 0x42, 0x20, 0x2a, 0xb4, 0xac, 0x69, 0x80, 0x50, 0x58, 0x93, 0x09, 0x84, 0x56, 0xd2,
-	0x10, 0x95, 0xd0, 0x4a, 0x72, 0x01, 0x20, 0xf6, 0x22, 0xdf, 0x59, 0xbe, 0xde, 0x0a, 0xda, 0xc3,
-	0x67, 0x75, 0x94, 0xf4, 0x0d, 0x06, 0xed, 0x02, 0x8c, 0x73, 0x5f, 0x7a, 0x8c, 0x73, 0xda, 0x1d,
-	0x8c, 0x15, 0xb7, 0x65, 0x56, 0x73, 0xa5, 0xaa, 0xe6, 0xd3, 0xd0, 0x10, 0xd1, 0x4e, 0x3d, 0xda,
-	0x2b, 0xb7, 0xe5, 0xca, 0x3b, 0x6c, 0xa4, 0x7e, 0x1b, 0x93, 0xde, 0xc0, 0xb0, 0x63, 0xfe, 0x87,
-	0x74, 0x39, 0x7a, 0xc7, 0x33, 0xc9, 0xf0, 0x4c, 0xbe, 0x03, 0x00, 0x00, 0xff, 0xff, 0x83, 0x82,
-	0xb0, 0xc3, 0x33, 0x02, 0x00, 0x00,
+var file_sbox_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_sbox_proto_goTypes = []interface{}{
+	(*Manifest)(nil),    // 0: sbox.Manifest
+	(*Command)(nil),     // 1: sbox.Command
+	(*Copy)(nil),        // 2: sbox.Copy
+	(*RspFile)(nil),     // 3: sbox.RspFile
+	(*PathMapping)(nil), // 4: sbox.PathMapping
+}
+var file_sbox_proto_depIdxs = []int32{
+	1, // 0: sbox.Manifest.commands:type_name -> sbox.Command
+	2, // 1: sbox.Command.copy_before:type_name -> sbox.Copy
+	2, // 2: sbox.Command.copy_after:type_name -> sbox.Copy
+	3, // 3: sbox.Command.rsp_files:type_name -> sbox.RspFile
+	4, // 4: sbox.RspFile.path_mappings:type_name -> sbox.PathMapping
+	5, // [5:5] is the sub-list for method output_type
+	5, // [5:5] is the sub-list for method input_type
+	5, // [5:5] is the sub-list for extension type_name
+	5, // [5:5] is the sub-list for extension extendee
+	0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_sbox_proto_init() }
+func file_sbox_proto_init() {
+	if File_sbox_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_sbox_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Manifest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_sbox_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Command); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_sbox_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Copy); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_sbox_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RspFile); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_sbox_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*PathMapping); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_sbox_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   5,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_sbox_proto_goTypes,
+		DependencyIndexes: file_sbox_proto_depIdxs,
+		MessageInfos:      file_sbox_proto_msgTypes,
+	}.Build()
+	File_sbox_proto = out.File
+	file_sbox_proto_rawDesc = nil
+	file_sbox_proto_goTypes = nil
+	file_sbox_proto_depIdxs = nil
 }
diff --git a/cmd/sbox/sbox_proto/sbox.proto b/cmd/sbox/sbox_proto/sbox.proto
index bdf92c6..2f0dcf0 100644
--- a/cmd/sbox/sbox_proto/sbox.proto
+++ b/cmd/sbox/sbox_proto/sbox.proto
@@ -15,7 +15,7 @@
 syntax = "proto2";
 
 package sbox;
-option go_package = "sbox_proto";
+option go_package = "android/soong/cmd/sbox/sbox_proto";
 
 // A set of commands to run in a sandbox.
 message Manifest {
diff --git a/go.mod b/go.mod
index 7297dea..9a2ebcc 100644
--- a/go.mod
+++ b/go.mod
@@ -1,10 +1,10 @@
 module android/soong
 
-require github.com/golang/protobuf v0.0.0
+require google.golang.org/protobuf v0.0.0
 
 require github.com/google/blueprint v0.0.0
 
-replace github.com/golang/protobuf v0.0.0 => ../../external/golang-protobuf
+replace google.golang.org/protobuf v0.0.0 => ../../external/golang-protobuf
 
 replace github.com/google/blueprint v0.0.0 => ../blueprint
 
diff --git a/scripts/microfactory.bash b/scripts/microfactory.bash
index 4bb6058..5e702e0 100644
--- a/scripts/microfactory.bash
+++ b/scripts/microfactory.bash
@@ -59,7 +59,7 @@
     BUILDDIR=$(getoutdir) \
       SRCDIR=${TOP} \
       BLUEPRINTDIR=${TOP}/build/blueprint \
-      EXTRA_ARGS="-pkg-path android/soong=${TOP}/build/soong -pkg-path github.com/golang/protobuf=${TOP}/external/golang-protobuf" \
+      EXTRA_ARGS="-pkg-path android/soong=${TOP}/build/soong -pkg-path google.golang.org/protobuf=${TOP}/external/golang-protobuf" \
       build_go $@
 }
 
diff --git a/scripts/setup_go_workspace_for_soong.sh b/scripts/setup_go_workspace_for_soong.sh
index 479d09c..434d2fb 100755
--- a/scripts/setup_go_workspace_for_soong.sh
+++ b/scripts/setup_go_workspace_for_soong.sh
@@ -346,7 +346,7 @@
   "${ANDROID_PATH}/build/blueprint|${OUTPUT_PATH}/src/github.com/google/blueprint"
   "${ANDROID_PATH}/build/soong|${OUTPUT_PATH}/src/android/soong"
   "${ANDROID_PATH}/art/build|${OUTPUT_PATH}/src/android/soong/art"
-  "${ANDROID_PATH}/external/golang-protobuf|${OUTPUT_PATH}/src/github.com/golang/protobuf"
+  "${ANDROID_PATH}/external/golang-protobuf|${OUTPUT_PATH}/src/google.golang.org/protobuf"
   "${ANDROID_PATH}/external/llvm/soong|${OUTPUT_PATH}/src/android/soong/llvm"
   "${ANDROID_PATH}/external/clang/soong|${OUTPUT_PATH}/src/android/soong/clang"
   "${ANDROID_PATH}/external/robolectric-shadows/soong|${OUTPUT_PATH}/src/android/soong/robolectric"
diff --git a/tests/lib.sh b/tests/lib.sh
index f1e1efa..1d9b8d4 100644
--- a/tests/lib.sh
+++ b/tests/lib.sh
@@ -86,6 +86,7 @@
 
   symlink_directory prebuilts/go
   symlink_directory prebuilts/build-tools
+  symlink_directory external/go-cmp
   symlink_directory external/golang-protobuf
 
   touch "$MOCK_TOP/Android.bp"
diff --git a/ui/build/config.go b/ui/build/config.go
index cd6d549..918a956 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -25,7 +25,7 @@
 
 	"android/soong/shared"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/proto"
 
 	smpb "android/soong/ui/metrics/metrics_proto"
 )
diff --git a/ui/build/config_test.go b/ui/build/config_test.go
index 7d4c76b..1f2158b 100644
--- a/ui/build/config_test.go
+++ b/ui/build/config_test.go
@@ -29,7 +29,7 @@
 	smpb "android/soong/ui/metrics/metrics_proto"
 	"android/soong/ui/status"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/proto"
 )
 
 func testContext() Context {
diff --git a/ui/build/context.go b/ui/build/context.go
index 43e1e0f..f5e987e 100644
--- a/ui/build/context.go
+++ b/ui/build/context.go
@@ -20,7 +20,7 @@
 
 	"android/soong/ui/logger"
 	"android/soong/ui/metrics"
-	"android/soong/ui/metrics/metrics_proto"
+	soong_metrics_proto "android/soong/ui/metrics/metrics_proto"
 	"android/soong/ui/status"
 	"android/soong/ui/tracer"
 )
diff --git a/ui/build/soong.go b/ui/build/soong.go
index 3fe7b0a..190c955 100644
--- a/ui/build/soong.go
+++ b/ui/build/soong.go
@@ -20,18 +20,18 @@
 	"path/filepath"
 	"strconv"
 
-	"android/soong/shared"
-	"github.com/google/blueprint/deptools"
-
+	"android/soong/ui/metrics"
 	soong_metrics_proto "android/soong/ui/metrics/metrics_proto"
+	"android/soong/ui/status"
+
+	"android/soong/shared"
+
 	"github.com/google/blueprint"
 	"github.com/google/blueprint/bootstrap"
-
-	"github.com/golang/protobuf/proto"
+	"github.com/google/blueprint/deptools"
 	"github.com/google/blueprint/microfactory"
 
-	"android/soong/ui/metrics"
-	"android/soong/ui/status"
+	"google.golang.org/protobuf/proto"
 )
 
 const (
diff --git a/ui/build/upload.go b/ui/build/upload.go
index 55ca800..55ada33 100644
--- a/ui/build/upload.go
+++ b/ui/build/upload.go
@@ -24,7 +24,8 @@
 	"time"
 
 	"android/soong/ui/metrics"
-	"github.com/golang/protobuf/proto"
+
+	"google.golang.org/protobuf/proto"
 
 	upload_proto "android/soong/ui/metrics/upload_proto"
 )
diff --git a/ui/metrics/Android.bp b/ui/metrics/Android.bp
index c428ec4..1590ab0 100644
--- a/ui/metrics/Android.bp
+++ b/ui/metrics/Android.bp
@@ -37,7 +37,10 @@
 bootstrap_go_package {
     name: "soong-ui-metrics_proto",
     pkgPath: "android/soong/ui/metrics/metrics_proto",
-    deps: ["golang-protobuf-proto"],
+    deps: [
+        "golang-protobuf-reflect-protoreflect",
+        "golang-protobuf-runtime-protoimpl",
+    ],
     srcs: [
         "metrics_proto/metrics.pb.go",
     ],
@@ -46,7 +49,10 @@
 bootstrap_go_package {
     name: "soong-ui-metrics_upload_proto",
     pkgPath: "android/soong/ui/metrics/upload_proto",
-    deps: ["golang-protobuf-proto"],
+    deps: [
+        "golang-protobuf-reflect-protoreflect",
+        "golang-protobuf-runtime-protoimpl",
+    ],
     srcs: [
         "upload_proto/upload.pb.go",
     ],
diff --git a/ui/metrics/event.go b/ui/metrics/event.go
index 87c1b84..c3367e3 100644
--- a/ui/metrics/event.go
+++ b/ui/metrics/event.go
@@ -30,10 +30,10 @@
 	"syscall"
 	"time"
 
-	"android/soong/ui/metrics/metrics_proto"
+	soong_metrics_proto "android/soong/ui/metrics/metrics_proto"
 	"android/soong/ui/tracer"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/proto"
 )
 
 // _now wraps the time.Now() function. _now is declared for unit testing purpose.
diff --git a/ui/metrics/metrics.go b/ui/metrics/metrics.go
index efb572c..ccf9bd8 100644
--- a/ui/metrics/metrics.go
+++ b/ui/metrics/metrics.go
@@ -43,9 +43,9 @@
 	"strings"
 	"time"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/proto"
 
-	"android/soong/ui/metrics/metrics_proto"
+	soong_metrics_proto "android/soong/ui/metrics/metrics_proto"
 )
 
 const (
diff --git a/ui/metrics/metrics_proto/metrics.pb.go b/ui/metrics/metrics_proto/metrics.pb.go
index 1063337..697e954 100644
--- a/ui/metrics/metrics_proto/metrics.pb.go
+++ b/ui/metrics/metrics_proto/metrics.pb.go
@@ -1,24 +1,38 @@
+// Copyright 2018 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: metrics.proto
 
-package soong_metrics_proto
+package metrics_proto
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 type MetricsBase_BuildVariant int32
 
@@ -28,17 +42,19 @@
 	MetricsBase_ENG       MetricsBase_BuildVariant = 2
 )
 
-var MetricsBase_BuildVariant_name = map[int32]string{
-	0: "USER",
-	1: "USERDEBUG",
-	2: "ENG",
-}
-
-var MetricsBase_BuildVariant_value = map[string]int32{
-	"USER":      0,
-	"USERDEBUG": 1,
-	"ENG":       2,
-}
+// Enum value maps for MetricsBase_BuildVariant.
+var (
+	MetricsBase_BuildVariant_name = map[int32]string{
+		0: "USER",
+		1: "USERDEBUG",
+		2: "ENG",
+	}
+	MetricsBase_BuildVariant_value = map[string]int32{
+		"USER":      0,
+		"USERDEBUG": 1,
+		"ENG":       2,
+	}
+)
 
 func (x MetricsBase_BuildVariant) Enum() *MetricsBase_BuildVariant {
 	p := new(MetricsBase_BuildVariant)
@@ -47,20 +63,34 @@
 }
 
 func (x MetricsBase_BuildVariant) String() string {
-	return proto.EnumName(MetricsBase_BuildVariant_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
-func (x *MetricsBase_BuildVariant) UnmarshalJSON(data []byte) error {
-	value, err := proto.UnmarshalJSONEnum(MetricsBase_BuildVariant_value, data, "MetricsBase_BuildVariant")
+func (MetricsBase_BuildVariant) Descriptor() protoreflect.EnumDescriptor {
+	return file_metrics_proto_enumTypes[0].Descriptor()
+}
+
+func (MetricsBase_BuildVariant) Type() protoreflect.EnumType {
+	return &file_metrics_proto_enumTypes[0]
+}
+
+func (x MetricsBase_BuildVariant) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *MetricsBase_BuildVariant) UnmarshalJSON(b []byte) error {
+	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
 	if err != nil {
 		return err
 	}
-	*x = MetricsBase_BuildVariant(value)
+	*x = MetricsBase_BuildVariant(num)
 	return nil
 }
 
+// Deprecated: Use MetricsBase_BuildVariant.Descriptor instead.
 func (MetricsBase_BuildVariant) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{0, 0}
+	return file_metrics_proto_rawDescGZIP(), []int{0, 0}
 }
 
 type MetricsBase_Arch int32
@@ -73,21 +103,23 @@
 	MetricsBase_X86_64  MetricsBase_Arch = 4
 )
 
-var MetricsBase_Arch_name = map[int32]string{
-	0: "UNKNOWN",
-	1: "ARM",
-	2: "ARM64",
-	3: "X86",
-	4: "X86_64",
-}
-
-var MetricsBase_Arch_value = map[string]int32{
-	"UNKNOWN": 0,
-	"ARM":     1,
-	"ARM64":   2,
-	"X86":     3,
-	"X86_64":  4,
-}
+// Enum value maps for MetricsBase_Arch.
+var (
+	MetricsBase_Arch_name = map[int32]string{
+		0: "UNKNOWN",
+		1: "ARM",
+		2: "ARM64",
+		3: "X86",
+		4: "X86_64",
+	}
+	MetricsBase_Arch_value = map[string]int32{
+		"UNKNOWN": 0,
+		"ARM":     1,
+		"ARM64":   2,
+		"X86":     3,
+		"X86_64":  4,
+	}
+)
 
 func (x MetricsBase_Arch) Enum() *MetricsBase_Arch {
 	p := new(MetricsBase_Arch)
@@ -96,20 +128,34 @@
 }
 
 func (x MetricsBase_Arch) String() string {
-	return proto.EnumName(MetricsBase_Arch_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
-func (x *MetricsBase_Arch) UnmarshalJSON(data []byte) error {
-	value, err := proto.UnmarshalJSONEnum(MetricsBase_Arch_value, data, "MetricsBase_Arch")
+func (MetricsBase_Arch) Descriptor() protoreflect.EnumDescriptor {
+	return file_metrics_proto_enumTypes[1].Descriptor()
+}
+
+func (MetricsBase_Arch) Type() protoreflect.EnumType {
+	return &file_metrics_proto_enumTypes[1]
+}
+
+func (x MetricsBase_Arch) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *MetricsBase_Arch) UnmarshalJSON(b []byte) error {
+	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
 	if err != nil {
 		return err
 	}
-	*x = MetricsBase_Arch(value)
+	*x = MetricsBase_Arch(num)
 	return nil
 }
 
+// Deprecated: Use MetricsBase_Arch.Descriptor instead.
 func (MetricsBase_Arch) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{0, 1}
+	return file_metrics_proto_rawDescGZIP(), []int{0, 1}
 }
 
 type ModuleTypeInfo_BuildSystem int32
@@ -120,17 +166,19 @@
 	ModuleTypeInfo_MAKE    ModuleTypeInfo_BuildSystem = 2
 )
 
-var ModuleTypeInfo_BuildSystem_name = map[int32]string{
-	0: "UNKNOWN",
-	1: "SOONG",
-	2: "MAKE",
-}
-
-var ModuleTypeInfo_BuildSystem_value = map[string]int32{
-	"UNKNOWN": 0,
-	"SOONG":   1,
-	"MAKE":    2,
-}
+// Enum value maps for ModuleTypeInfo_BuildSystem.
+var (
+	ModuleTypeInfo_BuildSystem_name = map[int32]string{
+		0: "UNKNOWN",
+		1: "SOONG",
+		2: "MAKE",
+	}
+	ModuleTypeInfo_BuildSystem_value = map[string]int32{
+		"UNKNOWN": 0,
+		"SOONG":   1,
+		"MAKE":    2,
+	}
+)
 
 func (x ModuleTypeInfo_BuildSystem) Enum() *ModuleTypeInfo_BuildSystem {
 	p := new(ModuleTypeInfo_BuildSystem)
@@ -139,23 +187,41 @@
 }
 
 func (x ModuleTypeInfo_BuildSystem) String() string {
-	return proto.EnumName(ModuleTypeInfo_BuildSystem_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
-func (x *ModuleTypeInfo_BuildSystem) UnmarshalJSON(data []byte) error {
-	value, err := proto.UnmarshalJSONEnum(ModuleTypeInfo_BuildSystem_value, data, "ModuleTypeInfo_BuildSystem")
+func (ModuleTypeInfo_BuildSystem) Descriptor() protoreflect.EnumDescriptor {
+	return file_metrics_proto_enumTypes[2].Descriptor()
+}
+
+func (ModuleTypeInfo_BuildSystem) Type() protoreflect.EnumType {
+	return &file_metrics_proto_enumTypes[2]
+}
+
+func (x ModuleTypeInfo_BuildSystem) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *ModuleTypeInfo_BuildSystem) UnmarshalJSON(b []byte) error {
+	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
 	if err != nil {
 		return err
 	}
-	*x = ModuleTypeInfo_BuildSystem(value)
+	*x = ModuleTypeInfo_BuildSystem(num)
 	return nil
 }
 
+// Deprecated: Use ModuleTypeInfo_BuildSystem.Descriptor instead.
 func (ModuleTypeInfo_BuildSystem) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{5, 0}
+	return file_metrics_proto_rawDescGZIP(), []int{5, 0}
 }
 
 type MetricsBase struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Timestamp generated when the build starts.
 	BuildDateTimestamp *int64 `protobuf:"varint,1,opt,name=build_date_timestamp,json=buildDateTimestamp" json:"build_date_timestamp,omitempty"`
 	// It is usually used to specify the branch name [and release candidate].
@@ -207,232 +273,243 @@
 	// The build command that the user entered to the build system.
 	BuildCommand *string `protobuf:"bytes,26,opt,name=build_command,json=buildCommand" json:"build_command,omitempty"`
 	// The metrics for calling Bazel.
-	BazelRuns            []*PerfInfo `protobuf:"bytes,27,rep,name=bazel_runs,json=bazelRuns" json:"bazel_runs,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
-	XXX_unrecognized     []byte      `json:"-"`
-	XXX_sizecache        int32       `json:"-"`
+	BazelRuns []*PerfInfo `protobuf:"bytes,27,rep,name=bazel_runs,json=bazelRuns" json:"bazel_runs,omitempty"`
 }
 
-func (m *MetricsBase) Reset()         { *m = MetricsBase{} }
-func (m *MetricsBase) String() string { return proto.CompactTextString(m) }
-func (*MetricsBase) ProtoMessage()    {}
+// Default values for MetricsBase fields.
+const (
+	Default_MetricsBase_TargetBuildVariant = MetricsBase_ENG
+	Default_MetricsBase_TargetArch         = MetricsBase_UNKNOWN
+	Default_MetricsBase_HostArch           = MetricsBase_UNKNOWN
+	Default_MetricsBase_Host_2NdArch       = MetricsBase_UNKNOWN
+)
+
+func (x *MetricsBase) Reset() {
+	*x = MetricsBase{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MetricsBase) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetricsBase) ProtoMessage() {}
+
+func (x *MetricsBase) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetricsBase.ProtoReflect.Descriptor instead.
 func (*MetricsBase) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{0}
+	return file_metrics_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *MetricsBase) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_MetricsBase.Unmarshal(m, b)
-}
-func (m *MetricsBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_MetricsBase.Marshal(b, m, deterministic)
-}
-func (m *MetricsBase) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_MetricsBase.Merge(m, src)
-}
-func (m *MetricsBase) XXX_Size() int {
-	return xxx_messageInfo_MetricsBase.Size(m)
-}
-func (m *MetricsBase) XXX_DiscardUnknown() {
-	xxx_messageInfo_MetricsBase.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_MetricsBase proto.InternalMessageInfo
-
-const Default_MetricsBase_TargetBuildVariant MetricsBase_BuildVariant = MetricsBase_ENG
-const Default_MetricsBase_TargetArch MetricsBase_Arch = MetricsBase_UNKNOWN
-const Default_MetricsBase_HostArch MetricsBase_Arch = MetricsBase_UNKNOWN
-const Default_MetricsBase_Host_2NdArch MetricsBase_Arch = MetricsBase_UNKNOWN
-
-func (m *MetricsBase) GetBuildDateTimestamp() int64 {
-	if m != nil && m.BuildDateTimestamp != nil {
-		return *m.BuildDateTimestamp
+func (x *MetricsBase) GetBuildDateTimestamp() int64 {
+	if x != nil && x.BuildDateTimestamp != nil {
+		return *x.BuildDateTimestamp
 	}
 	return 0
 }
 
-func (m *MetricsBase) GetBuildId() string {
-	if m != nil && m.BuildId != nil {
-		return *m.BuildId
+func (x *MetricsBase) GetBuildId() string {
+	if x != nil && x.BuildId != nil {
+		return *x.BuildId
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetPlatformVersionCodename() string {
-	if m != nil && m.PlatformVersionCodename != nil {
-		return *m.PlatformVersionCodename
+func (x *MetricsBase) GetPlatformVersionCodename() string {
+	if x != nil && x.PlatformVersionCodename != nil {
+		return *x.PlatformVersionCodename
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetTargetProduct() string {
-	if m != nil && m.TargetProduct != nil {
-		return *m.TargetProduct
+func (x *MetricsBase) GetTargetProduct() string {
+	if x != nil && x.TargetProduct != nil {
+		return *x.TargetProduct
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetTargetBuildVariant() MetricsBase_BuildVariant {
-	if m != nil && m.TargetBuildVariant != nil {
-		return *m.TargetBuildVariant
+func (x *MetricsBase) GetTargetBuildVariant() MetricsBase_BuildVariant {
+	if x != nil && x.TargetBuildVariant != nil {
+		return *x.TargetBuildVariant
 	}
 	return Default_MetricsBase_TargetBuildVariant
 }
 
-func (m *MetricsBase) GetTargetArch() MetricsBase_Arch {
-	if m != nil && m.TargetArch != nil {
-		return *m.TargetArch
+func (x *MetricsBase) GetTargetArch() MetricsBase_Arch {
+	if x != nil && x.TargetArch != nil {
+		return *x.TargetArch
 	}
 	return Default_MetricsBase_TargetArch
 }
 
-func (m *MetricsBase) GetTargetArchVariant() string {
-	if m != nil && m.TargetArchVariant != nil {
-		return *m.TargetArchVariant
+func (x *MetricsBase) GetTargetArchVariant() string {
+	if x != nil && x.TargetArchVariant != nil {
+		return *x.TargetArchVariant
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetTargetCpuVariant() string {
-	if m != nil && m.TargetCpuVariant != nil {
-		return *m.TargetCpuVariant
+func (x *MetricsBase) GetTargetCpuVariant() string {
+	if x != nil && x.TargetCpuVariant != nil {
+		return *x.TargetCpuVariant
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetHostArch() MetricsBase_Arch {
-	if m != nil && m.HostArch != nil {
-		return *m.HostArch
+func (x *MetricsBase) GetHostArch() MetricsBase_Arch {
+	if x != nil && x.HostArch != nil {
+		return *x.HostArch
 	}
 	return Default_MetricsBase_HostArch
 }
 
-func (m *MetricsBase) GetHost_2NdArch() MetricsBase_Arch {
-	if m != nil && m.Host_2NdArch != nil {
-		return *m.Host_2NdArch
+func (x *MetricsBase) GetHost_2NdArch() MetricsBase_Arch {
+	if x != nil && x.Host_2NdArch != nil {
+		return *x.Host_2NdArch
 	}
 	return Default_MetricsBase_Host_2NdArch
 }
 
-func (m *MetricsBase) GetHostOs() string {
-	if m != nil && m.HostOs != nil {
-		return *m.HostOs
+func (x *MetricsBase) GetHostOs() string {
+	if x != nil && x.HostOs != nil {
+		return *x.HostOs
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetHostOsExtra() string {
-	if m != nil && m.HostOsExtra != nil {
-		return *m.HostOsExtra
+func (x *MetricsBase) GetHostOsExtra() string {
+	if x != nil && x.HostOsExtra != nil {
+		return *x.HostOsExtra
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetHostCrossOs() string {
-	if m != nil && m.HostCrossOs != nil {
-		return *m.HostCrossOs
+func (x *MetricsBase) GetHostCrossOs() string {
+	if x != nil && x.HostCrossOs != nil {
+		return *x.HostCrossOs
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetHostCrossArch() string {
-	if m != nil && m.HostCrossArch != nil {
-		return *m.HostCrossArch
+func (x *MetricsBase) GetHostCrossArch() string {
+	if x != nil && x.HostCrossArch != nil {
+		return *x.HostCrossArch
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetHostCross_2NdArch() string {
-	if m != nil && m.HostCross_2NdArch != nil {
-		return *m.HostCross_2NdArch
+func (x *MetricsBase) GetHostCross_2NdArch() string {
+	if x != nil && x.HostCross_2NdArch != nil {
+		return *x.HostCross_2NdArch
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetOutDir() string {
-	if m != nil && m.OutDir != nil {
-		return *m.OutDir
+func (x *MetricsBase) GetOutDir() string {
+	if x != nil && x.OutDir != nil {
+		return *x.OutDir
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetSetupTools() []*PerfInfo {
-	if m != nil {
-		return m.SetupTools
+func (x *MetricsBase) GetSetupTools() []*PerfInfo {
+	if x != nil {
+		return x.SetupTools
 	}
 	return nil
 }
 
-func (m *MetricsBase) GetKatiRuns() []*PerfInfo {
-	if m != nil {
-		return m.KatiRuns
+func (x *MetricsBase) GetKatiRuns() []*PerfInfo {
+	if x != nil {
+		return x.KatiRuns
 	}
 	return nil
 }
 
-func (m *MetricsBase) GetSoongRuns() []*PerfInfo {
-	if m != nil {
-		return m.SoongRuns
+func (x *MetricsBase) GetSoongRuns() []*PerfInfo {
+	if x != nil {
+		return x.SoongRuns
 	}
 	return nil
 }
 
-func (m *MetricsBase) GetNinjaRuns() []*PerfInfo {
-	if m != nil {
-		return m.NinjaRuns
+func (x *MetricsBase) GetNinjaRuns() []*PerfInfo {
+	if x != nil {
+		return x.NinjaRuns
 	}
 	return nil
 }
 
-func (m *MetricsBase) GetTotal() *PerfInfo {
-	if m != nil {
-		return m.Total
+func (x *MetricsBase) GetTotal() *PerfInfo {
+	if x != nil {
+		return x.Total
 	}
 	return nil
 }
 
-func (m *MetricsBase) GetSoongBuildMetrics() *SoongBuildMetrics {
-	if m != nil {
-		return m.SoongBuildMetrics
+func (x *MetricsBase) GetSoongBuildMetrics() *SoongBuildMetrics {
+	if x != nil {
+		return x.SoongBuildMetrics
 	}
 	return nil
 }
 
-func (m *MetricsBase) GetBuildConfig() *BuildConfig {
-	if m != nil {
-		return m.BuildConfig
+func (x *MetricsBase) GetBuildConfig() *BuildConfig {
+	if x != nil {
+		return x.BuildConfig
 	}
 	return nil
 }
 
-func (m *MetricsBase) GetHostname() string {
-	if m != nil && m.Hostname != nil {
-		return *m.Hostname
+func (x *MetricsBase) GetHostname() string {
+	if x != nil && x.Hostname != nil {
+		return *x.Hostname
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetSystemResourceInfo() *SystemResourceInfo {
-	if m != nil {
-		return m.SystemResourceInfo
+func (x *MetricsBase) GetSystemResourceInfo() *SystemResourceInfo {
+	if x != nil {
+		return x.SystemResourceInfo
 	}
 	return nil
 }
 
-func (m *MetricsBase) GetBuildCommand() string {
-	if m != nil && m.BuildCommand != nil {
-		return *m.BuildCommand
+func (x *MetricsBase) GetBuildCommand() string {
+	if x != nil && x.BuildCommand != nil {
+		return *x.BuildCommand
 	}
 	return ""
 }
 
-func (m *MetricsBase) GetBazelRuns() []*PerfInfo {
-	if m != nil {
-		return m.BazelRuns
+func (x *MetricsBase) GetBazelRuns() []*PerfInfo {
+	if x != nil {
+		return x.BazelRuns
 	}
 	return nil
 }
 
 type BuildConfig struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	UseGoma      *bool `protobuf:"varint,1,opt,name=use_goma,json=useGoma" json:"use_goma,omitempty"`
 	UseRbe       *bool `protobuf:"varint,2,opt,name=use_rbe,json=useRbe" json:"use_rbe,omitempty"`
 	ForceUseGoma *bool `protobuf:"varint,3,opt,name=force_use_goma,json=forceUseGoma" json:"force_use_goma,omitempty"`
@@ -440,122 +517,138 @@
 	BazelAsNinja *bool `protobuf:"varint,4,opt,name=bazel_as_ninja,json=bazelAsNinja" json:"bazel_as_ninja,omitempty"`
 	// Whether build is occurring in a mixed build mode, where Bazel maintains the
 	// definition and build of some modules in cooperation with Soong.
-	BazelMixedBuild      *bool    `protobuf:"varint,5,opt,name=bazel_mixed_build,json=bazelMixedBuild" json:"bazel_mixed_build,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	BazelMixedBuild *bool `protobuf:"varint,5,opt,name=bazel_mixed_build,json=bazelMixedBuild" json:"bazel_mixed_build,omitempty"`
 }
 
-func (m *BuildConfig) Reset()         { *m = BuildConfig{} }
-func (m *BuildConfig) String() string { return proto.CompactTextString(m) }
-func (*BuildConfig) ProtoMessage()    {}
+func (x *BuildConfig) Reset() {
+	*x = BuildConfig{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BuildConfig) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BuildConfig) ProtoMessage() {}
+
+func (x *BuildConfig) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use BuildConfig.ProtoReflect.Descriptor instead.
 func (*BuildConfig) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{1}
+	return file_metrics_proto_rawDescGZIP(), []int{1}
 }
 
-func (m *BuildConfig) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_BuildConfig.Unmarshal(m, b)
-}
-func (m *BuildConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_BuildConfig.Marshal(b, m, deterministic)
-}
-func (m *BuildConfig) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BuildConfig.Merge(m, src)
-}
-func (m *BuildConfig) XXX_Size() int {
-	return xxx_messageInfo_BuildConfig.Size(m)
-}
-func (m *BuildConfig) XXX_DiscardUnknown() {
-	xxx_messageInfo_BuildConfig.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BuildConfig proto.InternalMessageInfo
-
-func (m *BuildConfig) GetUseGoma() bool {
-	if m != nil && m.UseGoma != nil {
-		return *m.UseGoma
+func (x *BuildConfig) GetUseGoma() bool {
+	if x != nil && x.UseGoma != nil {
+		return *x.UseGoma
 	}
 	return false
 }
 
-func (m *BuildConfig) GetUseRbe() bool {
-	if m != nil && m.UseRbe != nil {
-		return *m.UseRbe
+func (x *BuildConfig) GetUseRbe() bool {
+	if x != nil && x.UseRbe != nil {
+		return *x.UseRbe
 	}
 	return false
 }
 
-func (m *BuildConfig) GetForceUseGoma() bool {
-	if m != nil && m.ForceUseGoma != nil {
-		return *m.ForceUseGoma
+func (x *BuildConfig) GetForceUseGoma() bool {
+	if x != nil && x.ForceUseGoma != nil {
+		return *x.ForceUseGoma
 	}
 	return false
 }
 
-func (m *BuildConfig) GetBazelAsNinja() bool {
-	if m != nil && m.BazelAsNinja != nil {
-		return *m.BazelAsNinja
+func (x *BuildConfig) GetBazelAsNinja() bool {
+	if x != nil && x.BazelAsNinja != nil {
+		return *x.BazelAsNinja
 	}
 	return false
 }
 
-func (m *BuildConfig) GetBazelMixedBuild() bool {
-	if m != nil && m.BazelMixedBuild != nil {
-		return *m.BazelMixedBuild
+func (x *BuildConfig) GetBazelMixedBuild() bool {
+	if x != nil && x.BazelMixedBuild != nil {
+		return *x.BazelMixedBuild
 	}
 	return false
 }
 
 type SystemResourceInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The total physical memory in bytes.
 	TotalPhysicalMemory *uint64 `protobuf:"varint,1,opt,name=total_physical_memory,json=totalPhysicalMemory" json:"total_physical_memory,omitempty"`
 	// The total of available cores for building
-	AvailableCpus        *int32   `protobuf:"varint,2,opt,name=available_cpus,json=availableCpus" json:"available_cpus,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	AvailableCpus *int32 `protobuf:"varint,2,opt,name=available_cpus,json=availableCpus" json:"available_cpus,omitempty"`
 }
 
-func (m *SystemResourceInfo) Reset()         { *m = SystemResourceInfo{} }
-func (m *SystemResourceInfo) String() string { return proto.CompactTextString(m) }
-func (*SystemResourceInfo) ProtoMessage()    {}
+func (x *SystemResourceInfo) Reset() {
+	*x = SystemResourceInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SystemResourceInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SystemResourceInfo) ProtoMessage() {}
+
+func (x *SystemResourceInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SystemResourceInfo.ProtoReflect.Descriptor instead.
 func (*SystemResourceInfo) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{2}
+	return file_metrics_proto_rawDescGZIP(), []int{2}
 }
 
-func (m *SystemResourceInfo) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SystemResourceInfo.Unmarshal(m, b)
-}
-func (m *SystemResourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SystemResourceInfo.Marshal(b, m, deterministic)
-}
-func (m *SystemResourceInfo) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SystemResourceInfo.Merge(m, src)
-}
-func (m *SystemResourceInfo) XXX_Size() int {
-	return xxx_messageInfo_SystemResourceInfo.Size(m)
-}
-func (m *SystemResourceInfo) XXX_DiscardUnknown() {
-	xxx_messageInfo_SystemResourceInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SystemResourceInfo proto.InternalMessageInfo
-
-func (m *SystemResourceInfo) GetTotalPhysicalMemory() uint64 {
-	if m != nil && m.TotalPhysicalMemory != nil {
-		return *m.TotalPhysicalMemory
+func (x *SystemResourceInfo) GetTotalPhysicalMemory() uint64 {
+	if x != nil && x.TotalPhysicalMemory != nil {
+		return *x.TotalPhysicalMemory
 	}
 	return 0
 }
 
-func (m *SystemResourceInfo) GetAvailableCpus() int32 {
-	if m != nil && m.AvailableCpus != nil {
-		return *m.AvailableCpus
+func (x *SystemResourceInfo) GetAvailableCpus() int32 {
+	if x != nil && x.AvailableCpus != nil {
+		return *x.AvailableCpus
 	}
 	return 0
 }
 
 type PerfInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The description for the phase/action/part while the tool running.
 	Desc *string `protobuf:"bytes,1,opt,name=desc" json:"desc,omitempty"`
 	// The name for the running phase/action/part.
@@ -567,83 +660,93 @@
 	// The number of nanoseconds elapsed since start_time.
 	RealTime *uint64 `protobuf:"varint,4,opt,name=real_time,json=realTime" json:"real_time,omitempty"`
 	// The number of MB for memory use (deprecated as it is too generic).
-	MemoryUse *uint64 `protobuf:"varint,5,opt,name=memory_use,json=memoryUse" json:"memory_use,omitempty"` // Deprecated: Do not use.
+	//
+	// Deprecated: Do not use.
+	MemoryUse *uint64 `protobuf:"varint,5,opt,name=memory_use,json=memoryUse" json:"memory_use,omitempty"`
 	// The resource information of each executed process.
 	ProcessesResourceInfo []*ProcessResourceInfo `protobuf:"bytes,6,rep,name=processes_resource_info,json=processesResourceInfo" json:"processes_resource_info,omitempty"`
-	XXX_NoUnkeyedLiteral  struct{}               `json:"-"`
-	XXX_unrecognized      []byte                 `json:"-"`
-	XXX_sizecache         int32                  `json:"-"`
 }
 
-func (m *PerfInfo) Reset()         { *m = PerfInfo{} }
-func (m *PerfInfo) String() string { return proto.CompactTextString(m) }
-func (*PerfInfo) ProtoMessage()    {}
+func (x *PerfInfo) Reset() {
+	*x = PerfInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *PerfInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PerfInfo) ProtoMessage() {}
+
+func (x *PerfInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use PerfInfo.ProtoReflect.Descriptor instead.
 func (*PerfInfo) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{3}
+	return file_metrics_proto_rawDescGZIP(), []int{3}
 }
 
-func (m *PerfInfo) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_PerfInfo.Unmarshal(m, b)
-}
-func (m *PerfInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_PerfInfo.Marshal(b, m, deterministic)
-}
-func (m *PerfInfo) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_PerfInfo.Merge(m, src)
-}
-func (m *PerfInfo) XXX_Size() int {
-	return xxx_messageInfo_PerfInfo.Size(m)
-}
-func (m *PerfInfo) XXX_DiscardUnknown() {
-	xxx_messageInfo_PerfInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PerfInfo proto.InternalMessageInfo
-
-func (m *PerfInfo) GetDesc() string {
-	if m != nil && m.Desc != nil {
-		return *m.Desc
+func (x *PerfInfo) GetDesc() string {
+	if x != nil && x.Desc != nil {
+		return *x.Desc
 	}
 	return ""
 }
 
-func (m *PerfInfo) GetName() string {
-	if m != nil && m.Name != nil {
-		return *m.Name
+func (x *PerfInfo) GetName() string {
+	if x != nil && x.Name != nil {
+		return *x.Name
 	}
 	return ""
 }
 
-func (m *PerfInfo) GetStartTime() uint64 {
-	if m != nil && m.StartTime != nil {
-		return *m.StartTime
+func (x *PerfInfo) GetStartTime() uint64 {
+	if x != nil && x.StartTime != nil {
+		return *x.StartTime
 	}
 	return 0
 }
 
-func (m *PerfInfo) GetRealTime() uint64 {
-	if m != nil && m.RealTime != nil {
-		return *m.RealTime
+func (x *PerfInfo) GetRealTime() uint64 {
+	if x != nil && x.RealTime != nil {
+		return *x.RealTime
 	}
 	return 0
 }
 
 // Deprecated: Do not use.
-func (m *PerfInfo) GetMemoryUse() uint64 {
-	if m != nil && m.MemoryUse != nil {
-		return *m.MemoryUse
+func (x *PerfInfo) GetMemoryUse() uint64 {
+	if x != nil && x.MemoryUse != nil {
+		return *x.MemoryUse
 	}
 	return 0
 }
 
-func (m *PerfInfo) GetProcessesResourceInfo() []*ProcessResourceInfo {
-	if m != nil {
-		return m.ProcessesResourceInfo
+func (x *PerfInfo) GetProcessesResourceInfo() []*ProcessResourceInfo {
+	if x != nil {
+		return x.ProcessesResourceInfo
 	}
 	return nil
 }
 
 type ProcessResourceInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The name of the process for identification.
 	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 	// The amount of time spent executing in user space in microseconds.
@@ -663,257 +766,292 @@
 	// The number of voluntary context switches
 	VoluntaryContextSwitches *uint64 `protobuf:"varint,9,opt,name=voluntary_context_switches,json=voluntaryContextSwitches" json:"voluntary_context_switches,omitempty"`
 	// The number of involuntary context switches
-	InvoluntaryContextSwitches *uint64  `protobuf:"varint,10,opt,name=involuntary_context_switches,json=involuntaryContextSwitches" json:"involuntary_context_switches,omitempty"`
-	XXX_NoUnkeyedLiteral       struct{} `json:"-"`
-	XXX_unrecognized           []byte   `json:"-"`
-	XXX_sizecache              int32    `json:"-"`
+	InvoluntaryContextSwitches *uint64 `protobuf:"varint,10,opt,name=involuntary_context_switches,json=involuntaryContextSwitches" json:"involuntary_context_switches,omitempty"`
 }
 
-func (m *ProcessResourceInfo) Reset()         { *m = ProcessResourceInfo{} }
-func (m *ProcessResourceInfo) String() string { return proto.CompactTextString(m) }
-func (*ProcessResourceInfo) ProtoMessage()    {}
+func (x *ProcessResourceInfo) Reset() {
+	*x = ProcessResourceInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ProcessResourceInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProcessResourceInfo) ProtoMessage() {}
+
+func (x *ProcessResourceInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProcessResourceInfo.ProtoReflect.Descriptor instead.
 func (*ProcessResourceInfo) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{4}
+	return file_metrics_proto_rawDescGZIP(), []int{4}
 }
 
-func (m *ProcessResourceInfo) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ProcessResourceInfo.Unmarshal(m, b)
-}
-func (m *ProcessResourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ProcessResourceInfo.Marshal(b, m, deterministic)
-}
-func (m *ProcessResourceInfo) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ProcessResourceInfo.Merge(m, src)
-}
-func (m *ProcessResourceInfo) XXX_Size() int {
-	return xxx_messageInfo_ProcessResourceInfo.Size(m)
-}
-func (m *ProcessResourceInfo) XXX_DiscardUnknown() {
-	xxx_messageInfo_ProcessResourceInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ProcessResourceInfo proto.InternalMessageInfo
-
-func (m *ProcessResourceInfo) GetName() string {
-	if m != nil && m.Name != nil {
-		return *m.Name
+func (x *ProcessResourceInfo) GetName() string {
+	if x != nil && x.Name != nil {
+		return *x.Name
 	}
 	return ""
 }
 
-func (m *ProcessResourceInfo) GetUserTimeMicros() uint64 {
-	if m != nil && m.UserTimeMicros != nil {
-		return *m.UserTimeMicros
+func (x *ProcessResourceInfo) GetUserTimeMicros() uint64 {
+	if x != nil && x.UserTimeMicros != nil {
+		return *x.UserTimeMicros
 	}
 	return 0
 }
 
-func (m *ProcessResourceInfo) GetSystemTimeMicros() uint64 {
-	if m != nil && m.SystemTimeMicros != nil {
-		return *m.SystemTimeMicros
+func (x *ProcessResourceInfo) GetSystemTimeMicros() uint64 {
+	if x != nil && x.SystemTimeMicros != nil {
+		return *x.SystemTimeMicros
 	}
 	return 0
 }
 
-func (m *ProcessResourceInfo) GetMaxRssKb() uint64 {
-	if m != nil && m.MaxRssKb != nil {
-		return *m.MaxRssKb
+func (x *ProcessResourceInfo) GetMaxRssKb() uint64 {
+	if x != nil && x.MaxRssKb != nil {
+		return *x.MaxRssKb
 	}
 	return 0
 }
 
-func (m *ProcessResourceInfo) GetMinorPageFaults() uint64 {
-	if m != nil && m.MinorPageFaults != nil {
-		return *m.MinorPageFaults
+func (x *ProcessResourceInfo) GetMinorPageFaults() uint64 {
+	if x != nil && x.MinorPageFaults != nil {
+		return *x.MinorPageFaults
 	}
 	return 0
 }
 
-func (m *ProcessResourceInfo) GetMajorPageFaults() uint64 {
-	if m != nil && m.MajorPageFaults != nil {
-		return *m.MajorPageFaults
+func (x *ProcessResourceInfo) GetMajorPageFaults() uint64 {
+	if x != nil && x.MajorPageFaults != nil {
+		return *x.MajorPageFaults
 	}
 	return 0
 }
 
-func (m *ProcessResourceInfo) GetIoInputKb() uint64 {
-	if m != nil && m.IoInputKb != nil {
-		return *m.IoInputKb
+func (x *ProcessResourceInfo) GetIoInputKb() uint64 {
+	if x != nil && x.IoInputKb != nil {
+		return *x.IoInputKb
 	}
 	return 0
 }
 
-func (m *ProcessResourceInfo) GetIoOutputKb() uint64 {
-	if m != nil && m.IoOutputKb != nil {
-		return *m.IoOutputKb
+func (x *ProcessResourceInfo) GetIoOutputKb() uint64 {
+	if x != nil && x.IoOutputKb != nil {
+		return *x.IoOutputKb
 	}
 	return 0
 }
 
-func (m *ProcessResourceInfo) GetVoluntaryContextSwitches() uint64 {
-	if m != nil && m.VoluntaryContextSwitches != nil {
-		return *m.VoluntaryContextSwitches
+func (x *ProcessResourceInfo) GetVoluntaryContextSwitches() uint64 {
+	if x != nil && x.VoluntaryContextSwitches != nil {
+		return *x.VoluntaryContextSwitches
 	}
 	return 0
 }
 
-func (m *ProcessResourceInfo) GetInvoluntaryContextSwitches() uint64 {
-	if m != nil && m.InvoluntaryContextSwitches != nil {
-		return *m.InvoluntaryContextSwitches
+func (x *ProcessResourceInfo) GetInvoluntaryContextSwitches() uint64 {
+	if x != nil && x.InvoluntaryContextSwitches != nil {
+		return *x.InvoluntaryContextSwitches
 	}
 	return 0
 }
 
 type ModuleTypeInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The build system, eg. Soong or Make.
 	BuildSystem *ModuleTypeInfo_BuildSystem `protobuf:"varint,1,opt,name=build_system,json=buildSystem,enum=soong_build_metrics.ModuleTypeInfo_BuildSystem,def=0" json:"build_system,omitempty"`
 	// The module type, eg. java_library, cc_binary, and etc.
 	ModuleType *string `protobuf:"bytes,2,opt,name=module_type,json=moduleType" json:"module_type,omitempty"`
 	// The number of logical modules.
-	NumOfModules         *uint32  `protobuf:"varint,3,opt,name=num_of_modules,json=numOfModules" json:"num_of_modules,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	NumOfModules *uint32 `protobuf:"varint,3,opt,name=num_of_modules,json=numOfModules" json:"num_of_modules,omitempty"`
 }
 
-func (m *ModuleTypeInfo) Reset()         { *m = ModuleTypeInfo{} }
-func (m *ModuleTypeInfo) String() string { return proto.CompactTextString(m) }
-func (*ModuleTypeInfo) ProtoMessage()    {}
+// Default values for ModuleTypeInfo fields.
+const (
+	Default_ModuleTypeInfo_BuildSystem = ModuleTypeInfo_UNKNOWN
+)
+
+func (x *ModuleTypeInfo) Reset() {
+	*x = ModuleTypeInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ModuleTypeInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModuleTypeInfo) ProtoMessage() {}
+
+func (x *ModuleTypeInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use ModuleTypeInfo.ProtoReflect.Descriptor instead.
 func (*ModuleTypeInfo) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{5}
+	return file_metrics_proto_rawDescGZIP(), []int{5}
 }
 
-func (m *ModuleTypeInfo) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_ModuleTypeInfo.Unmarshal(m, b)
-}
-func (m *ModuleTypeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_ModuleTypeInfo.Marshal(b, m, deterministic)
-}
-func (m *ModuleTypeInfo) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_ModuleTypeInfo.Merge(m, src)
-}
-func (m *ModuleTypeInfo) XXX_Size() int {
-	return xxx_messageInfo_ModuleTypeInfo.Size(m)
-}
-func (m *ModuleTypeInfo) XXX_DiscardUnknown() {
-	xxx_messageInfo_ModuleTypeInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_ModuleTypeInfo proto.InternalMessageInfo
-
-const Default_ModuleTypeInfo_BuildSystem ModuleTypeInfo_BuildSystem = ModuleTypeInfo_UNKNOWN
-
-func (m *ModuleTypeInfo) GetBuildSystem() ModuleTypeInfo_BuildSystem {
-	if m != nil && m.BuildSystem != nil {
-		return *m.BuildSystem
+func (x *ModuleTypeInfo) GetBuildSystem() ModuleTypeInfo_BuildSystem {
+	if x != nil && x.BuildSystem != nil {
+		return *x.BuildSystem
 	}
 	return Default_ModuleTypeInfo_BuildSystem
 }
 
-func (m *ModuleTypeInfo) GetModuleType() string {
-	if m != nil && m.ModuleType != nil {
-		return *m.ModuleType
+func (x *ModuleTypeInfo) GetModuleType() string {
+	if x != nil && x.ModuleType != nil {
+		return *x.ModuleType
 	}
 	return ""
 }
 
-func (m *ModuleTypeInfo) GetNumOfModules() uint32 {
-	if m != nil && m.NumOfModules != nil {
-		return *m.NumOfModules
+func (x *ModuleTypeInfo) GetNumOfModules() uint32 {
+	if x != nil && x.NumOfModules != nil {
+		return *x.NumOfModules
 	}
 	return 0
 }
 
 type CriticalUserJourneyMetrics struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The name of a critical user journey test.
 	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 	// The metrics produced when running the critical user journey test.
-	Metrics              *MetricsBase `protobuf:"bytes,2,opt,name=metrics" json:"metrics,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
-	XXX_unrecognized     []byte       `json:"-"`
-	XXX_sizecache        int32        `json:"-"`
+	Metrics *MetricsBase `protobuf:"bytes,2,opt,name=metrics" json:"metrics,omitempty"`
 }
 
-func (m *CriticalUserJourneyMetrics) Reset()         { *m = CriticalUserJourneyMetrics{} }
-func (m *CriticalUserJourneyMetrics) String() string { return proto.CompactTextString(m) }
-func (*CriticalUserJourneyMetrics) ProtoMessage()    {}
+func (x *CriticalUserJourneyMetrics) Reset() {
+	*x = CriticalUserJourneyMetrics{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CriticalUserJourneyMetrics) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriticalUserJourneyMetrics) ProtoMessage() {}
+
+func (x *CriticalUserJourneyMetrics) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriticalUserJourneyMetrics.ProtoReflect.Descriptor instead.
 func (*CriticalUserJourneyMetrics) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{6}
+	return file_metrics_proto_rawDescGZIP(), []int{6}
 }
 
-func (m *CriticalUserJourneyMetrics) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_CriticalUserJourneyMetrics.Unmarshal(m, b)
-}
-func (m *CriticalUserJourneyMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_CriticalUserJourneyMetrics.Marshal(b, m, deterministic)
-}
-func (m *CriticalUserJourneyMetrics) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_CriticalUserJourneyMetrics.Merge(m, src)
-}
-func (m *CriticalUserJourneyMetrics) XXX_Size() int {
-	return xxx_messageInfo_CriticalUserJourneyMetrics.Size(m)
-}
-func (m *CriticalUserJourneyMetrics) XXX_DiscardUnknown() {
-	xxx_messageInfo_CriticalUserJourneyMetrics.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CriticalUserJourneyMetrics proto.InternalMessageInfo
-
-func (m *CriticalUserJourneyMetrics) GetName() string {
-	if m != nil && m.Name != nil {
-		return *m.Name
+func (x *CriticalUserJourneyMetrics) GetName() string {
+	if x != nil && x.Name != nil {
+		return *x.Name
 	}
 	return ""
 }
 
-func (m *CriticalUserJourneyMetrics) GetMetrics() *MetricsBase {
-	if m != nil {
-		return m.Metrics
+func (x *CriticalUserJourneyMetrics) GetMetrics() *MetricsBase {
+	if x != nil {
+		return x.Metrics
 	}
 	return nil
 }
 
 type CriticalUserJourneysMetrics struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// A set of metrics from a run of the critical user journey tests.
-	Cujs                 []*CriticalUserJourneyMetrics `protobuf:"bytes,1,rep,name=cujs" json:"cujs,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}                      `json:"-"`
-	XXX_unrecognized     []byte                        `json:"-"`
-	XXX_sizecache        int32                         `json:"-"`
+	Cujs []*CriticalUserJourneyMetrics `protobuf:"bytes,1,rep,name=cujs" json:"cujs,omitempty"`
 }
 
-func (m *CriticalUserJourneysMetrics) Reset()         { *m = CriticalUserJourneysMetrics{} }
-func (m *CriticalUserJourneysMetrics) String() string { return proto.CompactTextString(m) }
-func (*CriticalUserJourneysMetrics) ProtoMessage()    {}
+func (x *CriticalUserJourneysMetrics) Reset() {
+	*x = CriticalUserJourneysMetrics{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CriticalUserJourneysMetrics) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CriticalUserJourneysMetrics) ProtoMessage() {}
+
+func (x *CriticalUserJourneysMetrics) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[7]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CriticalUserJourneysMetrics.ProtoReflect.Descriptor instead.
 func (*CriticalUserJourneysMetrics) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{7}
+	return file_metrics_proto_rawDescGZIP(), []int{7}
 }
 
-func (m *CriticalUserJourneysMetrics) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_CriticalUserJourneysMetrics.Unmarshal(m, b)
-}
-func (m *CriticalUserJourneysMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_CriticalUserJourneysMetrics.Marshal(b, m, deterministic)
-}
-func (m *CriticalUserJourneysMetrics) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_CriticalUserJourneysMetrics.Merge(m, src)
-}
-func (m *CriticalUserJourneysMetrics) XXX_Size() int {
-	return xxx_messageInfo_CriticalUserJourneysMetrics.Size(m)
-}
-func (m *CriticalUserJourneysMetrics) XXX_DiscardUnknown() {
-	xxx_messageInfo_CriticalUserJourneysMetrics.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_CriticalUserJourneysMetrics proto.InternalMessageInfo
-
-func (m *CriticalUserJourneysMetrics) GetCujs() []*CriticalUserJourneyMetrics {
-	if m != nil {
-		return m.Cujs
+func (x *CriticalUserJourneysMetrics) GetCujs() []*CriticalUserJourneyMetrics {
+	if x != nil {
+		return x.Cujs
 	}
 	return nil
 }
 
 type SoongBuildMetrics struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The number of modules handled by soong_build.
 	Modules *uint32 `protobuf:"varint,1,opt,name=modules" json:"modules,omitempty"`
 	// The total number of variants handled by soong_build.
@@ -923,180 +1061,475 @@
 	// The total size of allocations in soong_build in bytes.
 	TotalAllocSize *uint64 `protobuf:"varint,4,opt,name=total_alloc_size,json=totalAllocSize" json:"total_alloc_size,omitempty"`
 	// The approximate maximum size of the heap in soong_build in bytes.
-	MaxHeapSize          *uint64  `protobuf:"varint,5,opt,name=max_heap_size,json=maxHeapSize" json:"max_heap_size,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	MaxHeapSize *uint64 `protobuf:"varint,5,opt,name=max_heap_size,json=maxHeapSize" json:"max_heap_size,omitempty"`
 }
 
-func (m *SoongBuildMetrics) Reset()         { *m = SoongBuildMetrics{} }
-func (m *SoongBuildMetrics) String() string { return proto.CompactTextString(m) }
-func (*SoongBuildMetrics) ProtoMessage()    {}
+func (x *SoongBuildMetrics) Reset() {
+	*x = SoongBuildMetrics{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_metrics_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SoongBuildMetrics) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SoongBuildMetrics) ProtoMessage() {}
+
+func (x *SoongBuildMetrics) ProtoReflect() protoreflect.Message {
+	mi := &file_metrics_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use SoongBuildMetrics.ProtoReflect.Descriptor instead.
 func (*SoongBuildMetrics) Descriptor() ([]byte, []int) {
-	return fileDescriptor_6039342a2ba47b72, []int{8}
+	return file_metrics_proto_rawDescGZIP(), []int{8}
 }
 
-func (m *SoongBuildMetrics) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_SoongBuildMetrics.Unmarshal(m, b)
-}
-func (m *SoongBuildMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_SoongBuildMetrics.Marshal(b, m, deterministic)
-}
-func (m *SoongBuildMetrics) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_SoongBuildMetrics.Merge(m, src)
-}
-func (m *SoongBuildMetrics) XXX_Size() int {
-	return xxx_messageInfo_SoongBuildMetrics.Size(m)
-}
-func (m *SoongBuildMetrics) XXX_DiscardUnknown() {
-	xxx_messageInfo_SoongBuildMetrics.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SoongBuildMetrics proto.InternalMessageInfo
-
-func (m *SoongBuildMetrics) GetModules() uint32 {
-	if m != nil && m.Modules != nil {
-		return *m.Modules
+func (x *SoongBuildMetrics) GetModules() uint32 {
+	if x != nil && x.Modules != nil {
+		return *x.Modules
 	}
 	return 0
 }
 
-func (m *SoongBuildMetrics) GetVariants() uint32 {
-	if m != nil && m.Variants != nil {
-		return *m.Variants
+func (x *SoongBuildMetrics) GetVariants() uint32 {
+	if x != nil && x.Variants != nil {
+		return *x.Variants
 	}
 	return 0
 }
 
-func (m *SoongBuildMetrics) GetTotalAllocCount() uint64 {
-	if m != nil && m.TotalAllocCount != nil {
-		return *m.TotalAllocCount
+func (x *SoongBuildMetrics) GetTotalAllocCount() uint64 {
+	if x != nil && x.TotalAllocCount != nil {
+		return *x.TotalAllocCount
 	}
 	return 0
 }
 
-func (m *SoongBuildMetrics) GetTotalAllocSize() uint64 {
-	if m != nil && m.TotalAllocSize != nil {
-		return *m.TotalAllocSize
+func (x *SoongBuildMetrics) GetTotalAllocSize() uint64 {
+	if x != nil && x.TotalAllocSize != nil {
+		return *x.TotalAllocSize
 	}
 	return 0
 }
 
-func (m *SoongBuildMetrics) GetMaxHeapSize() uint64 {
-	if m != nil && m.MaxHeapSize != nil {
-		return *m.MaxHeapSize
+func (x *SoongBuildMetrics) GetMaxHeapSize() uint64 {
+	if x != nil && x.MaxHeapSize != nil {
+		return *x.MaxHeapSize
 	}
 	return 0
 }
 
-func init() {
-	proto.RegisterEnum("soong_build_metrics.MetricsBase_BuildVariant", MetricsBase_BuildVariant_name, MetricsBase_BuildVariant_value)
-	proto.RegisterEnum("soong_build_metrics.MetricsBase_Arch", MetricsBase_Arch_name, MetricsBase_Arch_value)
-	proto.RegisterEnum("soong_build_metrics.ModuleTypeInfo_BuildSystem", ModuleTypeInfo_BuildSystem_name, ModuleTypeInfo_BuildSystem_value)
-	proto.RegisterType((*MetricsBase)(nil), "soong_build_metrics.MetricsBase")
-	proto.RegisterType((*BuildConfig)(nil), "soong_build_metrics.BuildConfig")
-	proto.RegisterType((*SystemResourceInfo)(nil), "soong_build_metrics.SystemResourceInfo")
-	proto.RegisterType((*PerfInfo)(nil), "soong_build_metrics.PerfInfo")
-	proto.RegisterType((*ProcessResourceInfo)(nil), "soong_build_metrics.ProcessResourceInfo")
-	proto.RegisterType((*ModuleTypeInfo)(nil), "soong_build_metrics.ModuleTypeInfo")
-	proto.RegisterType((*CriticalUserJourneyMetrics)(nil), "soong_build_metrics.CriticalUserJourneyMetrics")
-	proto.RegisterType((*CriticalUserJourneysMetrics)(nil), "soong_build_metrics.CriticalUserJourneysMetrics")
-	proto.RegisterType((*SoongBuildMetrics)(nil), "soong_build_metrics.SoongBuildMetrics")
+var File_metrics_proto protoreflect.FileDescriptor
+
+var file_metrics_proto_rawDesc = []byte{
+	0x0a, 0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
+	0x13, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74,
+	0x72, 0x69, 0x63, 0x73, 0x22, 0xd8, 0x0c, 0x0a, 0x0b, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
+	0x42, 0x61, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x64, 0x61,
+	0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x12, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d,
+	0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f,
+	0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49,
+	0x64, 0x12, 0x3a, 0x0a, 0x19, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x76, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x56, 0x65,
+	0x72, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a,
+	0x0e, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x72, 0x6f,
+	0x64, 0x75, 0x63, 0x74, 0x12, 0x64, 0x0a, 0x14, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x62,
+	0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64,
+	0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
+	0x42, 0x61, 0x73, 0x65, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e,
+	0x74, 0x3a, 0x03, 0x45, 0x4e, 0x47, 0x52, 0x12, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x75,
+	0x69, 0x6c, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x0b, 0x74, 0x61,
+	0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32,
+	0x25, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65,
+	0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x61, 0x73,
+	0x65, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x3a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52,
+	0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x41, 0x72, 0x63, 0x68, 0x12, 0x2e, 0x0a, 0x13, 0x74,
+	0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61,
+	0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
+	0x41, 0x72, 0x63, 0x68, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x74,
+	0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x70, 0x75, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e,
+	0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x43,
+	0x70, 0x75, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x68, 0x6f, 0x73,
+	0x74, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x73,
+	0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69,
+	0x63, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x61, 0x73, 0x65, 0x2e, 0x41,
+	0x72, 0x63, 0x68, 0x3a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x08, 0x68, 0x6f,
+	0x73, 0x74, 0x41, 0x72, 0x63, 0x68, 0x12, 0x52, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x32,
+	0x6e, 0x64, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e,
+	0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72,
+	0x69, 0x63, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x61, 0x73, 0x65, 0x2e,
+	0x41, 0x72, 0x63, 0x68, 0x3a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x0b, 0x68,
+	0x6f, 0x73, 0x74, 0x32, 0x6e, 0x64, 0x41, 0x72, 0x63, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x6f,
+	0x73, 0x74, 0x5f, 0x6f, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x6f, 0x73,
+	0x74, 0x4f, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x6f, 0x73, 0x5f, 0x65,
+	0x78, 0x74, 0x72, 0x61, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x6f, 0x73, 0x74,
+	0x4f, 0x73, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x22, 0x0a, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x5f,
+	0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x6f, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+	0x68, 0x6f, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x4f, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x68,
+	0x6f, 0x73, 0x74, 0x5f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x18, 0x0e,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x41,
+	0x72, 0x63, 0x68, 0x12, 0x2d, 0x0a, 0x13, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x63, 0x72, 0x6f, 0x73,
+	0x73, 0x5f, 0x32, 0x6e, 0x64, 0x5f, 0x61, 0x72, 0x63, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x10, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x32, 0x6e, 0x64, 0x41, 0x72,
+	0x63, 0x68, 0x12, 0x17, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x10, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x44, 0x69, 0x72, 0x12, 0x3e, 0x0a, 0x0b, 0x73,
+	0x65, 0x74, 0x75, 0x70, 0x5f, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d,
+	0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x49, 0x6e, 0x66, 0x6f, 0x52,
+	0x0a, 0x73, 0x65, 0x74, 0x75, 0x70, 0x54, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x3a, 0x0a, 0x09, 0x6b,
+	0x61, 0x74, 0x69, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d,
+	0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74,
+	0x72, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x6b,
+	0x61, 0x74, 0x69, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x73, 0x6f, 0x6f, 0x6e, 0x67,
+	0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f,
+	0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63,
+	0x73, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x73, 0x6f, 0x6f, 0x6e,
+	0x67, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x0a, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x5f, 0x72,
+	0x75, 0x6e, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x6f, 0x6e,
+	0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e,
+	0x50, 0x65, 0x72, 0x66, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x52,
+	0x75, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x15, 0x20, 0x01,
+	0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64,
+	0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x66, 0x49, 0x6e, 0x66,
+	0x6f, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x56, 0x0a, 0x13, 0x73, 0x6f, 0x6f, 0x6e,
+	0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18,
+	0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75,
+	0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x6f, 0x6f, 0x6e,
+	0x67, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x11, 0x73,
+	0x6f, 0x6f, 0x6e, 0x67, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
+	0x12, 0x43, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+	0x18, 0x17, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62,
+	0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x42, 0x75, 0x69,
+	0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43,
+	0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d,
+	0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d,
+	0x65, 0x12, 0x59, 0x0a, 0x14, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x27, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65,
+	0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d,
+	0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x0d,
+	0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x1a, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
+	0x64, 0x12, 0x3c, 0x0a, 0x0a, 0x62, 0x61, 0x7a, 0x65, 0x6c, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18,
+	0x1b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75,
+	0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x65, 0x72, 0x66,
+	0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x62, 0x61, 0x7a, 0x65, 0x6c, 0x52, 0x75, 0x6e, 0x73, 0x22,
+	0x30, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x56, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x12,
+	0x08, 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x55, 0x53, 0x45,
+	0x52, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x45, 0x4e, 0x47, 0x10,
+	0x02, 0x22, 0x3c, 0x0a, 0x04, 0x41, 0x72, 0x63, 0x68, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b,
+	0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x52, 0x4d, 0x10, 0x01, 0x12,
+	0x09, 0x0a, 0x05, 0x41, 0x52, 0x4d, 0x36, 0x34, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x58, 0x38,
+	0x36, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x58, 0x38, 0x36, 0x5f, 0x36, 0x34, 0x10, 0x04, 0x22,
+	0xb9, 0x01, 0x0a, 0x0b, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
+	0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x5f, 0x67, 0x6f, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x08, 0x52, 0x07, 0x75, 0x73, 0x65, 0x47, 0x6f, 0x6d, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73,
+	0x65, 0x5f, 0x72, 0x62, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x73, 0x65,
+	0x52, 0x62, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x73, 0x65,
+	0x5f, 0x67, 0x6f, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x66, 0x6f, 0x72,
+	0x63, 0x65, 0x55, 0x73, 0x65, 0x47, 0x6f, 0x6d, 0x61, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x7a,
+	0x65, 0x6c, 0x5f, 0x61, 0x73, 0x5f, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x08, 0x52, 0x0c, 0x62, 0x61, 0x7a, 0x65, 0x6c, 0x41, 0x73, 0x4e, 0x69, 0x6e, 0x6a, 0x61, 0x12,
+	0x2a, 0x0a, 0x11, 0x62, 0x61, 0x7a, 0x65, 0x6c, 0x5f, 0x6d, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x62,
+	0x75, 0x69, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x62, 0x61, 0x7a, 0x65,
+	0x6c, 0x4d, 0x69, 0x78, 0x65, 0x64, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x22, 0x6f, 0x0a, 0x12, 0x53,
+	0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66,
+	0x6f, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x70, 0x68, 0x79, 0x73, 0x69,
+	0x63, 0x61, 0x6c, 0x5f, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
+	0x52, 0x13, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x4d,
+	0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
+	0x6c, 0x65, 0x5f, 0x63, 0x70, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x61,
+	0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x70, 0x75, 0x73, 0x22, 0xf3, 0x01, 0x0a,
+	0x08, 0x50, 0x65, 0x72, 0x66, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73,
+	0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x12, 0x12, 0x0a,
+	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+	0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65,
+	0x12, 0x1b, 0x0a, 0x09, 0x72, 0x65, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a,
+	0x0a, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x75, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x04, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x55, 0x73, 0x65,
+	0x12, 0x60, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x65,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x28, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f,
+	0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52,
+	0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x15, 0x70, 0x72, 0x6f,
+	0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e,
+	0x66, 0x6f, 0x22, 0xb9, 0x03, 0x0a, 0x13, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65,
+	0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+	0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28,
+	0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x63, 0x72,
+	0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69,
+	0x6d, 0x65, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x79, 0x73, 0x74,
+	0x65, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65,
+	0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x12, 0x1c, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x73,
+	0x73, 0x5f, 0x6b, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x52,
+	0x73, 0x73, 0x4b, 0x62, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x70, 0x61,
+	0x67, 0x65, 0x5f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52,
+	0x0f, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x50, 0x61, 0x67, 0x65, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x73,
+	0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66,
+	0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x6a,
+	0x6f, 0x72, 0x50, 0x61, 0x67, 0x65, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1e, 0x0a, 0x0b,
+	0x69, 0x6f, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x6b, 0x62, 0x18, 0x07, 0x20, 0x01, 0x28,
+	0x04, 0x52, 0x09, 0x69, 0x6f, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x4b, 0x62, 0x12, 0x20, 0x0a, 0x0c,
+	0x69, 0x6f, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6b, 0x62, 0x18, 0x08, 0x20, 0x01,
+	0x28, 0x04, 0x52, 0x0a, 0x69, 0x6f, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4b, 0x62, 0x12, 0x3c,
+	0x0a, 0x1a, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74,
+	0x65, 0x78, 0x74, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01,
+	0x28, 0x04, 0x52, 0x18, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e,
+	0x74, 0x65, 0x78, 0x74, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x1c,
+	0x69, 0x6e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74,
+	0x65, 0x78, 0x74, 0x5f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01,
+	0x28, 0x04, 0x52, 0x1a, 0x69, 0x6e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x43,
+	0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0xe5,
+	0x01, 0x0a, 0x0e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66,
+	0x6f, 0x12, 0x5b, 0x0a, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65,
+	0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f,
+	0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x4d, 0x6f,
+	0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x42, 0x75, 0x69,
+	0x6c, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57,
+	0x4e, 0x52, 0x0b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x1f,
+	0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
+	0x24, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x5f, 0x6f, 0x66, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
+	0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6e, 0x75, 0x6d, 0x4f, 0x66, 0x4d, 0x6f,
+	0x64, 0x75, 0x6c, 0x65, 0x73, 0x22, 0x2f, 0x0a, 0x0b, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x79,
+	0x73, 0x74, 0x65, 0x6d, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10,
+	0x00, 0x12, 0x09, 0x0a, 0x05, 0x53, 0x4f, 0x4f, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04,
+	0x4d, 0x41, 0x4b, 0x45, 0x10, 0x02, 0x22, 0x6c, 0x0a, 0x1a, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63,
+	0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x4d, 0x65, 0x74,
+	0x72, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3a, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72,
+	0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x6f, 0x6f, 0x6e,
+	0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e,
+	0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x42, 0x61, 0x73, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x74,
+	0x72, 0x69, 0x63, 0x73, 0x22, 0x62, 0x0a, 0x1b, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c,
+	0x55, 0x73, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x73, 0x4d, 0x65, 0x74, 0x72,
+	0x69, 0x63, 0x73, 0x12, 0x43, 0x0a, 0x04, 0x63, 0x75, 0x6a, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f,
+	0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x43, 0x72, 0x69, 0x74, 0x69, 0x63, 0x61, 0x6c,
+	0x55, 0x73, 0x65, 0x72, 0x4a, 0x6f, 0x75, 0x72, 0x6e, 0x65, 0x79, 0x4d, 0x65, 0x74, 0x72, 0x69,
+	0x63, 0x73, 0x52, 0x04, 0x63, 0x75, 0x6a, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x11, 0x53, 0x6f, 0x6f,
+	0x6e, 0x67, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x18,
+	0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
+	0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x72, 0x69,
+	0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x76, 0x61, 0x72, 0x69,
+	0x61, 0x6e, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x6c,
+	0x6c, 0x6f, 0x63, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
+	0x0f, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+	0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x5f,
+	0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61,
+	0x6c, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x6d, 0x61,
+	0x78, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+	0x04, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x48, 0x65, 0x61, 0x70, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x28,
+	0x5a, 0x26, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f,
+	0x75, 0x69, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
+	0x63, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
 }
 
-func init() {
-	proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72)
+var (
+	file_metrics_proto_rawDescOnce sync.Once
+	file_metrics_proto_rawDescData = file_metrics_proto_rawDesc
+)
+
+func file_metrics_proto_rawDescGZIP() []byte {
+	file_metrics_proto_rawDescOnce.Do(func() {
+		file_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_metrics_proto_rawDescData)
+	})
+	return file_metrics_proto_rawDescData
 }
 
-var fileDescriptor_6039342a2ba47b72 = []byte{
-	// 1423 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x52, 0x1b, 0xc7,
-	0x12, 0xb6, 0x40, 0x20, 0xa9, 0xf5, 0x83, 0x18, 0xe0, 0xb0, 0xc6, 0xf6, 0x39, 0x1c, 0xc5, 0x76,
-	0xa8, 0x54, 0x8c, 0x5d, 0xc4, 0x45, 0xb9, 0x28, 0x57, 0x2a, 0x20, 0x13, 0xc7, 0xa1, 0x84, 0xa8,
-	0xc1, 0x38, 0x4e, 0x72, 0x31, 0x19, 0xad, 0x46, 0xb0, 0xf6, 0xee, 0xce, 0xd6, 0xcc, 0x2c, 0x01,
-	0xbf, 0x99, 0xaf, 0xf3, 0x12, 0x79, 0x81, 0x3c, 0x41, 0x5e, 0x20, 0x35, 0x3d, 0xbb, 0x62, 0xc1,
-	0x8a, 0x4d, 0xf9, 0x4e, 0xfb, 0xf5, 0xf7, 0xf5, 0x76, 0xf7, 0xf4, 0x74, 0xaf, 0xa0, 0x19, 0x09,
-	0xa3, 0x02, 0x5f, 0xaf, 0x27, 0x4a, 0x1a, 0x49, 0x16, 0xb4, 0x94, 0xf1, 0x31, 0x1b, 0xa4, 0x41,
-	0x38, 0x64, 0x99, 0xa9, 0xf3, 0x67, 0x03, 0xea, 0x3d, 0xf7, 0x7b, 0x87, 0x6b, 0x41, 0x1e, 0xc1,
-	0xa2, 0x23, 0x0c, 0xb9, 0x11, 0xcc, 0x04, 0x91, 0xd0, 0x86, 0x47, 0x89, 0x57, 0x5a, 0x2d, 0xad,
-	0x4d, 0x53, 0x82, 0xb6, 0x67, 0xdc, 0x88, 0x97, 0xb9, 0x85, 0xdc, 0x84, 0xaa, 0x53, 0x04, 0x43,
-	0x6f, 0x6a, 0xb5, 0xb4, 0x56, 0xa3, 0x15, 0x7c, 0x7e, 0x31, 0x24, 0x5b, 0x70, 0x33, 0x09, 0xb9,
-	0x19, 0x49, 0x15, 0xb1, 0x53, 0xa1, 0x74, 0x20, 0x63, 0xe6, 0xcb, 0xa1, 0x88, 0x79, 0x24, 0xbc,
-	0x69, 0xe4, 0x2e, 0xe7, 0x84, 0x57, 0xce, 0xde, 0xcd, 0xcc, 0xe4, 0x1e, 0xb4, 0x0c, 0x57, 0xc7,
-	0xc2, 0xb0, 0x44, 0xc9, 0x61, 0xea, 0x1b, 0xaf, 0x8c, 0x82, 0xa6, 0x43, 0x0f, 0x1c, 0x48, 0x86,
-	0xb0, 0x98, 0xd1, 0x5c, 0x10, 0xa7, 0x5c, 0x05, 0x3c, 0x36, 0xde, 0xcc, 0x6a, 0x69, 0xad, 0xb5,
-	0xf1, 0x60, 0x7d, 0x42, 0xce, 0xeb, 0x85, 0x7c, 0xd7, 0x77, 0xac, 0xe5, 0x95, 0x13, 0x6d, 0x4d,
-	0xef, 0xee, 0x3f, 0xa7, 0xc4, 0xf9, 0x2b, 0x1a, 0x48, 0x1f, 0xea, 0xd9, 0x5b, 0xb8, 0xf2, 0x4f,
-	0xbc, 0x59, 0x74, 0x7e, 0xef, 0x93, 0xce, 0xb7, 0x95, 0x7f, 0xb2, 0x55, 0x39, 0xda, 0xdf, 0xdb,
-	0xef, 0xff, 0xb4, 0x4f, 0xc1, 0xb9, 0xb0, 0x20, 0x59, 0x87, 0x85, 0x82, 0xc3, 0x71, 0xd4, 0x15,
-	0x4c, 0x71, 0xfe, 0x82, 0x98, 0x07, 0xf0, 0x35, 0x64, 0x61, 0x31, 0x3f, 0x49, 0xc7, 0xf4, 0x2a,
-	0xd2, 0xdb, 0xce, 0xd2, 0x4d, 0xd2, 0x9c, 0xbd, 0x07, 0xb5, 0x13, 0xa9, 0xb3, 0x60, 0x6b, 0x9f,
-	0x15, 0x6c, 0xd5, 0x3a, 0xc0, 0x50, 0x29, 0x34, 0xd1, 0xd9, 0x46, 0x3c, 0x74, 0x0e, 0xe1, 0xb3,
-	0x1c, 0xd6, 0xad, 0x93, 0x8d, 0x78, 0x88, 0x3e, 0x97, 0xa1, 0x82, 0x3e, 0xa5, 0xf6, 0xea, 0x98,
-	0xc3, 0xac, 0x7d, 0xec, 0x6b, 0xd2, 0xc9, 0x5e, 0x26, 0x35, 0x13, 0x67, 0x46, 0x71, 0xaf, 0x81,
-	0xe6, 0xba, 0x33, 0xef, 0x5a, 0x68, 0xcc, 0xf1, 0x95, 0xd4, 0xda, 0xba, 0x68, 0x5e, 0x70, 0xba,
-	0x16, 0xeb, 0x6b, 0x72, 0x1f, 0xe6, 0x0a, 0x1c, 0x0c, 0xbb, 0xe5, 0xda, 0x67, 0xcc, 0xc2, 0x40,
-	0x1e, 0xc0, 0x42, 0x81, 0x37, 0x4e, 0x71, 0xce, 0x15, 0x76, 0xcc, 0x2d, 0xc4, 0x2d, 0x53, 0xc3,
-	0x86, 0x81, 0xf2, 0xda, 0x2e, 0x6e, 0x99, 0x9a, 0x67, 0x81, 0x22, 0xdf, 0x42, 0x5d, 0x0b, 0x93,
-	0x26, 0xcc, 0x48, 0x19, 0x6a, 0x6f, 0x7e, 0x75, 0x7a, 0xad, 0xbe, 0x71, 0x67, 0x62, 0x89, 0x0e,
-	0x84, 0x1a, 0xbd, 0x88, 0x47, 0x92, 0x02, 0x2a, 0x5e, 0x5a, 0x01, 0xd9, 0x82, 0xda, 0x5b, 0x6e,
-	0x02, 0xa6, 0xd2, 0x58, 0x7b, 0xe4, 0x3a, 0xea, 0xaa, 0xe5, 0xd3, 0x34, 0xd6, 0xe4, 0x29, 0x80,
-	0x63, 0xa2, 0x78, 0xe1, 0x3a, 0xe2, 0x1a, 0x5a, 0x73, 0x75, 0x1c, 0xc4, 0x6f, 0xb8, 0x53, 0x2f,
-	0x5e, 0x4b, 0x8d, 0x02, 0x54, 0x7f, 0x03, 0x33, 0x46, 0x1a, 0x1e, 0x7a, 0x4b, 0xab, 0xa5, 0x4f,
-	0x0b, 0x1d, 0x97, 0xbc, 0x82, 0x49, 0xa3, 0xc8, 0xfb, 0x0f, 0xba, 0xb8, 0x3f, 0xd1, 0xc5, 0xa1,
-	0xc5, 0xf0, 0x4a, 0x66, 0x1d, 0x46, 0xe7, 0xf5, 0x55, 0x88, 0x74, 0xa1, 0xe1, 0x54, 0xbe, 0x8c,
-	0x47, 0xc1, 0xb1, 0xb7, 0x8c, 0x0e, 0x57, 0x27, 0x3a, 0x44, 0x61, 0x17, 0x79, 0xb4, 0x3e, 0xb8,
-	0x78, 0x20, 0x2b, 0x80, 0xad, 0x8f, 0x23, 0xca, 0xc3, 0x33, 0x1e, 0x3f, 0x93, 0x9f, 0x61, 0x51,
-	0x9f, 0x6b, 0x23, 0x22, 0xa6, 0x84, 0x96, 0xa9, 0xf2, 0x05, 0x0b, 0xe2, 0x91, 0xf4, 0x6e, 0xe2,
-	0x8b, 0xbe, 0x9c, 0x1c, 0x39, 0x0a, 0x68, 0xc6, 0xc7, 0x32, 0x10, 0xfd, 0x01, 0x46, 0xbe, 0x80,
-	0x66, 0x1e, 0x7b, 0x14, 0xf1, 0x78, 0xe8, 0xad, 0xe0, 0xbb, 0x1b, 0x59, 0x68, 0x88, 0xd9, 0xb3,
-	0x1a, 0xf0, 0x77, 0x22, 0x74, 0x67, 0x75, 0xeb, 0x5a, 0x67, 0x85, 0x02, 0x7b, 0x56, 0x9d, 0x47,
-	0xd0, 0xb8, 0x34, 0xd4, 0xaa, 0x50, 0x3e, 0x3a, 0xdc, 0xa5, 0xed, 0x1b, 0xa4, 0x09, 0x35, 0xfb,
-	0xeb, 0xd9, 0xee, 0xce, 0xd1, 0xf3, 0x76, 0x89, 0x54, 0xc0, 0x0e, 0xc2, 0xf6, 0x54, 0xe7, 0x29,
-	0x94, 0xb1, 0xed, 0xeb, 0x90, 0x5f, 0xe3, 0xf6, 0x0d, 0x6b, 0xdd, 0xa6, 0xbd, 0x76, 0x89, 0xd4,
-	0x60, 0x66, 0x9b, 0xf6, 0x36, 0x1f, 0xb7, 0xa7, 0x2c, 0xf6, 0xfa, 0xc9, 0x66, 0x7b, 0x9a, 0x00,
-	0xcc, 0xbe, 0x7e, 0xb2, 0xc9, 0x36, 0x1f, 0xb7, 0xcb, 0x9d, 0xf7, 0x25, 0xa8, 0x17, 0xca, 0x6c,
-	0x17, 0x45, 0xaa, 0x05, 0x3b, 0x96, 0x11, 0xc7, 0x75, 0x52, 0xa5, 0x95, 0x54, 0x8b, 0xe7, 0x32,
-	0xe2, 0xf6, 0x5e, 0x59, 0x93, 0x1a, 0x08, 0x5c, 0x21, 0x55, 0x3a, 0x9b, 0x6a, 0x41, 0x07, 0x82,
-	0xdc, 0x85, 0xd6, 0x48, 0xda, 0x3a, 0x8f, 0x95, 0xd3, 0x68, 0x6f, 0x20, 0x7a, 0x94, 0xc9, 0xef,
-	0x42, 0xcb, 0xd5, 0x85, 0x6b, 0x86, 0xbd, 0x89, 0xbb, 0xa2, 0x4a, 0x1b, 0x88, 0x6e, 0xeb, 0x7d,
-	0x8b, 0x91, 0xaf, 0x60, 0xde, 0xb1, 0xa2, 0xe0, 0x4c, 0x0c, 0x5d, 0xc1, 0x70, 0x4f, 0x54, 0xe9,
-	0x1c, 0x1a, 0x7a, 0x16, 0xc7, 0x88, 0x3b, 0x12, 0xc8, 0x87, 0x07, 0x47, 0x36, 0x60, 0x09, 0x3b,
-	0x98, 0x25, 0x27, 0xe7, 0x3a, 0xf0, 0x79, 0xc8, 0x22, 0x11, 0x49, 0x75, 0x8e, 0xe9, 0x94, 0xe9,
-	0x02, 0x1a, 0x0f, 0x32, 0x5b, 0x0f, 0x4d, 0x76, 0x8f, 0xf1, 0x53, 0x1e, 0x84, 0x7c, 0x10, 0x0a,
-	0x3b, 0xbc, 0x35, 0x66, 0x38, 0x43, 0x9b, 0x63, 0xb4, 0x9b, 0xa4, 0xba, 0xf3, 0x77, 0x09, 0xaa,
-	0xf9, 0xa1, 0x11, 0x02, 0xe5, 0xa1, 0xd0, 0x3e, 0xba, 0xad, 0x51, 0xfc, 0x6d, 0x31, 0xec, 0x49,
-	0xb7, 0x62, 0xf1, 0x37, 0xb9, 0x03, 0xa0, 0x0d, 0x57, 0x06, 0xf7, 0x34, 0x56, 0xa6, 0x4c, 0x6b,
-	0x88, 0xd8, 0xf5, 0x4c, 0x6e, 0x41, 0x4d, 0x09, 0x1e, 0x3a, 0x6b, 0x19, 0xad, 0x55, 0x0b, 0xa0,
-	0xf1, 0xff, 0x00, 0x2e, 0x78, 0x5b, 0x5a, 0x2c, 0x43, 0x79, 0x67, 0xca, 0x2b, 0xd1, 0x9a, 0x43,
-	0x8f, 0xb4, 0x20, 0xbf, 0xc1, 0x72, 0xa2, 0xa4, 0x2f, 0xb4, 0x16, 0xfa, 0x4a, 0xc7, 0xcf, 0x62,
-	0xef, 0xad, 0x4d, 0xee, 0x3d, 0xa7, 0xb9, 0xd4, 0xf2, 0x4b, 0x63, 0x47, 0x45, 0xb8, 0xf3, 0x7e,
-	0x1a, 0x16, 0x26, 0xd0, 0xc7, 0xc9, 0x96, 0x0a, 0xc9, 0xae, 0x41, 0x3b, 0xd5, 0x42, 0x61, 0x36,
-	0x2c, 0x0a, 0xec, 0xc4, 0xc6, 0x62, 0x94, 0x69, 0xcb, 0xe2, 0x36, 0xa9, 0x1e, 0xa2, 0x76, 0x59,
-	0x66, 0xd7, 0xb4, 0xc8, 0x75, 0xe5, 0x69, 0x3b, 0x4b, 0x81, 0x7d, 0x1b, 0x20, 0xe2, 0x67, 0x4c,
-	0x69, 0xcd, 0xde, 0x0e, 0xf2, 0x32, 0x45, 0xfc, 0x8c, 0x6a, 0xbd, 0x37, 0xb0, 0x4d, 0x13, 0x05,
-	0xb1, 0x54, 0x2c, 0xe1, 0xc7, 0x82, 0x8d, 0x78, 0x1a, 0x1a, 0xed, 0xaa, 0x45, 0xe7, 0xd0, 0x70,
-	0xc0, 0x8f, 0xc5, 0xf7, 0x08, 0x23, 0x97, 0xbf, 0xb9, 0xc2, 0x9d, 0xcd, 0xb8, 0xd6, 0x50, 0xe0,
-	0xfe, 0x17, 0xea, 0x81, 0x64, 0x41, 0x9c, 0xa4, 0xc6, 0xbe, 0xb6, 0xe2, 0xce, 0x2e, 0x90, 0x2f,
-	0x2c, 0xb2, 0x37, 0x20, 0xab, 0xd0, 0x08, 0x24, 0x93, 0xa9, 0xc9, 0x08, 0x55, 0x24, 0x40, 0x20,
-	0xfb, 0x08, 0xed, 0x0d, 0xc8, 0x53, 0x58, 0x39, 0x95, 0x61, 0x1a, 0x1b, 0xae, 0xce, 0xed, 0xc4,
-	0x33, 0xe2, 0xcc, 0x30, 0xfd, 0x7b, 0x60, 0xfc, 0x13, 0xa1, 0x71, 0xeb, 0x97, 0xa9, 0x37, 0x66,
-	0x74, 0x1d, 0xe1, 0x30, 0xb3, 0x93, 0xef, 0xe0, 0x76, 0x10, 0x7f, 0x44, 0x0f, 0xa8, 0x5f, 0x29,
-	0x70, 0xae, 0x78, 0xe8, 0xfc, 0x55, 0x82, 0x56, 0x4f, 0x0e, 0xd3, 0x50, 0xbc, 0x3c, 0x4f, 0xdc,
-	0xb1, 0xfd, 0x9a, 0x0f, 0x60, 0x57, 0x64, 0x3c, 0xbe, 0xd6, 0xc6, 0xc3, 0xc9, 0x5f, 0x0a, 0x97,
-	0xa4, 0x6e, 0x1e, 0xbb, 0x2b, 0x57, 0xf8, 0x66, 0x18, 0x5c, 0xa0, 0xe4, 0x7f, 0x50, 0x8f, 0x50,
-	0xc3, 0xcc, 0x79, 0x92, 0xdf, 0x03, 0x88, 0xc6, 0x6e, 0xec, 0x14, 0x88, 0xd3, 0x88, 0xc9, 0x11,
-	0x73, 0xa0, 0x3b, 0xf2, 0x26, 0x6d, 0xc4, 0x69, 0xd4, 0x1f, 0xb9, 0xf7, 0xe9, 0xce, 0xc3, 0x6c,
-	0x28, 0x65, 0x5e, 0x2f, 0x8d, 0xb6, 0x1a, 0xcc, 0x1c, 0xf6, 0xfb, 0xfb, 0x76, 0x06, 0x56, 0xa1,
-	0xdc, 0xdb, 0xde, 0xdb, 0x6d, 0x4f, 0x75, 0x42, 0x58, 0xe9, 0xaa, 0xc0, 0xd8, 0x2b, 0x7d, 0xa4,
-	0x85, 0xfa, 0x51, 0xa6, 0x2a, 0x16, 0xe7, 0xf9, 0xce, 0x99, 0xd4, 0xa9, 0x5b, 0x50, 0xc9, 0x77,
-	0xda, 0xd4, 0x47, 0x56, 0x50, 0xe1, 0x5b, 0x89, 0xe6, 0x82, 0xce, 0x00, 0x6e, 0x4d, 0x78, 0x9b,
-	0xbe, 0x58, 0x71, 0x65, 0x3f, 0x7d, 0xa3, 0xbd, 0x12, 0xde, 0xbf, 0xc9, 0x95, 0xfd, 0xf7, 0x68,
-	0x29, 0x8a, 0x3b, 0x7f, 0x94, 0x60, 0xfe, 0x83, 0x85, 0x4a, 0x3c, 0xa8, 0xe4, 0x75, 0x2b, 0x61,
-	0xdd, 0xf2, 0x47, 0xbb, 0x12, 0xb3, 0x2f, 0x4e, 0x97, 0x50, 0x93, 0x8e, 0x9f, 0x6d, 0xcf, 0xbb,
-	0x91, 0xc8, 0xc3, 0x50, 0xfa, 0xcc, 0x97, 0x69, 0x6c, 0xb2, 0xab, 0x36, 0x87, 0x86, 0x6d, 0x8b,
-	0x77, 0x2d, 0x6c, 0x6f, 0x70, 0x91, 0xab, 0x83, 0x77, 0xf9, 0x58, 0x6a, 0x5d, 0x50, 0x0f, 0x83,
-	0x77, 0xc2, 0x7e, 0xe2, 0xd9, 0x3b, 0x79, 0x22, 0x78, 0xe2, 0x68, 0xee, 0xc6, 0xd5, 0x23, 0x7e,
-	0xf6, 0x83, 0xe0, 0x89, 0xe5, 0xec, 0x2c, 0xfd, 0x92, 0x7d, 0x45, 0x64, 0x79, 0x33, 0xfc, 0x97,
-	0xf3, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x63, 0x09, 0x14, 0xf5, 0x0c, 0x00, 0x00,
+var file_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_metrics_proto_goTypes = []interface{}{
+	(MetricsBase_BuildVariant)(0),       // 0: soong_build_metrics.MetricsBase.BuildVariant
+	(MetricsBase_Arch)(0),               // 1: soong_build_metrics.MetricsBase.Arch
+	(ModuleTypeInfo_BuildSystem)(0),     // 2: soong_build_metrics.ModuleTypeInfo.BuildSystem
+	(*MetricsBase)(nil),                 // 3: soong_build_metrics.MetricsBase
+	(*BuildConfig)(nil),                 // 4: soong_build_metrics.BuildConfig
+	(*SystemResourceInfo)(nil),          // 5: soong_build_metrics.SystemResourceInfo
+	(*PerfInfo)(nil),                    // 6: soong_build_metrics.PerfInfo
+	(*ProcessResourceInfo)(nil),         // 7: soong_build_metrics.ProcessResourceInfo
+	(*ModuleTypeInfo)(nil),              // 8: soong_build_metrics.ModuleTypeInfo
+	(*CriticalUserJourneyMetrics)(nil),  // 9: soong_build_metrics.CriticalUserJourneyMetrics
+	(*CriticalUserJourneysMetrics)(nil), // 10: soong_build_metrics.CriticalUserJourneysMetrics
+	(*SoongBuildMetrics)(nil),           // 11: soong_build_metrics.SoongBuildMetrics
+}
+var file_metrics_proto_depIdxs = []int32{
+	0,  // 0: soong_build_metrics.MetricsBase.target_build_variant:type_name -> soong_build_metrics.MetricsBase.BuildVariant
+	1,  // 1: soong_build_metrics.MetricsBase.target_arch:type_name -> soong_build_metrics.MetricsBase.Arch
+	1,  // 2: soong_build_metrics.MetricsBase.host_arch:type_name -> soong_build_metrics.MetricsBase.Arch
+	1,  // 3: soong_build_metrics.MetricsBase.host_2nd_arch:type_name -> soong_build_metrics.MetricsBase.Arch
+	6,  // 4: soong_build_metrics.MetricsBase.setup_tools:type_name -> soong_build_metrics.PerfInfo
+	6,  // 5: soong_build_metrics.MetricsBase.kati_runs:type_name -> soong_build_metrics.PerfInfo
+	6,  // 6: soong_build_metrics.MetricsBase.soong_runs:type_name -> soong_build_metrics.PerfInfo
+	6,  // 7: soong_build_metrics.MetricsBase.ninja_runs:type_name -> soong_build_metrics.PerfInfo
+	6,  // 8: soong_build_metrics.MetricsBase.total:type_name -> soong_build_metrics.PerfInfo
+	11, // 9: soong_build_metrics.MetricsBase.soong_build_metrics:type_name -> soong_build_metrics.SoongBuildMetrics
+	4,  // 10: soong_build_metrics.MetricsBase.build_config:type_name -> soong_build_metrics.BuildConfig
+	5,  // 11: soong_build_metrics.MetricsBase.system_resource_info:type_name -> soong_build_metrics.SystemResourceInfo
+	6,  // 12: soong_build_metrics.MetricsBase.bazel_runs:type_name -> soong_build_metrics.PerfInfo
+	7,  // 13: soong_build_metrics.PerfInfo.processes_resource_info:type_name -> soong_build_metrics.ProcessResourceInfo
+	2,  // 14: soong_build_metrics.ModuleTypeInfo.build_system:type_name -> soong_build_metrics.ModuleTypeInfo.BuildSystem
+	3,  // 15: soong_build_metrics.CriticalUserJourneyMetrics.metrics:type_name -> soong_build_metrics.MetricsBase
+	9,  // 16: soong_build_metrics.CriticalUserJourneysMetrics.cujs:type_name -> soong_build_metrics.CriticalUserJourneyMetrics
+	17, // [17:17] is the sub-list for method output_type
+	17, // [17:17] is the sub-list for method input_type
+	17, // [17:17] is the sub-list for extension type_name
+	17, // [17:17] is the sub-list for extension extendee
+	0,  // [0:17] is the sub-list for field type_name
+}
+
+func init() { file_metrics_proto_init() }
+func file_metrics_proto_init() {
+	if File_metrics_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MetricsBase); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BuildConfig); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SystemResourceInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_metrics_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*PerfInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_metrics_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ProcessResourceInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_metrics_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ModuleTypeInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_metrics_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CriticalUserJourneyMetrics); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_metrics_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CriticalUserJourneysMetrics); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_metrics_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SoongBuildMetrics); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_metrics_proto_rawDesc,
+			NumEnums:      3,
+			NumMessages:   9,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_metrics_proto_goTypes,
+		DependencyIndexes: file_metrics_proto_depIdxs,
+		EnumInfos:         file_metrics_proto_enumTypes,
+		MessageInfos:      file_metrics_proto_msgTypes,
+	}.Build()
+	File_metrics_proto = out.File
+	file_metrics_proto_rawDesc = nil
+	file_metrics_proto_goTypes = nil
+	file_metrics_proto_depIdxs = nil
 }
diff --git a/ui/metrics/metrics_proto/metrics.proto b/ui/metrics/metrics_proto/metrics.proto
index b284bf9..ef42f54 100644
--- a/ui/metrics/metrics_proto/metrics.proto
+++ b/ui/metrics/metrics_proto/metrics.proto
@@ -15,7 +15,7 @@
 syntax = "proto2";
 
 package soong_build_metrics;
-option go_package = "soong_metrics_proto";
+option go_package = "android/soong/ui/metrics/metrics_proto";
 
 message MetricsBase {
   // Timestamp generated when the build starts.
diff --git a/ui/metrics/upload_proto/upload.pb.go b/ui/metrics/upload_proto/upload.pb.go
index 614d4c7..9c8fb06 100644
--- a/ui/metrics/upload_proto/upload.pb.go
+++ b/ui/metrics/upload_proto/upload.pb.go
@@ -1,26 +1,44 @@
+// Copyright 2020 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: upload.proto
 
-package soong_metrics_upload_proto
+package upload_proto
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 type Upload struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// The timestamp in milliseconds that the build was created.
 	CreationTimestampMs *uint64 `protobuf:"varint,1,opt,name=creation_timestamp_ms,json=creationTimestampMs" json:"creation_timestamp_ms,omitempty"`
 	// The timestamp in milliseconds when the build was completed.
@@ -33,102 +51,169 @@
 	MetricsFiles []string `protobuf:"bytes,5,rep,name=metrics_files,json=metricsFiles" json:"metrics_files,omitempty"`
 	// A list of directories to delete after the copy of metrics files
 	// is completed for uploading.
-	DirectoriesToDelete  []string `protobuf:"bytes,6,rep,name=directories_to_delete,json=directoriesToDelete" json:"directories_to_delete,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	DirectoriesToDelete []string `protobuf:"bytes,6,rep,name=directories_to_delete,json=directoriesToDelete" json:"directories_to_delete,omitempty"`
 }
 
-func (m *Upload) Reset()         { *m = Upload{} }
-func (m *Upload) String() string { return proto.CompactTextString(m) }
-func (*Upload) ProtoMessage()    {}
+func (x *Upload) Reset() {
+	*x = Upload{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_upload_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Upload) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Upload) ProtoMessage() {}
+
+func (x *Upload) ProtoReflect() protoreflect.Message {
+	mi := &file_upload_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Upload.ProtoReflect.Descriptor instead.
 func (*Upload) Descriptor() ([]byte, []int) {
-	return fileDescriptor_91b94b655bd2a7e5, []int{0}
+	return file_upload_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *Upload) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Upload.Unmarshal(m, b)
-}
-func (m *Upload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Upload.Marshal(b, m, deterministic)
-}
-func (m *Upload) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Upload.Merge(m, src)
-}
-func (m *Upload) XXX_Size() int {
-	return xxx_messageInfo_Upload.Size(m)
-}
-func (m *Upload) XXX_DiscardUnknown() {
-	xxx_messageInfo_Upload.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Upload proto.InternalMessageInfo
-
-func (m *Upload) GetCreationTimestampMs() uint64 {
-	if m != nil && m.CreationTimestampMs != nil {
-		return *m.CreationTimestampMs
+func (x *Upload) GetCreationTimestampMs() uint64 {
+	if x != nil && x.CreationTimestampMs != nil {
+		return *x.CreationTimestampMs
 	}
 	return 0
 }
 
-func (m *Upload) GetCompletionTimestampMs() uint64 {
-	if m != nil && m.CompletionTimestampMs != nil {
-		return *m.CompletionTimestampMs
+func (x *Upload) GetCompletionTimestampMs() uint64 {
+	if x != nil && x.CompletionTimestampMs != nil {
+		return *x.CompletionTimestampMs
 	}
 	return 0
 }
 
-func (m *Upload) GetBranchName() string {
-	if m != nil && m.BranchName != nil {
-		return *m.BranchName
+func (x *Upload) GetBranchName() string {
+	if x != nil && x.BranchName != nil {
+		return *x.BranchName
 	}
 	return ""
 }
 
-func (m *Upload) GetTargetName() string {
-	if m != nil && m.TargetName != nil {
-		return *m.TargetName
+func (x *Upload) GetTargetName() string {
+	if x != nil && x.TargetName != nil {
+		return *x.TargetName
 	}
 	return ""
 }
 
-func (m *Upload) GetMetricsFiles() []string {
-	if m != nil {
-		return m.MetricsFiles
+func (x *Upload) GetMetricsFiles() []string {
+	if x != nil {
+		return x.MetricsFiles
 	}
 	return nil
 }
 
-func (m *Upload) GetDirectoriesToDelete() []string {
-	if m != nil {
-		return m.DirectoriesToDelete
+func (x *Upload) GetDirectoriesToDelete() []string {
+	if x != nil {
+		return x.DirectoriesToDelete
 	}
 	return nil
 }
 
-func init() {
-	proto.RegisterType((*Upload)(nil), "soong_metrics_upload.Upload")
+var File_upload_proto protoreflect.FileDescriptor
+
+var file_upload_proto_rawDesc = []byte{
+	0x0a, 0x0c, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14,
+	0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x75, 0x70,
+	0x6c, 0x6f, 0x61, 0x64, 0x22, 0x8f, 0x02, 0x0a, 0x06, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12,
+	0x32, 0x0a, 0x15, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+	0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13,
+	0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
+	0x70, 0x4d, 0x73, 0x12, 0x36, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f,
+	0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x73, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x04, 0x52, 0x15, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e,
+	0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62,
+	0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0a, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
+	0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a,
+	0x0d, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05,
+	0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x46, 0x69, 0x6c,
+	0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65,
+	0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x03, 0x28,
+	0x09, 0x52, 0x13, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x54, 0x6f,
+	0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69,
+	0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f, 0x75, 0x69, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
+	0x63, 0x73, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
 }
 
-func init() {
-	proto.RegisterFile("upload.proto", fileDescriptor_91b94b655bd2a7e5)
+var (
+	file_upload_proto_rawDescOnce sync.Once
+	file_upload_proto_rawDescData = file_upload_proto_rawDesc
+)
+
+func file_upload_proto_rawDescGZIP() []byte {
+	file_upload_proto_rawDescOnce.Do(func() {
+		file_upload_proto_rawDescData = protoimpl.X.CompressGZIP(file_upload_proto_rawDescData)
+	})
+	return file_upload_proto_rawDescData
 }
 
-var fileDescriptor_91b94b655bd2a7e5 = []byte{
-	// 230 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4a, 0x04, 0x31,
-	0x10, 0x86, 0xd9, 0xbb, 0xf3, 0xe0, 0xe2, 0xd9, 0xec, 0x79, 0x18, 0x44, 0x70, 0xd1, 0x66, 0x2b,
-	0x0b, 0x0b, 0x1f, 0x40, 0xc4, 0x4e, 0x8b, 0xe5, 0x6c, 0x6c, 0x86, 0x98, 0x1d, 0xd7, 0x40, 0x92,
-	0x09, 0xc9, 0xf8, 0x1c, 0xbe, 0xb2, 0x6c, 0xe2, 0xe2, 0x82, 0x76, 0xc3, 0xff, 0x7d, 0x7f, 0x31,
-	0xbf, 0xd8, 0x7e, 0x06, 0x4b, 0xaa, 0xbf, 0x09, 0x91, 0x98, 0xea, 0xd3, 0x44, 0xe4, 0x07, 0x70,
-	0xc8, 0xd1, 0xe8, 0x04, 0x85, 0x5d, 0x7d, 0x2d, 0xc4, 0xfa, 0x25, 0x9f, 0xf5, 0xad, 0xd8, 0xeb,
-	0x88, 0x8a, 0x0d, 0x79, 0x60, 0xe3, 0x30, 0xb1, 0x72, 0x01, 0x5c, 0x92, 0x55, 0x53, 0xb5, 0xab,
-	0x6e, 0x37, 0xc1, 0xc3, 0xc4, 0x9e, 0x52, 0x7d, 0x27, 0xce, 0x34, 0xb9, 0x60, 0xf1, 0x6f, 0x6b,
-	0x91, 0x5b, 0xfb, 0x5f, 0x3c, 0xef, 0x5d, 0x8a, 0xe3, 0xb7, 0xa8, 0xbc, 0xfe, 0x00, 0xaf, 0x1c,
-	0xca, 0x65, 0x53, 0xb5, 0x9b, 0x4e, 0x94, 0xe8, 0x59, 0x39, 0x1c, 0x05, 0x56, 0x71, 0x40, 0x2e,
-	0xc2, 0xaa, 0x08, 0x25, 0xca, 0xc2, 0xb5, 0x38, 0x99, 0x5e, 0x79, 0x37, 0x16, 0x93, 0x3c, 0x6a,
-	0x96, 0xed, 0xa6, 0xdb, 0xfe, 0x84, 0x8f, 0x63, 0x36, 0xbe, 0xd4, 0x9b, 0x88, 0x9a, 0x29, 0x1a,
-	0x4c, 0xc0, 0x04, 0x3d, 0x5a, 0x64, 0x94, 0xeb, 0x2c, 0xef, 0x66, 0xf0, 0x40, 0x0f, 0x19, 0xdd,
-	0x5f, 0xbc, 0x9e, 0xff, 0xb7, 0x14, 0xe4, 0x15, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x64, 0x04,
-	0xa8, 0xf4, 0x54, 0x01, 0x00, 0x00,
+var file_upload_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_upload_proto_goTypes = []interface{}{
+	(*Upload)(nil), // 0: soong_metrics_upload.Upload
+}
+var file_upload_proto_depIdxs = []int32{
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_upload_proto_init() }
+func file_upload_proto_init() {
+	if File_upload_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_upload_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Upload); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_upload_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   1,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_upload_proto_goTypes,
+		DependencyIndexes: file_upload_proto_depIdxs,
+		MessageInfos:      file_upload_proto_msgTypes,
+	}.Build()
+	File_upload_proto = out.File
+	file_upload_proto_rawDesc = nil
+	file_upload_proto_goTypes = nil
+	file_upload_proto_depIdxs = nil
 }
diff --git a/ui/metrics/upload_proto/upload.proto b/ui/metrics/upload_proto/upload.proto
index bcd0ab2..e621fd1 100644
--- a/ui/metrics/upload_proto/upload.proto
+++ b/ui/metrics/upload_proto/upload.proto
@@ -15,7 +15,7 @@
 syntax = "proto2";
 
 package soong_metrics_upload;
-option go_package = "soong_metrics_upload_proto";
+option go_package = "android/soong/ui/metrics/upload_proto";
 
 message Upload {
   // The timestamp in milliseconds that the build was created.
diff --git a/ui/status/Android.bp b/ui/status/Android.bp
index ac31390..a46a007 100644
--- a/ui/status/Android.bp
+++ b/ui/status/Android.bp
@@ -44,7 +44,10 @@
 bootstrap_go_package {
     name: "soong-ui-status-ninja_frontend",
     pkgPath: "android/soong/ui/status/ninja_frontend",
-    deps: ["golang-protobuf-proto"],
+    deps: [
+        "golang-protobuf-reflect-protoreflect",
+        "golang-protobuf-runtime-protoimpl",
+    ],
     srcs: [
         "ninja_frontend/frontend.pb.go",
     ],
@@ -53,7 +56,10 @@
 bootstrap_go_package {
     name: "soong-ui-status-build_error_proto",
     pkgPath: "android/soong/ui/status/build_error_proto",
-    deps: ["golang-protobuf-proto"],
+    deps: [
+        "golang-protobuf-reflect-protoreflect",
+        "golang-protobuf-runtime-protoimpl",
+    ],
     srcs: [
         "build_error_proto/build_error.pb.go",
     ],
@@ -62,7 +68,10 @@
 bootstrap_go_package {
     name: "soong-ui-status-build_progress_proto",
     pkgPath: "android/soong/ui/status/build_progress_proto",
-    deps: ["golang-protobuf-proto"],
+    deps: [
+        "golang-protobuf-reflect-protoreflect",
+        "golang-protobuf-runtime-protoimpl",
+    ],
     srcs: [
         "build_progress_proto/build_progress.pb.go",
     ],
diff --git a/ui/status/build_error_proto/build_error.pb.go b/ui/status/build_error_proto/build_error.pb.go
index d4d0a6e..22125c2 100644
--- a/ui/status/build_error_proto/build_error.pb.go
+++ b/ui/status/build_error_proto/build_error.pb.go
@@ -1,71 +1,93 @@
+// Copyright 2019 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: build_error.proto
 
-package soong_build_error_proto
+package build_error_proto
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 type BuildError struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// List of error messages of the overall build. The error messages
 	// are not associated with a build action.
 	ErrorMessages []string `protobuf:"bytes,1,rep,name=error_messages,json=errorMessages" json:"error_messages,omitempty"`
 	// List of build action errors.
-	ActionErrors         []*BuildActionError `protobuf:"bytes,2,rep,name=action_errors,json=actionErrors" json:"action_errors,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
-	XXX_unrecognized     []byte              `json:"-"`
-	XXX_sizecache        int32               `json:"-"`
+	ActionErrors []*BuildActionError `protobuf:"bytes,2,rep,name=action_errors,json=actionErrors" json:"action_errors,omitempty"`
 }
 
-func (m *BuildError) Reset()         { *m = BuildError{} }
-func (m *BuildError) String() string { return proto.CompactTextString(m) }
-func (*BuildError) ProtoMessage()    {}
+func (x *BuildError) Reset() {
+	*x = BuildError{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_build_error_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BuildError) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BuildError) ProtoMessage() {}
+
+func (x *BuildError) ProtoReflect() protoreflect.Message {
+	mi := &file_build_error_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use BuildError.ProtoReflect.Descriptor instead.
 func (*BuildError) Descriptor() ([]byte, []int) {
-	return fileDescriptor_a2e15b05802a5501, []int{0}
+	return file_build_error_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *BuildError) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_BuildError.Unmarshal(m, b)
-}
-func (m *BuildError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_BuildError.Marshal(b, m, deterministic)
-}
-func (m *BuildError) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BuildError.Merge(m, src)
-}
-func (m *BuildError) XXX_Size() int {
-	return xxx_messageInfo_BuildError.Size(m)
-}
-func (m *BuildError) XXX_DiscardUnknown() {
-	xxx_messageInfo_BuildError.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BuildError proto.InternalMessageInfo
-
-func (m *BuildError) GetErrorMessages() []string {
-	if m != nil {
-		return m.ErrorMessages
+func (x *BuildError) GetErrorMessages() []string {
+	if x != nil {
+		return x.ErrorMessages
 	}
 	return nil
 }
 
-func (m *BuildError) GetActionErrors() []*BuildActionError {
-	if m != nil {
-		return m.ActionErrors
+func (x *BuildError) GetActionErrors() []*BuildActionError {
+	if x != nil {
+		return x.ActionErrors
 	}
 	return nil
 }
@@ -73,6 +95,10 @@
 // Build is composed of a list of build action. There can be a set of build
 // actions that can failed.
 type BuildActionError struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Description of the command.
 	Description *string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"`
 	// The command name that raised the error.
@@ -82,94 +108,177 @@
 	// List of artifacts (i.e. files) that was produced by the command.
 	Artifacts []string `protobuf:"bytes,4,rep,name=artifacts" json:"artifacts,omitempty"`
 	// The error string produced by the build action.
-	Error                *string  `protobuf:"bytes,5,opt,name=error" json:"error,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Error *string `protobuf:"bytes,5,opt,name=error" json:"error,omitempty"`
 }
 
-func (m *BuildActionError) Reset()         { *m = BuildActionError{} }
-func (m *BuildActionError) String() string { return proto.CompactTextString(m) }
-func (*BuildActionError) ProtoMessage()    {}
+func (x *BuildActionError) Reset() {
+	*x = BuildActionError{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_build_error_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BuildActionError) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BuildActionError) ProtoMessage() {}
+
+func (x *BuildActionError) ProtoReflect() protoreflect.Message {
+	mi := &file_build_error_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use BuildActionError.ProtoReflect.Descriptor instead.
 func (*BuildActionError) Descriptor() ([]byte, []int) {
-	return fileDescriptor_a2e15b05802a5501, []int{1}
+	return file_build_error_proto_rawDescGZIP(), []int{1}
 }
 
-func (m *BuildActionError) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_BuildActionError.Unmarshal(m, b)
-}
-func (m *BuildActionError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_BuildActionError.Marshal(b, m, deterministic)
-}
-func (m *BuildActionError) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BuildActionError.Merge(m, src)
-}
-func (m *BuildActionError) XXX_Size() int {
-	return xxx_messageInfo_BuildActionError.Size(m)
-}
-func (m *BuildActionError) XXX_DiscardUnknown() {
-	xxx_messageInfo_BuildActionError.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BuildActionError proto.InternalMessageInfo
-
-func (m *BuildActionError) GetDescription() string {
-	if m != nil && m.Description != nil {
-		return *m.Description
+func (x *BuildActionError) GetDescription() string {
+	if x != nil && x.Description != nil {
+		return *x.Description
 	}
 	return ""
 }
 
-func (m *BuildActionError) GetCommand() string {
-	if m != nil && m.Command != nil {
-		return *m.Command
+func (x *BuildActionError) GetCommand() string {
+	if x != nil && x.Command != nil {
+		return *x.Command
 	}
 	return ""
 }
 
-func (m *BuildActionError) GetOutput() string {
-	if m != nil && m.Output != nil {
-		return *m.Output
+func (x *BuildActionError) GetOutput() string {
+	if x != nil && x.Output != nil {
+		return *x.Output
 	}
 	return ""
 }
 
-func (m *BuildActionError) GetArtifacts() []string {
-	if m != nil {
-		return m.Artifacts
+func (x *BuildActionError) GetArtifacts() []string {
+	if x != nil {
+		return x.Artifacts
 	}
 	return nil
 }
 
-func (m *BuildActionError) GetError() string {
-	if m != nil && m.Error != nil {
-		return *m.Error
+func (x *BuildActionError) GetError() string {
+	if x != nil && x.Error != nil {
+		return *x.Error
 	}
 	return ""
 }
 
-func init() {
-	proto.RegisterType((*BuildError)(nil), "soong_build_error.BuildError")
-	proto.RegisterType((*BuildActionError)(nil), "soong_build_error.BuildActionError")
+var File_build_error_proto protoreflect.FileDescriptor
+
+var file_build_error_proto_rawDesc = []byte{
+	0x0a, 0x11, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x12, 0x11, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64,
+	0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7d, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x45,
+	0x72, 0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x72,
+	0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x0d, 0x61,
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03,
+	0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64,
+	0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x41, 0x63, 0x74, 0x69,
+	0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0c, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45,
+	0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x41,
+	0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65,
+	0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07,
+	0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
+	0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1c,
+	0x0a, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
+	0x09, 0x52, 0x09, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05,
+	0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72,
+	0x6f, 0x72, 0x42, 0x2b, 0x5a, 0x29, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f,
+	0x6f, 0x6e, 0x67, 0x2f, 0x75, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x62, 0x75,
+	0x69, 0x6c, 0x64, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
 }
 
-func init() { proto.RegisterFile("build_error.proto", fileDescriptor_a2e15b05802a5501) }
+var (
+	file_build_error_proto_rawDescOnce sync.Once
+	file_build_error_proto_rawDescData = file_build_error_proto_rawDesc
+)
 
-var fileDescriptor_a2e15b05802a5501 = []byte{
-	// 229 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xc1, 0x4a, 0xc3, 0x40,
-	0x10, 0x86, 0x49, 0x63, 0x95, 0x4c, 0xad, 0xd8, 0x41, 0x74, 0x04, 0x0f, 0xa1, 0x22, 0xe4, 0x94,
-	0x83, 0x6f, 0x60, 0x41, 0xf0, 0xe2, 0x25, 0x47, 0x2f, 0x61, 0xdd, 0xac, 0x65, 0xc1, 0x64, 0xc2,
-	0xce, 0xe6, 0xe8, 0x8b, 0xf8, 0xb4, 0x92, 0x69, 0xa5, 0xa5, 0x39, 0x7e, 0xdf, 0x3f, 0xfb, 0xef,
-	0xce, 0xc2, 0xea, 0x73, 0xf0, 0xdf, 0x4d, 0xed, 0x42, 0xe0, 0x50, 0xf6, 0x81, 0x23, 0xe3, 0x4a,
-	0x98, 0xbb, 0x6d, 0x7d, 0x14, 0xac, 0x7f, 0x00, 0x36, 0x23, 0xbe, 0x8e, 0x84, 0x4f, 0x70, 0xa5,
-	0xba, 0x6e, 0x9d, 0x88, 0xd9, 0x3a, 0xa1, 0x24, 0x4f, 0x8b, 0xac, 0x5a, 0xaa, 0x7d, 0xdf, 0x4b,
-	0x7c, 0x83, 0xa5, 0xb1, 0xd1, 0x73, 0xb7, 0x2b, 0x11, 0x9a, 0xe5, 0x69, 0xb1, 0x78, 0x7e, 0x2c,
-	0x27, 0xfd, 0xa5, 0x96, 0xbf, 0xe8, 0xb0, 0x5e, 0x51, 0x5d, 0x9a, 0x03, 0xc8, 0xfa, 0x37, 0x81,
-	0xeb, 0xd3, 0x11, 0xcc, 0x61, 0xd1, 0x38, 0xb1, 0xc1, 0xf7, 0xa3, 0xa3, 0x24, 0x4f, 0x8a, 0xac,
-	0x3a, 0x56, 0x48, 0x70, 0x61, 0xb9, 0x6d, 0x4d, 0xd7, 0xd0, 0x4c, 0xd3, 0x7f, 0xc4, 0x5b, 0x38,
-	0xe7, 0x21, 0xf6, 0x43, 0xa4, 0x54, 0x83, 0x3d, 0xe1, 0x03, 0x64, 0x26, 0x44, 0xff, 0x65, 0x6c,
-	0x14, 0x3a, 0xd3, 0xa5, 0x0e, 0x02, 0x6f, 0x60, 0xae, 0xcf, 0xa5, 0xb9, 0x1e, 0xda, 0xc1, 0xe6,
-	0xfe, 0xe3, 0x6e, 0xb2, 0x50, 0xad, 0x3f, 0xf9, 0x17, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x18, 0x9e,
-	0x17, 0x5d, 0x01, 0x00, 0x00,
+func file_build_error_proto_rawDescGZIP() []byte {
+	file_build_error_proto_rawDescOnce.Do(func() {
+		file_build_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_build_error_proto_rawDescData)
+	})
+	return file_build_error_proto_rawDescData
+}
+
+var file_build_error_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_build_error_proto_goTypes = []interface{}{
+	(*BuildError)(nil),       // 0: soong_build_error.BuildError
+	(*BuildActionError)(nil), // 1: soong_build_error.BuildActionError
+}
+var file_build_error_proto_depIdxs = []int32{
+	1, // 0: soong_build_error.BuildError.action_errors:type_name -> soong_build_error.BuildActionError
+	1, // [1:1] is the sub-list for method output_type
+	1, // [1:1] is the sub-list for method input_type
+	1, // [1:1] is the sub-list for extension type_name
+	1, // [1:1] is the sub-list for extension extendee
+	0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_build_error_proto_init() }
+func file_build_error_proto_init() {
+	if File_build_error_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_build_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BuildError); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_build_error_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BuildActionError); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_build_error_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   2,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_build_error_proto_goTypes,
+		DependencyIndexes: file_build_error_proto_depIdxs,
+		MessageInfos:      file_build_error_proto_msgTypes,
+	}.Build()
+	File_build_error_proto = out.File
+	file_build_error_proto_rawDesc = nil
+	file_build_error_proto_goTypes = nil
+	file_build_error_proto_depIdxs = nil
 }
diff --git a/ui/status/build_error_proto/build_error.proto b/ui/status/build_error_proto/build_error.proto
index 9c8470d..ecd6074 100644
--- a/ui/status/build_error_proto/build_error.proto
+++ b/ui/status/build_error_proto/build_error.proto
@@ -15,7 +15,7 @@
 syntax = "proto2";
 
 package soong_build_error;
-option go_package = "soong_build_error_proto";
+option go_package = "android/soong/ui/status/build_error_proto";
 
 message BuildError {
   // List of error messages of the overall build. The error messages
diff --git a/ui/status/build_progress_proto/build_progress.pb.go b/ui/status/build_progress_proto/build_progress.pb.go
index f63c157..e243fe0 100644
--- a/ui/status/build_progress_proto/build_progress.pb.go
+++ b/ui/status/build_progress_proto/build_progress.pb.go
@@ -1,26 +1,44 @@
+// Copyright 2020 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: build_progress.proto
 
-package soong_build_progress_proto
+package build_progress_proto
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 type BuildProgress struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Total number of actions in a build. The total actions will increase
 	// and might decrease during the course of a build.
 	TotalActions *uint64 `protobuf:"varint,1,opt,name=total_actions,json=totalActions" json:"total_actions,omitempty"`
@@ -34,82 +52,150 @@
 	// build and current_actions + finished_actions <= total_actions.
 	CurrentActions *uint64 `protobuf:"varint,3,opt,name=current_actions,json=currentActions" json:"current_actions,omitempty"`
 	// Total number of actions that reported as a failure.
-	FailedActions        *uint64  `protobuf:"varint,4,opt,name=failed_actions,json=failedActions" json:"failed_actions,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	FailedActions *uint64 `protobuf:"varint,4,opt,name=failed_actions,json=failedActions" json:"failed_actions,omitempty"`
 }
 
-func (m *BuildProgress) Reset()         { *m = BuildProgress{} }
-func (m *BuildProgress) String() string { return proto.CompactTextString(m) }
-func (*BuildProgress) ProtoMessage()    {}
+func (x *BuildProgress) Reset() {
+	*x = BuildProgress{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_build_progress_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *BuildProgress) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BuildProgress) ProtoMessage() {}
+
+func (x *BuildProgress) ProtoReflect() protoreflect.Message {
+	mi := &file_build_progress_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use BuildProgress.ProtoReflect.Descriptor instead.
 func (*BuildProgress) Descriptor() ([]byte, []int) {
-	return fileDescriptor_a8a463f8e30dab2e, []int{0}
+	return file_build_progress_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *BuildProgress) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_BuildProgress.Unmarshal(m, b)
-}
-func (m *BuildProgress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_BuildProgress.Marshal(b, m, deterministic)
-}
-func (m *BuildProgress) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_BuildProgress.Merge(m, src)
-}
-func (m *BuildProgress) XXX_Size() int {
-	return xxx_messageInfo_BuildProgress.Size(m)
-}
-func (m *BuildProgress) XXX_DiscardUnknown() {
-	xxx_messageInfo_BuildProgress.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_BuildProgress proto.InternalMessageInfo
-
-func (m *BuildProgress) GetTotalActions() uint64 {
-	if m != nil && m.TotalActions != nil {
-		return *m.TotalActions
+func (x *BuildProgress) GetTotalActions() uint64 {
+	if x != nil && x.TotalActions != nil {
+		return *x.TotalActions
 	}
 	return 0
 }
 
-func (m *BuildProgress) GetFinishedActions() uint64 {
-	if m != nil && m.FinishedActions != nil {
-		return *m.FinishedActions
+func (x *BuildProgress) GetFinishedActions() uint64 {
+	if x != nil && x.FinishedActions != nil {
+		return *x.FinishedActions
 	}
 	return 0
 }
 
-func (m *BuildProgress) GetCurrentActions() uint64 {
-	if m != nil && m.CurrentActions != nil {
-		return *m.CurrentActions
+func (x *BuildProgress) GetCurrentActions() uint64 {
+	if x != nil && x.CurrentActions != nil {
+		return *x.CurrentActions
 	}
 	return 0
 }
 
-func (m *BuildProgress) GetFailedActions() uint64 {
-	if m != nil && m.FailedActions != nil {
-		return *m.FailedActions
+func (x *BuildProgress) GetFailedActions() uint64 {
+	if x != nil && x.FailedActions != nil {
+		return *x.FailedActions
 	}
 	return 0
 }
 
-func init() {
-	proto.RegisterType((*BuildProgress)(nil), "soong_build_progress.BuildProgress")
+var File_build_progress_proto protoreflect.FileDescriptor
+
+var file_build_progress_proto_rawDesc = []byte{
+	0x0a, 0x14, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73,
+	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x5f, 0x62, 0x75,
+	0x69, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0xaf, 0x01, 0x0a,
+	0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x12, 0x23,
+	0x0a, 0x0d, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x41, 0x63, 0x74, 0x69,
+	0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f,
+	0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x66,
+	0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27,
+	0x0a, 0x0f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+	0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74,
+	0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65,
+	0x64, 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52,
+	0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x2e,
+	0x5a, 0x2c, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e, 0x67, 0x2f,
+	0x75, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f,
+	0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
 }
 
-func init() { proto.RegisterFile("build_progress.proto", fileDescriptor_a8a463f8e30dab2e) }
+var (
+	file_build_progress_proto_rawDescOnce sync.Once
+	file_build_progress_proto_rawDescData = file_build_progress_proto_rawDesc
+)
 
-var fileDescriptor_a8a463f8e30dab2e = []byte{
-	// 165 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x49, 0x2a, 0xcd, 0xcc,
-	0x49, 0x89, 0x2f, 0x28, 0xca, 0x4f, 0x2f, 0x4a, 0x2d, 0x2e, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9,
-	0x17, 0x12, 0x29, 0xce, 0xcf, 0xcf, 0x4b, 0x8f, 0x47, 0x95, 0x53, 0x5a, 0xcf, 0xc8, 0xc5, 0xeb,
-	0x04, 0x12, 0x0a, 0x80, 0x8a, 0x08, 0x29, 0x73, 0xf1, 0x96, 0xe4, 0x97, 0x24, 0xe6, 0xc4, 0x27,
-	0x26, 0x97, 0x64, 0xe6, 0xe7, 0x15, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x04, 0xf1, 0x80, 0x05,
-	0x1d, 0x21, 0x62, 0x42, 0x9a, 0x5c, 0x02, 0x69, 0x99, 0x79, 0x99, 0xc5, 0x19, 0xa9, 0x29, 0x70,
-	0x75, 0x4c, 0x60, 0x75, 0xfc, 0x30, 0x71, 0x98, 0x52, 0x75, 0x2e, 0xfe, 0xe4, 0xd2, 0xa2, 0xa2,
-	0xd4, 0xbc, 0x12, 0xb8, 0x4a, 0x66, 0xb0, 0x4a, 0x3e, 0xa8, 0x30, 0x4c, 0xa1, 0x2a, 0x17, 0x5f,
-	0x5a, 0x62, 0x66, 0x0e, 0x92, 0x89, 0x2c, 0x60, 0x75, 0xbc, 0x10, 0x51, 0xa8, 0x32, 0x27, 0x99,
-	0x28, 0x29, 0x6c, 0x3e, 0x89, 0x07, 0xfb, 0x12, 0x10, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x6e, 0xc1,
-	0xef, 0xfc, 0x00, 0x00, 0x00,
+func file_build_progress_proto_rawDescGZIP() []byte {
+	file_build_progress_proto_rawDescOnce.Do(func() {
+		file_build_progress_proto_rawDescData = protoimpl.X.CompressGZIP(file_build_progress_proto_rawDescData)
+	})
+	return file_build_progress_proto_rawDescData
+}
+
+var file_build_progress_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_build_progress_proto_goTypes = []interface{}{
+	(*BuildProgress)(nil), // 0: soong_build_progress.BuildProgress
+}
+var file_build_progress_proto_depIdxs = []int32{
+	0, // [0:0] is the sub-list for method output_type
+	0, // [0:0] is the sub-list for method input_type
+	0, // [0:0] is the sub-list for extension type_name
+	0, // [0:0] is the sub-list for extension extendee
+	0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_build_progress_proto_init() }
+func file_build_progress_proto_init() {
+	if File_build_progress_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_build_progress_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*BuildProgress); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_build_progress_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   1,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_build_progress_proto_goTypes,
+		DependencyIndexes: file_build_progress_proto_depIdxs,
+		MessageInfos:      file_build_progress_proto_msgTypes,
+	}.Build()
+	File_build_progress_proto = out.File
+	file_build_progress_proto_rawDesc = nil
+	file_build_progress_proto_goTypes = nil
+	file_build_progress_proto_depIdxs = nil
 }
diff --git a/ui/status/build_progress_proto/build_progress.proto b/ui/status/build_progress_proto/build_progress.proto
index d78060a..2672622 100644
--- a/ui/status/build_progress_proto/build_progress.proto
+++ b/ui/status/build_progress_proto/build_progress.proto
@@ -15,7 +15,7 @@
 syntax = "proto2";
 
 package soong_build_progress;
-option go_package = "soong_build_progress_proto";
+option go_package = "android/soong/ui/status/build_progress_proto";
 
 message BuildProgress {
   // Total number of actions in a build. The total actions will increase
diff --git a/ui/status/log.go b/ui/status/log.go
index 4a08acb..14df346 100644
--- a/ui/status/log.go
+++ b/ui/status/log.go
@@ -23,11 +23,11 @@
 	"os"
 	"strings"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/proto"
 
 	"android/soong/ui/logger"
-	"android/soong/ui/status/build_error_proto"
-	"android/soong/ui/status/build_progress_proto"
+	soong_build_error_proto "android/soong/ui/status/build_error_proto"
+	soong_build_progress_proto "android/soong/ui/status/build_progress_proto"
 )
 
 type verboseLog struct {
diff --git a/ui/status/ninja.go b/ui/status/ninja.go
index 2445972..4d99621 100644
--- a/ui/status/ninja.go
+++ b/ui/status/ninja.go
@@ -24,7 +24,7 @@
 	"syscall"
 	"time"
 
-	"github.com/golang/protobuf/proto"
+	"google.golang.org/protobuf/proto"
 
 	"android/soong/ui/logger"
 	"android/soong/ui/status/ninja_frontend"
diff --git a/ui/status/ninja_frontend/frontend.pb.go b/ui/status/ninja_frontend/frontend.pb.go
index 86e474b..bcadc67 100644
--- a/ui/status/ninja_frontend/frontend.pb.go
+++ b/ui/status/ninja_frontend/frontend.pb.go
@@ -1,24 +1,38 @@
+// Copyright 2017 Google Inc. All Rights Reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 // Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0
+// 	protoc        v3.9.1
 // source: frontend.proto
 
 package ninja_frontend
 
 import (
-	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	math "math"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
-var _ = proto.Marshal
-var _ = fmt.Errorf
-var _ = math.Inf
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the proto package it is being compiled against.
-// A compilation error at this line likely means your copy of the
-// proto package needs to be updated.
-const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+const (
+	// Verify that this generated code is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+	// Verify that runtime/protoimpl is sufficiently up-to-date.
+	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
 
 type Status_Message_Level int32
 
@@ -29,19 +43,21 @@
 	Status_Message_DEBUG   Status_Message_Level = 3
 )
 
-var Status_Message_Level_name = map[int32]string{
-	0: "INFO",
-	1: "WARNING",
-	2: "ERROR",
-	3: "DEBUG",
-}
-
-var Status_Message_Level_value = map[string]int32{
-	"INFO":    0,
-	"WARNING": 1,
-	"ERROR":   2,
-	"DEBUG":   3,
-}
+// Enum value maps for Status_Message_Level.
+var (
+	Status_Message_Level_name = map[int32]string{
+		0: "INFO",
+		1: "WARNING",
+		2: "ERROR",
+		3: "DEBUG",
+	}
+	Status_Message_Level_value = map[string]int32{
+		"INFO":    0,
+		"WARNING": 1,
+		"ERROR":   2,
+		"DEBUG":   3,
+	}
+)
 
 func (x Status_Message_Level) Enum() *Status_Message_Level {
 	p := new(Status_Message_Level)
@@ -50,222 +66,271 @@
 }
 
 func (x Status_Message_Level) String() string {
-	return proto.EnumName(Status_Message_Level_name, int32(x))
+	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
 }
 
-func (x *Status_Message_Level) UnmarshalJSON(data []byte) error {
-	value, err := proto.UnmarshalJSONEnum(Status_Message_Level_value, data, "Status_Message_Level")
+func (Status_Message_Level) Descriptor() protoreflect.EnumDescriptor {
+	return file_frontend_proto_enumTypes[0].Descriptor()
+}
+
+func (Status_Message_Level) Type() protoreflect.EnumType {
+	return &file_frontend_proto_enumTypes[0]
+}
+
+func (x Status_Message_Level) Number() protoreflect.EnumNumber {
+	return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *Status_Message_Level) UnmarshalJSON(b []byte) error {
+	num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
 	if err != nil {
 		return err
 	}
-	*x = Status_Message_Level(value)
+	*x = Status_Message_Level(num)
 	return nil
 }
 
+// Deprecated: Use Status_Message_Level.Descriptor instead.
 func (Status_Message_Level) EnumDescriptor() ([]byte, []int) {
-	return fileDescriptor_eca3873955a29cfe, []int{0, 5, 0}
+	return file_frontend_proto_rawDescGZIP(), []int{0, 5, 0}
 }
 
 type Status struct {
-	TotalEdges           *Status_TotalEdges    `protobuf:"bytes,1,opt,name=total_edges,json=totalEdges" json:"total_edges,omitempty"`
-	BuildStarted         *Status_BuildStarted  `protobuf:"bytes,2,opt,name=build_started,json=buildStarted" json:"build_started,omitempty"`
-	BuildFinished        *Status_BuildFinished `protobuf:"bytes,3,opt,name=build_finished,json=buildFinished" json:"build_finished,omitempty"`
-	EdgeStarted          *Status_EdgeStarted   `protobuf:"bytes,4,opt,name=edge_started,json=edgeStarted" json:"edge_started,omitempty"`
-	EdgeFinished         *Status_EdgeFinished  `protobuf:"bytes,5,opt,name=edge_finished,json=edgeFinished" json:"edge_finished,omitempty"`
-	Message              *Status_Message       `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}              `json:"-"`
-	XXX_unrecognized     []byte                `json:"-"`
-	XXX_sizecache        int32                 `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	TotalEdges    *Status_TotalEdges    `protobuf:"bytes,1,opt,name=total_edges,json=totalEdges" json:"total_edges,omitempty"`
+	BuildStarted  *Status_BuildStarted  `protobuf:"bytes,2,opt,name=build_started,json=buildStarted" json:"build_started,omitempty"`
+	BuildFinished *Status_BuildFinished `protobuf:"bytes,3,opt,name=build_finished,json=buildFinished" json:"build_finished,omitempty"`
+	EdgeStarted   *Status_EdgeStarted   `protobuf:"bytes,4,opt,name=edge_started,json=edgeStarted" json:"edge_started,omitempty"`
+	EdgeFinished  *Status_EdgeFinished  `protobuf:"bytes,5,opt,name=edge_finished,json=edgeFinished" json:"edge_finished,omitempty"`
+	Message       *Status_Message       `protobuf:"bytes,6,opt,name=message" json:"message,omitempty"`
 }
 
-func (m *Status) Reset()         { *m = Status{} }
-func (m *Status) String() string { return proto.CompactTextString(m) }
-func (*Status) ProtoMessage()    {}
+func (x *Status) Reset() {
+	*x = Status{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_frontend_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Status) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status) ProtoMessage() {}
+
+func (x *Status) ProtoReflect() protoreflect.Message {
+	mi := &file_frontend_proto_msgTypes[0]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status.ProtoReflect.Descriptor instead.
 func (*Status) Descriptor() ([]byte, []int) {
-	return fileDescriptor_eca3873955a29cfe, []int{0}
+	return file_frontend_proto_rawDescGZIP(), []int{0}
 }
 
-func (m *Status) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Status.Unmarshal(m, b)
-}
-func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Status.Marshal(b, m, deterministic)
-}
-func (m *Status) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Status.Merge(m, src)
-}
-func (m *Status) XXX_Size() int {
-	return xxx_messageInfo_Status.Size(m)
-}
-func (m *Status) XXX_DiscardUnknown() {
-	xxx_messageInfo_Status.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Status proto.InternalMessageInfo
-
-func (m *Status) GetTotalEdges() *Status_TotalEdges {
-	if m != nil {
-		return m.TotalEdges
+func (x *Status) GetTotalEdges() *Status_TotalEdges {
+	if x != nil {
+		return x.TotalEdges
 	}
 	return nil
 }
 
-func (m *Status) GetBuildStarted() *Status_BuildStarted {
-	if m != nil {
-		return m.BuildStarted
+func (x *Status) GetBuildStarted() *Status_BuildStarted {
+	if x != nil {
+		return x.BuildStarted
 	}
 	return nil
 }
 
-func (m *Status) GetBuildFinished() *Status_BuildFinished {
-	if m != nil {
-		return m.BuildFinished
+func (x *Status) GetBuildFinished() *Status_BuildFinished {
+	if x != nil {
+		return x.BuildFinished
 	}
 	return nil
 }
 
-func (m *Status) GetEdgeStarted() *Status_EdgeStarted {
-	if m != nil {
-		return m.EdgeStarted
+func (x *Status) GetEdgeStarted() *Status_EdgeStarted {
+	if x != nil {
+		return x.EdgeStarted
 	}
 	return nil
 }
 
-func (m *Status) GetEdgeFinished() *Status_EdgeFinished {
-	if m != nil {
-		return m.EdgeFinished
+func (x *Status) GetEdgeFinished() *Status_EdgeFinished {
+	if x != nil {
+		return x.EdgeFinished
 	}
 	return nil
 }
 
-func (m *Status) GetMessage() *Status_Message {
-	if m != nil {
-		return m.Message
+func (x *Status) GetMessage() *Status_Message {
+	if x != nil {
+		return x.Message
 	}
 	return nil
 }
 
 type Status_TotalEdges struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// New value for total edges in the build.
-	TotalEdges           *uint32  `protobuf:"varint,1,opt,name=total_edges,json=totalEdges" json:"total_edges,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	TotalEdges *uint32 `protobuf:"varint,1,opt,name=total_edges,json=totalEdges" json:"total_edges,omitempty"`
 }
 
-func (m *Status_TotalEdges) Reset()         { *m = Status_TotalEdges{} }
-func (m *Status_TotalEdges) String() string { return proto.CompactTextString(m) }
-func (*Status_TotalEdges) ProtoMessage()    {}
+func (x *Status_TotalEdges) Reset() {
+	*x = Status_TotalEdges{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_frontend_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Status_TotalEdges) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status_TotalEdges) ProtoMessage() {}
+
+func (x *Status_TotalEdges) ProtoReflect() protoreflect.Message {
+	mi := &file_frontend_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status_TotalEdges.ProtoReflect.Descriptor instead.
 func (*Status_TotalEdges) Descriptor() ([]byte, []int) {
-	return fileDescriptor_eca3873955a29cfe, []int{0, 0}
+	return file_frontend_proto_rawDescGZIP(), []int{0, 0}
 }
 
-func (m *Status_TotalEdges) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Status_TotalEdges.Unmarshal(m, b)
-}
-func (m *Status_TotalEdges) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Status_TotalEdges.Marshal(b, m, deterministic)
-}
-func (m *Status_TotalEdges) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Status_TotalEdges.Merge(m, src)
-}
-func (m *Status_TotalEdges) XXX_Size() int {
-	return xxx_messageInfo_Status_TotalEdges.Size(m)
-}
-func (m *Status_TotalEdges) XXX_DiscardUnknown() {
-	xxx_messageInfo_Status_TotalEdges.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Status_TotalEdges proto.InternalMessageInfo
-
-func (m *Status_TotalEdges) GetTotalEdges() uint32 {
-	if m != nil && m.TotalEdges != nil {
-		return *m.TotalEdges
+func (x *Status_TotalEdges) GetTotalEdges() uint32 {
+	if x != nil && x.TotalEdges != nil {
+		return *x.TotalEdges
 	}
 	return 0
 }
 
 type Status_BuildStarted struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Number of jobs Ninja will run in parallel.
 	Parallelism *uint32 `protobuf:"varint,1,opt,name=parallelism" json:"parallelism,omitempty"`
 	// Verbose value passed to ninja.
-	Verbose              *bool    `protobuf:"varint,2,opt,name=verbose" json:"verbose,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Verbose *bool `protobuf:"varint,2,opt,name=verbose" json:"verbose,omitempty"`
 }
 
-func (m *Status_BuildStarted) Reset()         { *m = Status_BuildStarted{} }
-func (m *Status_BuildStarted) String() string { return proto.CompactTextString(m) }
-func (*Status_BuildStarted) ProtoMessage()    {}
+func (x *Status_BuildStarted) Reset() {
+	*x = Status_BuildStarted{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_frontend_proto_msgTypes[2]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Status_BuildStarted) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status_BuildStarted) ProtoMessage() {}
+
+func (x *Status_BuildStarted) ProtoReflect() protoreflect.Message {
+	mi := &file_frontend_proto_msgTypes[2]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status_BuildStarted.ProtoReflect.Descriptor instead.
 func (*Status_BuildStarted) Descriptor() ([]byte, []int) {
-	return fileDescriptor_eca3873955a29cfe, []int{0, 1}
+	return file_frontend_proto_rawDescGZIP(), []int{0, 1}
 }
 
-func (m *Status_BuildStarted) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Status_BuildStarted.Unmarshal(m, b)
-}
-func (m *Status_BuildStarted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Status_BuildStarted.Marshal(b, m, deterministic)
-}
-func (m *Status_BuildStarted) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Status_BuildStarted.Merge(m, src)
-}
-func (m *Status_BuildStarted) XXX_Size() int {
-	return xxx_messageInfo_Status_BuildStarted.Size(m)
-}
-func (m *Status_BuildStarted) XXX_DiscardUnknown() {
-	xxx_messageInfo_Status_BuildStarted.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Status_BuildStarted proto.InternalMessageInfo
-
-func (m *Status_BuildStarted) GetParallelism() uint32 {
-	if m != nil && m.Parallelism != nil {
-		return *m.Parallelism
+func (x *Status_BuildStarted) GetParallelism() uint32 {
+	if x != nil && x.Parallelism != nil {
+		return *x.Parallelism
 	}
 	return 0
 }
 
-func (m *Status_BuildStarted) GetVerbose() bool {
-	if m != nil && m.Verbose != nil {
-		return *m.Verbose
+func (x *Status_BuildStarted) GetVerbose() bool {
+	if x != nil && x.Verbose != nil {
+		return *x.Verbose
 	}
 	return false
 }
 
 type Status_BuildFinished struct {
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 }
 
-func (m *Status_BuildFinished) Reset()         { *m = Status_BuildFinished{} }
-func (m *Status_BuildFinished) String() string { return proto.CompactTextString(m) }
-func (*Status_BuildFinished) ProtoMessage()    {}
+func (x *Status_BuildFinished) Reset() {
+	*x = Status_BuildFinished{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_frontend_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Status_BuildFinished) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status_BuildFinished) ProtoMessage() {}
+
+func (x *Status_BuildFinished) ProtoReflect() protoreflect.Message {
+	mi := &file_frontend_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status_BuildFinished.ProtoReflect.Descriptor instead.
 func (*Status_BuildFinished) Descriptor() ([]byte, []int) {
-	return fileDescriptor_eca3873955a29cfe, []int{0, 2}
+	return file_frontend_proto_rawDescGZIP(), []int{0, 2}
 }
 
-func (m *Status_BuildFinished) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Status_BuildFinished.Unmarshal(m, b)
-}
-func (m *Status_BuildFinished) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Status_BuildFinished.Marshal(b, m, deterministic)
-}
-func (m *Status_BuildFinished) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Status_BuildFinished.Merge(m, src)
-}
-func (m *Status_BuildFinished) XXX_Size() int {
-	return xxx_messageInfo_Status_BuildFinished.Size(m)
-}
-func (m *Status_BuildFinished) XXX_DiscardUnknown() {
-	xxx_messageInfo_Status_BuildFinished.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Status_BuildFinished proto.InternalMessageInfo
-
 type Status_EdgeStarted struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Edge identification number, unique to a Ninja run.
 	Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
 	// Edge start time in milliseconds since Ninja started.
@@ -279,87 +344,95 @@
 	// Command field from the edge.
 	Command *string `protobuf:"bytes,6,opt,name=command" json:"command,omitempty"`
 	// Edge uses console.
-	Console              *bool    `protobuf:"varint,7,opt,name=console" json:"console,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Console *bool `protobuf:"varint,7,opt,name=console" json:"console,omitempty"`
 }
 
-func (m *Status_EdgeStarted) Reset()         { *m = Status_EdgeStarted{} }
-func (m *Status_EdgeStarted) String() string { return proto.CompactTextString(m) }
-func (*Status_EdgeStarted) ProtoMessage()    {}
+func (x *Status_EdgeStarted) Reset() {
+	*x = Status_EdgeStarted{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_frontend_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Status_EdgeStarted) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status_EdgeStarted) ProtoMessage() {}
+
+func (x *Status_EdgeStarted) ProtoReflect() protoreflect.Message {
+	mi := &file_frontend_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status_EdgeStarted.ProtoReflect.Descriptor instead.
 func (*Status_EdgeStarted) Descriptor() ([]byte, []int) {
-	return fileDescriptor_eca3873955a29cfe, []int{0, 3}
+	return file_frontend_proto_rawDescGZIP(), []int{0, 3}
 }
 
-func (m *Status_EdgeStarted) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Status_EdgeStarted.Unmarshal(m, b)
-}
-func (m *Status_EdgeStarted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Status_EdgeStarted.Marshal(b, m, deterministic)
-}
-func (m *Status_EdgeStarted) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Status_EdgeStarted.Merge(m, src)
-}
-func (m *Status_EdgeStarted) XXX_Size() int {
-	return xxx_messageInfo_Status_EdgeStarted.Size(m)
-}
-func (m *Status_EdgeStarted) XXX_DiscardUnknown() {
-	xxx_messageInfo_Status_EdgeStarted.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Status_EdgeStarted proto.InternalMessageInfo
-
-func (m *Status_EdgeStarted) GetId() uint32 {
-	if m != nil && m.Id != nil {
-		return *m.Id
+func (x *Status_EdgeStarted) GetId() uint32 {
+	if x != nil && x.Id != nil {
+		return *x.Id
 	}
 	return 0
 }
 
-func (m *Status_EdgeStarted) GetStartTime() uint32 {
-	if m != nil && m.StartTime != nil {
-		return *m.StartTime
+func (x *Status_EdgeStarted) GetStartTime() uint32 {
+	if x != nil && x.StartTime != nil {
+		return *x.StartTime
 	}
 	return 0
 }
 
-func (m *Status_EdgeStarted) GetInputs() []string {
-	if m != nil {
-		return m.Inputs
+func (x *Status_EdgeStarted) GetInputs() []string {
+	if x != nil {
+		return x.Inputs
 	}
 	return nil
 }
 
-func (m *Status_EdgeStarted) GetOutputs() []string {
-	if m != nil {
-		return m.Outputs
+func (x *Status_EdgeStarted) GetOutputs() []string {
+	if x != nil {
+		return x.Outputs
 	}
 	return nil
 }
 
-func (m *Status_EdgeStarted) GetDesc() string {
-	if m != nil && m.Desc != nil {
-		return *m.Desc
+func (x *Status_EdgeStarted) GetDesc() string {
+	if x != nil && x.Desc != nil {
+		return *x.Desc
 	}
 	return ""
 }
 
-func (m *Status_EdgeStarted) GetCommand() string {
-	if m != nil && m.Command != nil {
-		return *m.Command
+func (x *Status_EdgeStarted) GetCommand() string {
+	if x != nil && x.Command != nil {
+		return *x.Command
 	}
 	return ""
 }
 
-func (m *Status_EdgeStarted) GetConsole() bool {
-	if m != nil && m.Console != nil {
-		return *m.Console
+func (x *Status_EdgeStarted) GetConsole() bool {
+	if x != nil && x.Console != nil {
+		return *x.Console
 	}
 	return false
 }
 
 type Status_EdgeFinished struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Edge identification number, unique to a Ninja run.
 	Id *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
 	// Edge end time in milliseconds since Ninja started.
@@ -385,237 +458,434 @@
 	// Voluntary context switches
 	VoluntaryContextSwitches *uint64 `protobuf:"varint,12,opt,name=voluntary_context_switches,json=voluntaryContextSwitches" json:"voluntary_context_switches,omitempty"`
 	// Involuntary context switches
-	InvoluntaryContextSwitches *uint64  `protobuf:"varint,13,opt,name=involuntary_context_switches,json=involuntaryContextSwitches" json:"involuntary_context_switches,omitempty"`
-	XXX_NoUnkeyedLiteral       struct{} `json:"-"`
-	XXX_unrecognized           []byte   `json:"-"`
-	XXX_sizecache              int32    `json:"-"`
+	InvoluntaryContextSwitches *uint64 `protobuf:"varint,13,opt,name=involuntary_context_switches,json=involuntaryContextSwitches" json:"involuntary_context_switches,omitempty"`
 }
 
-func (m *Status_EdgeFinished) Reset()         { *m = Status_EdgeFinished{} }
-func (m *Status_EdgeFinished) String() string { return proto.CompactTextString(m) }
-func (*Status_EdgeFinished) ProtoMessage()    {}
+func (x *Status_EdgeFinished) Reset() {
+	*x = Status_EdgeFinished{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_frontend_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Status_EdgeFinished) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status_EdgeFinished) ProtoMessage() {}
+
+func (x *Status_EdgeFinished) ProtoReflect() protoreflect.Message {
+	mi := &file_frontend_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status_EdgeFinished.ProtoReflect.Descriptor instead.
 func (*Status_EdgeFinished) Descriptor() ([]byte, []int) {
-	return fileDescriptor_eca3873955a29cfe, []int{0, 4}
+	return file_frontend_proto_rawDescGZIP(), []int{0, 4}
 }
 
-func (m *Status_EdgeFinished) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Status_EdgeFinished.Unmarshal(m, b)
-}
-func (m *Status_EdgeFinished) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Status_EdgeFinished.Marshal(b, m, deterministic)
-}
-func (m *Status_EdgeFinished) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Status_EdgeFinished.Merge(m, src)
-}
-func (m *Status_EdgeFinished) XXX_Size() int {
-	return xxx_messageInfo_Status_EdgeFinished.Size(m)
-}
-func (m *Status_EdgeFinished) XXX_DiscardUnknown() {
-	xxx_messageInfo_Status_EdgeFinished.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Status_EdgeFinished proto.InternalMessageInfo
-
-func (m *Status_EdgeFinished) GetId() uint32 {
-	if m != nil && m.Id != nil {
-		return *m.Id
+func (x *Status_EdgeFinished) GetId() uint32 {
+	if x != nil && x.Id != nil {
+		return *x.Id
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetEndTime() uint32 {
-	if m != nil && m.EndTime != nil {
-		return *m.EndTime
+func (x *Status_EdgeFinished) GetEndTime() uint32 {
+	if x != nil && x.EndTime != nil {
+		return *x.EndTime
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetStatus() int32 {
-	if m != nil && m.Status != nil {
-		return *m.Status
+func (x *Status_EdgeFinished) GetStatus() int32 {
+	if x != nil && x.Status != nil {
+		return *x.Status
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetOutput() string {
-	if m != nil && m.Output != nil {
-		return *m.Output
+func (x *Status_EdgeFinished) GetOutput() string {
+	if x != nil && x.Output != nil {
+		return *x.Output
 	}
 	return ""
 }
 
-func (m *Status_EdgeFinished) GetUserTime() uint32 {
-	if m != nil && m.UserTime != nil {
-		return *m.UserTime
+func (x *Status_EdgeFinished) GetUserTime() uint32 {
+	if x != nil && x.UserTime != nil {
+		return *x.UserTime
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetSystemTime() uint32 {
-	if m != nil && m.SystemTime != nil {
-		return *m.SystemTime
+func (x *Status_EdgeFinished) GetSystemTime() uint32 {
+	if x != nil && x.SystemTime != nil {
+		return *x.SystemTime
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetMaxRssKb() uint64 {
-	if m != nil && m.MaxRssKb != nil {
-		return *m.MaxRssKb
+func (x *Status_EdgeFinished) GetMaxRssKb() uint64 {
+	if x != nil && x.MaxRssKb != nil {
+		return *x.MaxRssKb
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetMinorPageFaults() uint64 {
-	if m != nil && m.MinorPageFaults != nil {
-		return *m.MinorPageFaults
+func (x *Status_EdgeFinished) GetMinorPageFaults() uint64 {
+	if x != nil && x.MinorPageFaults != nil {
+		return *x.MinorPageFaults
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetMajorPageFaults() uint64 {
-	if m != nil && m.MajorPageFaults != nil {
-		return *m.MajorPageFaults
+func (x *Status_EdgeFinished) GetMajorPageFaults() uint64 {
+	if x != nil && x.MajorPageFaults != nil {
+		return *x.MajorPageFaults
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetIoInputKb() uint64 {
-	if m != nil && m.IoInputKb != nil {
-		return *m.IoInputKb
+func (x *Status_EdgeFinished) GetIoInputKb() uint64 {
+	if x != nil && x.IoInputKb != nil {
+		return *x.IoInputKb
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetIoOutputKb() uint64 {
-	if m != nil && m.IoOutputKb != nil {
-		return *m.IoOutputKb
+func (x *Status_EdgeFinished) GetIoOutputKb() uint64 {
+	if x != nil && x.IoOutputKb != nil {
+		return *x.IoOutputKb
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetVoluntaryContextSwitches() uint64 {
-	if m != nil && m.VoluntaryContextSwitches != nil {
-		return *m.VoluntaryContextSwitches
+func (x *Status_EdgeFinished) GetVoluntaryContextSwitches() uint64 {
+	if x != nil && x.VoluntaryContextSwitches != nil {
+		return *x.VoluntaryContextSwitches
 	}
 	return 0
 }
 
-func (m *Status_EdgeFinished) GetInvoluntaryContextSwitches() uint64 {
-	if m != nil && m.InvoluntaryContextSwitches != nil {
-		return *m.InvoluntaryContextSwitches
+func (x *Status_EdgeFinished) GetInvoluntaryContextSwitches() uint64 {
+	if x != nil && x.InvoluntaryContextSwitches != nil {
+		return *x.InvoluntaryContextSwitches
 	}
 	return 0
 }
 
 type Status_Message struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
 	// Message priority level (DEBUG, INFO, WARNING, ERROR).
 	Level *Status_Message_Level `protobuf:"varint,1,opt,name=level,enum=ninja.Status_Message_Level,def=0" json:"level,omitempty"`
 	// Info/warning/error message from Ninja.
-	Message              *string  `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
 }
 
-func (m *Status_Message) Reset()         { *m = Status_Message{} }
-func (m *Status_Message) String() string { return proto.CompactTextString(m) }
-func (*Status_Message) ProtoMessage()    {}
+// Default values for Status_Message fields.
+const (
+	Default_Status_Message_Level = Status_Message_INFO
+)
+
+func (x *Status_Message) Reset() {
+	*x = Status_Message{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_frontend_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Status_Message) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status_Message) ProtoMessage() {}
+
+func (x *Status_Message) ProtoReflect() protoreflect.Message {
+	mi := &file_frontend_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status_Message.ProtoReflect.Descriptor instead.
 func (*Status_Message) Descriptor() ([]byte, []int) {
-	return fileDescriptor_eca3873955a29cfe, []int{0, 5}
+	return file_frontend_proto_rawDescGZIP(), []int{0, 5}
 }
 
-func (m *Status_Message) XXX_Unmarshal(b []byte) error {
-	return xxx_messageInfo_Status_Message.Unmarshal(m, b)
-}
-func (m *Status_Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
-	return xxx_messageInfo_Status_Message.Marshal(b, m, deterministic)
-}
-func (m *Status_Message) XXX_Merge(src proto.Message) {
-	xxx_messageInfo_Status_Message.Merge(m, src)
-}
-func (m *Status_Message) XXX_Size() int {
-	return xxx_messageInfo_Status_Message.Size(m)
-}
-func (m *Status_Message) XXX_DiscardUnknown() {
-	xxx_messageInfo_Status_Message.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_Status_Message proto.InternalMessageInfo
-
-const Default_Status_Message_Level Status_Message_Level = Status_Message_INFO
-
-func (m *Status_Message) GetLevel() Status_Message_Level {
-	if m != nil && m.Level != nil {
-		return *m.Level
+func (x *Status_Message) GetLevel() Status_Message_Level {
+	if x != nil && x.Level != nil {
+		return *x.Level
 	}
 	return Default_Status_Message_Level
 }
 
-func (m *Status_Message) GetMessage() string {
-	if m != nil && m.Message != nil {
-		return *m.Message
+func (x *Status_Message) GetMessage() string {
+	if x != nil && x.Message != nil {
+		return *x.Message
 	}
 	return ""
 }
 
-func init() {
-	proto.RegisterEnum("ninja.Status_Message_Level", Status_Message_Level_name, Status_Message_Level_value)
-	proto.RegisterType((*Status)(nil), "ninja.Status")
-	proto.RegisterType((*Status_TotalEdges)(nil), "ninja.Status.TotalEdges")
-	proto.RegisterType((*Status_BuildStarted)(nil), "ninja.Status.BuildStarted")
-	proto.RegisterType((*Status_BuildFinished)(nil), "ninja.Status.BuildFinished")
-	proto.RegisterType((*Status_EdgeStarted)(nil), "ninja.Status.EdgeStarted")
-	proto.RegisterType((*Status_EdgeFinished)(nil), "ninja.Status.EdgeFinished")
-	proto.RegisterType((*Status_Message)(nil), "ninja.Status.Message")
+var File_frontend_proto protoreflect.FileDescriptor
+
+var file_frontend_proto_rawDesc = []byte{
+	0x0a, 0x0e, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x12, 0x05, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x22, 0xb4, 0x0a, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74,
+	0x75, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x64, 0x67, 0x65,
+	0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x2e,
+	0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65,
+	0x73, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a,
+	0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x2e, 0x53, 0x74, 0x61,
+	0x74, 0x75, 0x73, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64,
+	0x52, 0x0c, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x42,
+	0x0a, 0x0e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x2e, 0x53,
+	0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x46, 0x69, 0x6e, 0x69, 0x73,
+	0x68, 0x65, 0x64, 0x52, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68,
+	0x65, 0x64, 0x12, 0x3c, 0x0a, 0x0c, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74,
+	0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61,
+	0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x53, 0x74, 0x61, 0x72,
+	0x74, 0x65, 0x64, 0x52, 0x0b, 0x65, 0x64, 0x67, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64,
+	0x12, 0x3f, 0x0a, 0x0d, 0x65, 0x64, 0x67, 0x65, 0x5f, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65,
+	0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x2e,
+	0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x45, 0x64, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73,
+	0x68, 0x65, 0x64, 0x52, 0x0c, 0x65, 0x64, 0x67, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65,
+	0x64, 0x12, 0x2f, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75,
+	0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x1a, 0x2d, 0x0a, 0x0a, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65, 0x73,
+	0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x64, 0x67, 0x65,
+	0x73, 0x1a, 0x4a, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65,
+	0x64, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c, 0x69, 0x73, 0x6d,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x61, 0x6c, 0x6c, 0x65, 0x6c,
+	0x69, 0x73, 0x6d, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x1a, 0x0f, 0x0a,
+	0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x1a, 0xb6,
+	0x01, 0x0a, 0x0b, 0x45, 0x64, 0x67, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x0e,
+	0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1d,
+	0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x0d, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a,
+	0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x69,
+	0x6e, 0x70, 0x75, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73,
+	0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12,
+	0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64,
+	0x65, 0x73, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x06,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x18, 0x0a,
+	0x07, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
+	0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x1a, 0xdf, 0x03, 0x0a, 0x0c, 0x45, 0x64, 0x67, 0x65,
+	0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f,
+	0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54,
+	0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20,
+	0x01, 0x28, 0x11, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f,
+	0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74,
+	0x70, 0x75, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+	0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65,
+	0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
+	0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d,
+	0x65, 0x12, 0x1c, 0x0a, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x73, 0x73, 0x5f, 0x6b, 0x62, 0x18,
+	0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x52, 0x73, 0x73, 0x4b, 0x62, 0x12,
+	0x2a, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61,
+	0x75, 0x6c, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x69, 0x6e, 0x6f,
+	0x72, 0x50, 0x61, 0x67, 0x65, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6d,
+	0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73,
+	0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x50, 0x61, 0x67,
+	0x65, 0x46, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x69, 0x6f, 0x5f, 0x69, 0x6e,
+	0x70, 0x75, 0x74, 0x5f, 0x6b, 0x62, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x69, 0x6f,
+	0x49, 0x6e, 0x70, 0x75, 0x74, 0x4b, 0x62, 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x6f, 0x5f, 0x6f, 0x75,
+	0x74, 0x70, 0x75, 0x74, 0x5f, 0x6b, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69,
+	0x6f, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4b, 0x62, 0x12, 0x3c, 0x0a, 0x1a, 0x76, 0x6f, 0x6c,
+	0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73,
+	0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x18, 0x76,
+	0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53,
+	0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x1c, 0x69, 0x6e, 0x76, 0x6f, 0x6c,
+	0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73,
+	0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x69,
+	0x6e, 0x76, 0x6f, 0x6c, 0x75, 0x6e, 0x74, 0x61, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+	0x74, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x65, 0x73, 0x1a, 0x92, 0x01, 0x0a, 0x07, 0x4d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x6e, 0x69, 0x6e, 0x6a, 0x61, 0x2e, 0x53, 0x74, 0x61,
+	0x74, 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x4c, 0x65, 0x76, 0x65,
+	0x6c, 0x3a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x18,
+	0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x34, 0x0a, 0x05, 0x4c, 0x65, 0x76, 0x65,
+	0x6c, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57,
+	0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f,
+	0x52, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x45, 0x42, 0x55, 0x47, 0x10, 0x03, 0x42, 0x2a,
+	0x48, 0x03, 0x5a, 0x26, 0x61, 0x6e, 0x64, 0x72, 0x6f, 0x69, 0x64, 0x2f, 0x73, 0x6f, 0x6f, 0x6e,
+	0x67, 0x2f, 0x75, 0x69, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x6e, 0x69, 0x6e, 0x6a,
+	0x61, 0x5f, 0x66, 0x72, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x64,
 }
 
-func init() {
-	proto.RegisterFile("frontend.proto", fileDescriptor_eca3873955a29cfe)
+var (
+	file_frontend_proto_rawDescOnce sync.Once
+	file_frontend_proto_rawDescData = file_frontend_proto_rawDesc
+)
+
+func file_frontend_proto_rawDescGZIP() []byte {
+	file_frontend_proto_rawDescOnce.Do(func() {
+		file_frontend_proto_rawDescData = protoimpl.X.CompressGZIP(file_frontend_proto_rawDescData)
+	})
+	return file_frontend_proto_rawDescData
 }
 
-var fileDescriptor_eca3873955a29cfe = []byte{
-	// 678 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0xff, 0x4e, 0xd4, 0x40,
-	0x10, 0xc7, 0xbd, 0xdf, 0xd7, 0xe9, 0xdd, 0x71, 0x6c, 0xa2, 0x29, 0x05, 0xe5, 0xc2, 0x5f, 0xc4,
-	0xc4, 0x33, 0x31, 0x26, 0x46, 0x43, 0xa2, 0x9e, 0x02, 0x22, 0x0a, 0x66, 0xc1, 0x98, 0xf8, 0x4f,
-	0xb3, 0xbd, 0x2e, 0xb0, 0xd8, 0x76, 0x2f, 0xdd, 0x2d, 0xc2, 0x6b, 0xf8, 0x2c, 0xc6, 0xd7, 0xf1,
-	0x55, 0xcc, 0xce, 0xb6, 0x47, 0x0f, 0x88, 0xff, 0x75, 0x66, 0x3e, 0xf3, 0x9d, 0xd9, 0x99, 0xed,
-	0xc2, 0xe0, 0x24, 0x93, 0xa9, 0xe6, 0x69, 0x34, 0x9e, 0x65, 0x52, 0x4b, 0xd2, 0x4a, 0x45, 0x7a,
-	0xce, 0x36, 0x7e, 0x03, 0xb4, 0x8f, 0x34, 0xd3, 0xb9, 0x22, 0x2f, 0xc1, 0xd5, 0x52, 0xb3, 0x38,
-	0xe0, 0xd1, 0x29, 0x57, 0x5e, 0x6d, 0x54, 0xdb, 0x74, 0x9f, 0x79, 0x63, 0xe4, 0xc6, 0x96, 0x19,
-	0x1f, 0x1b, 0x60, 0xdb, 0xc4, 0x29, 0xe8, 0xf9, 0x37, 0x79, 0x0d, 0xfd, 0x30, 0x17, 0x71, 0x14,
-	0x28, 0xcd, 0x32, 0xcd, 0x23, 0xaf, 0x8e, 0xc9, 0xfe, 0x62, 0xf2, 0xc4, 0x20, 0x47, 0x96, 0xa0,
-	0xbd, 0xb0, 0x62, 0x91, 0x09, 0x0c, 0xac, 0xc0, 0x89, 0x48, 0x85, 0x3a, 0xe3, 0x91, 0xd7, 0x40,
-	0x85, 0xd5, 0x3b, 0x14, 0x76, 0x0a, 0x84, 0xda, 0x9a, 0xa5, 0x49, 0xb6, 0xa0, 0x67, 0x3a, 0x9f,
-	0xf7, 0xd0, 0x44, 0x85, 0x95, 0x45, 0x05, 0xd3, 0x6f, 0xd9, 0x82, 0xcb, 0xaf, 0x0d, 0x73, 0x04,
-	0xcc, 0x9e, 0x37, 0xd0, 0xba, 0xeb, 0x08, 0x26, 0x7d, 0x5e, 0x1f, 0xcb, 0xcd, 0xcb, 0x3f, 0x85,
-	0x4e, 0xc2, 0x95, 0x62, 0xa7, 0xdc, 0x6b, 0x63, 0xea, 0xfd, 0xc5, 0xd4, 0xcf, 0x36, 0x48, 0x4b,
-	0xca, 0x7f, 0x02, 0x70, 0x3d, 0x4e, 0xb2, 0x7e, 0x7b, 0xfa, 0xfd, 0xea, 0x8c, 0xfd, 0x8f, 0xd0,
-	0xab, 0x0e, 0x90, 0x8c, 0xc0, 0x9d, 0xb1, 0x8c, 0xc5, 0x31, 0x8f, 0x85, 0x4a, 0x8a, 0x84, 0xaa,
-	0x8b, 0x78, 0xd0, 0xb9, 0xe0, 0x59, 0x28, 0x15, 0xc7, 0x7d, 0x74, 0x69, 0x69, 0xfa, 0x4b, 0xd0,
-	0x5f, 0x18, 0xa5, 0xff, 0xa7, 0x06, 0x6e, 0x65, 0x34, 0x64, 0x00, 0x75, 0x11, 0x15, 0x9a, 0x75,
-	0x11, 0x91, 0x87, 0x00, 0x38, 0xd6, 0x40, 0x8b, 0xc4, 0xaa, 0xf5, 0xa9, 0x83, 0x9e, 0x63, 0x91,
-	0x70, 0xf2, 0x00, 0xda, 0x22, 0x9d, 0xe5, 0x5a, 0x79, 0x8d, 0x51, 0x63, 0xd3, 0xa1, 0x85, 0x65,
-	0x3a, 0x90, 0xb9, 0xc6, 0x40, 0x13, 0x03, 0xa5, 0x49, 0x08, 0x34, 0x23, 0xae, 0xa6, 0x38, 0x65,
-	0x87, 0xe2, 0xb7, 0xa1, 0xa7, 0x32, 0x49, 0x58, 0x1a, 0xe1, 0x04, 0x1d, 0x5a, 0x9a, 0x36, 0x92,
-	0x2a, 0x19, 0x73, 0xaf, 0x63, 0x4f, 0x52, 0x98, 0xfe, 0xdf, 0x06, 0xf4, 0xaa, 0x4b, 0xb9, 0xd5,
-	0xf9, 0x0a, 0x74, 0x79, 0x1a, 0x55, 0xfb, 0xee, 0xf0, 0x34, 0x2a, 0xbb, 0x56, 0xb8, 0x1b, 0xbc,
-	0x6c, 0xcb, 0xb4, 0xb0, 0x8c, 0xdf, 0xb6, 0x89, 0x57, 0xc8, 0xa1, 0x85, 0x45, 0x56, 0xc1, 0xc9,
-	0x15, 0xcf, 0xac, 0x56, 0x0b, 0xb5, 0xba, 0xc6, 0x81, 0x62, 0xeb, 0xe0, 0xaa, 0x2b, 0xa5, 0x79,
-	0x62, 0xc3, 0x6d, 0xbb, 0x3f, 0xeb, 0x42, 0x60, 0x0d, 0x20, 0x61, 0x97, 0x41, 0xa6, 0x54, 0xf0,
-	0x23, 0xc4, 0x63, 0x34, 0x69, 0x37, 0x61, 0x97, 0x54, 0xa9, 0xfd, 0x90, 0x3c, 0x86, 0xe5, 0x44,
-	0xa4, 0x32, 0x0b, 0x66, 0xcc, 0x5c, 0x42, 0x96, 0xc7, 0x5a, 0x79, 0x5d, 0x84, 0x96, 0x30, 0xf0,
-	0x85, 0x9d, 0xf2, 0x1d, 0x74, 0x23, 0xcb, 0xce, 0x6f, 0xb0, 0x4e, 0xc1, 0x9a, 0x40, 0x85, 0x7d,
-	0x04, 0xae, 0x90, 0x01, 0xae, 0xc3, 0x94, 0x05, 0xa4, 0x1c, 0x21, 0xf7, 0x8c, 0x67, 0x3f, 0x24,
-	0x23, 0xe8, 0x09, 0x19, 0xd8, 0x03, 0x1a, 0xc0, 0x45, 0x00, 0x84, 0x3c, 0x44, 0xd7, 0x7e, 0x48,
-	0xb6, 0xc0, 0xbf, 0x90, 0x71, 0x9e, 0x6a, 0x96, 0x5d, 0x05, 0x53, 0xf3, 0x86, 0x5c, 0xea, 0x40,
-	0xfd, 0x14, 0x7a, 0x7a, 0xc6, 0x95, 0xd7, 0x43, 0xde, 0x9b, 0x13, 0xef, 0x2c, 0x70, 0x54, 0xc4,
-	0xc9, 0x1b, 0x58, 0x13, 0xe9, 0x7f, 0xf2, 0xfb, 0x98, 0xef, 0x57, 0x98, 0x1b, 0x0a, 0xfe, 0xaf,
-	0x1a, 0x74, 0x8a, 0x7f, 0x87, 0xbc, 0x80, 0x56, 0xcc, 0x2f, 0x78, 0x8c, 0xfb, 0x1d, 0xdc, 0x7c,
-	0x1d, 0x0a, 0x6a, 0xfc, 0xc9, 0x20, 0xaf, 0x9a, 0x7b, 0x07, 0x3b, 0x87, 0xd4, 0xf2, 0xe6, 0x02,
-	0x95, 0x3f, 0x67, 0xdd, 0x5e, 0xad, 0xc2, 0xdc, 0x78, 0x0e, 0x2d, 0xe4, 0x49, 0x17, 0x30, 0x63,
-	0x78, 0x8f, 0xb8, 0xd0, 0xf9, 0xf6, 0x96, 0x1e, 0xec, 0x1d, 0xec, 0x0e, 0x6b, 0xc4, 0x81, 0xd6,
-	0x36, 0xa5, 0x87, 0x74, 0x58, 0x37, 0x9f, 0xef, 0xb7, 0x27, 0x5f, 0x77, 0x87, 0x8d, 0x09, 0xf9,
-	0xd0, 0xf8, 0x3e, 0xc0, 0xe2, 0x41, 0xf9, 0xae, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x7a,
-	0x33, 0x13, 0x62, 0x05, 0x00, 0x00,
+var file_frontend_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_frontend_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_frontend_proto_goTypes = []interface{}{
+	(Status_Message_Level)(0),    // 0: ninja.Status.Message.Level
+	(*Status)(nil),               // 1: ninja.Status
+	(*Status_TotalEdges)(nil),    // 2: ninja.Status.TotalEdges
+	(*Status_BuildStarted)(nil),  // 3: ninja.Status.BuildStarted
+	(*Status_BuildFinished)(nil), // 4: ninja.Status.BuildFinished
+	(*Status_EdgeStarted)(nil),   // 5: ninja.Status.EdgeStarted
+	(*Status_EdgeFinished)(nil),  // 6: ninja.Status.EdgeFinished
+	(*Status_Message)(nil),       // 7: ninja.Status.Message
+}
+var file_frontend_proto_depIdxs = []int32{
+	2, // 0: ninja.Status.total_edges:type_name -> ninja.Status.TotalEdges
+	3, // 1: ninja.Status.build_started:type_name -> ninja.Status.BuildStarted
+	4, // 2: ninja.Status.build_finished:type_name -> ninja.Status.BuildFinished
+	5, // 3: ninja.Status.edge_started:type_name -> ninja.Status.EdgeStarted
+	6, // 4: ninja.Status.edge_finished:type_name -> ninja.Status.EdgeFinished
+	7, // 5: ninja.Status.message:type_name -> ninja.Status.Message
+	0, // 6: ninja.Status.Message.level:type_name -> ninja.Status.Message.Level
+	7, // [7:7] is the sub-list for method output_type
+	7, // [7:7] is the sub-list for method input_type
+	7, // [7:7] is the sub-list for extension type_name
+	7, // [7:7] is the sub-list for extension extendee
+	0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_frontend_proto_init() }
+func file_frontend_proto_init() {
+	if File_frontend_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_frontend_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Status); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_frontend_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Status_TotalEdges); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_frontend_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Status_BuildStarted); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_frontend_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Status_BuildFinished); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_frontend_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Status_EdgeStarted); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_frontend_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Status_EdgeFinished); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_frontend_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Status_Message); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_frontend_proto_rawDesc,
+			NumEnums:      1,
+			NumMessages:   7,
+			NumExtensions: 0,
+			NumServices:   0,
+		},
+		GoTypes:           file_frontend_proto_goTypes,
+		DependencyIndexes: file_frontend_proto_depIdxs,
+		EnumInfos:         file_frontend_proto_enumTypes,
+		MessageInfos:      file_frontend_proto_msgTypes,
+	}.Build()
+	File_frontend_proto = out.File
+	file_frontend_proto_rawDesc = nil
+	file_frontend_proto_goTypes = nil
+	file_frontend_proto_depIdxs = nil
 }
diff --git a/ui/status/ninja_frontend/frontend.proto b/ui/status/ninja_frontend/frontend.proto
index e5e5d9f..5730388 100644
--- a/ui/status/ninja_frontend/frontend.proto
+++ b/ui/status/ninja_frontend/frontend.proto
@@ -17,7 +17,7 @@
 option optimize_for = LITE_RUNTIME;
 
 package ninja;
-option go_package = "ninja_frontend";
+option go_package = "android/soong/ui/status/ninja_frontend";
 
 message Status {
   message TotalEdges {
