Files
2023-03-12 20:34:16 +00:00

343 lines
12 KiB
C#

// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: mediapipe/util/label_map.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Mediapipe {
/// <summary>Holder for reflection information generated from mediapipe/util/label_map.proto</summary>
public static partial class LabelMapReflection {
#region Descriptor
/// <summary>File descriptor for mediapipe/util/label_map.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static LabelMapReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch5tZWRpYXBpcGUvdXRpbC9sYWJlbF9tYXAucHJvdG8SCW1lZGlhcGlwZSJG",
"CgxMYWJlbE1hcEl0ZW0SDAoEbmFtZRgBIAEoCRIUCgxkaXNwbGF5X25hbWUY",
"AiABKAkSEgoKY2hpbGRfbmFtZRgDIAMoCQ=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Mediapipe.LabelMapItem), global::Mediapipe.LabelMapItem.Parser, new[]{ "Name", "DisplayName", "ChildName" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
/// <summary>
/// Mapping a numerical class index output to a Knowledge Graph entity
/// ID or any other string label representing this class. Optionally it is
/// possible to specify an additional display name (in a given language) which is
/// typically used for display purposes.
/// </summary>
public sealed partial class LabelMapItem : pb::IMessage<LabelMapItem>
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
, pb::IBufferMessage
#endif
{
private static readonly pb::MessageParser<LabelMapItem> _parser = new pb::MessageParser<LabelMapItem>(() => new LabelMapItem());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pb::MessageParser<LabelMapItem> Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public static pbr::MessageDescriptor Descriptor {
get { return global::Mediapipe.LabelMapReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public LabelMapItem() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public LabelMapItem(LabelMapItem other) : this() {
name_ = other.name_;
displayName_ = other.displayName_;
childName_ = other.childName_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public LabelMapItem Clone() {
return new LabelMapItem(this);
}
/// <summary>Field number for the "name" field.</summary>
public const int NameFieldNumber = 1;
private readonly static string NameDefaultValue = "";
private string name_;
/// <summary>
/// Label name.
/// E.g. name = "/m/02xwb"
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string Name {
get { return name_ ?? NameDefaultValue; }
set {
name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Gets whether the "name" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasName {
get { return name_ != null; }
}
/// <summary>Clears the value of the "name" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearName() {
name_ = null;
}
/// <summary>Field number for the "display_name" field.</summary>
public const int DisplayNameFieldNumber = 2;
private readonly static string DisplayNameDefaultValue = "";
private string displayName_;
/// <summary>
/// Display name.
/// E.g. display_name = "Fruit"
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public string DisplayName {
get { return displayName_ ?? DisplayNameDefaultValue; }
set {
displayName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// <summary>Gets whether the "display_name" field is set</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool HasDisplayName {
get { return displayName_ != null; }
}
/// <summary>Clears the value of the "display_name" field</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void ClearDisplayName() {
displayName_ = null;
}
/// <summary>Field number for the "child_name" field.</summary>
public const int ChildNameFieldNumber = 3;
private static readonly pb::FieldCodec<string> _repeated_childName_codec
= pb::FieldCodec.ForString(26);
private readonly pbc::RepeatedField<string> childName_ = new pbc::RepeatedField<string>();
/// <summary>
/// Optional list of children (e.g. subcategories) used to represent a
/// hierarchy.
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public pbc::RepeatedField<string> ChildName {
get { return childName_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override bool Equals(object other) {
return Equals(other as LabelMapItem);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public bool Equals(LabelMapItem other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Name != other.Name) return false;
if (DisplayName != other.DisplayName) return false;
if(!childName_.Equals(other.childName_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override int GetHashCode() {
int hash = 1;
if (HasName) hash ^= Name.GetHashCode();
if (HasDisplayName) hash ^= DisplayName.GetHashCode();
hash ^= childName_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void WriteTo(pb::CodedOutputStream output) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
output.WriteRawMessage(this);
#else
if (HasName) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (HasDisplayName) {
output.WriteRawTag(18);
output.WriteString(DisplayName);
}
childName_.WriteTo(output, _repeated_childName_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
if (HasName) {
output.WriteRawTag(10);
output.WriteString(Name);
}
if (HasDisplayName) {
output.WriteRawTag(18);
output.WriteString(DisplayName);
}
childName_.WriteTo(ref output, _repeated_childName_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(ref output);
}
}
#endif
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public int CalculateSize() {
int size = 0;
if (HasName) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
}
if (HasDisplayName) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(DisplayName);
}
size += childName_.CalculateSize(_repeated_childName_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(LabelMapItem other) {
if (other == null) {
return;
}
if (other.HasName) {
Name = other.Name;
}
if (other.HasDisplayName) {
DisplayName = other.DisplayName;
}
childName_.Add(other.childName_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
public void MergeFrom(pb::CodedInputStream input) {
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
input.ReadRawMessage(this);
#else
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
DisplayName = input.ReadString();
break;
}
case 26: {
childName_.AddEntriesFrom(input, _repeated_childName_codec);
break;
}
}
}
#endif
}
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
break;
case 10: {
Name = input.ReadString();
break;
}
case 18: {
DisplayName = input.ReadString();
break;
}
case 26: {
childName_.AddEntriesFrom(ref input, _repeated_childName_codec);
break;
}
}
}
}
#endif
}
#endregion
}
#endregion Designer generated code