VOL-3510:Implement Device Management Interface (dmi) on bbsim
Change-Id: If3ff7e8b085b173fd44a37bd005cc2087dff4c63
diff --git a/vendor/google.golang.org/protobuf/internal/detectknown/detect.go b/vendor/google.golang.org/protobuf/internal/detectknown/detect.go
new file mode 100644
index 0000000..091c423
--- /dev/null
+++ b/vendor/google.golang.org/protobuf/internal/detectknown/detect.go
@@ -0,0 +1,47 @@
+// Copyright 2020 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package detectknown provides functionality for detecting well-known types
+// and identifying them by name.
+package detectknown
+
+import "google.golang.org/protobuf/reflect/protoreflect"
+
+type ProtoFile int
+
+const (
+ Unknown ProtoFile = iota
+ AnyProto
+ TimestampProto
+ DurationProto
+ WrappersProto
+ StructProto
+ FieldMaskProto
+ EmptyProto
+)
+
+var wellKnownTypes = map[protoreflect.FullName]ProtoFile{
+ "google.protobuf.Any": AnyProto,
+ "google.protobuf.Timestamp": TimestampProto,
+ "google.protobuf.Duration": DurationProto,
+ "google.protobuf.BoolValue": WrappersProto,
+ "google.protobuf.Int32Value": WrappersProto,
+ "google.protobuf.Int64Value": WrappersProto,
+ "google.protobuf.UInt32Value": WrappersProto,
+ "google.protobuf.UInt64Value": WrappersProto,
+ "google.protobuf.FloatValue": WrappersProto,
+ "google.protobuf.DoubleValue": WrappersProto,
+ "google.protobuf.BytesValue": WrappersProto,
+ "google.protobuf.StringValue": WrappersProto,
+ "google.protobuf.Struct": StructProto,
+ "google.protobuf.ListValue": StructProto,
+ "google.protobuf.Value": StructProto,
+ "google.protobuf.FieldMask": FieldMaskProto,
+ "google.protobuf.Empty": EmptyProto,
+}
+
+// Which identifies the proto file that a well-known type belongs to.
+func Which(s protoreflect.FullName) ProtoFile {
+ return wellKnownTypes[s]
+}