From 4b323af873d750c1cbacfddabffb28118c2f2cd3 Mon Sep 17 00:00:00 2001 From: Malachy Byrne Date: Fri, 24 Mar 2023 14:44:16 +0000 Subject: [PATCH] changed packaging for easier importing --- src/backend/{pb => }/components.pb.go | 57 +++++---- src/common/proto/components.proto | 10 +- src/common/proto/gen.sh | 2 +- src/frontend/pb/Components.cs | 172 +++++++++++++------------- 4 files changed, 120 insertions(+), 121 deletions(-) rename src/backend/{pb => }/components.pb.go (91%) diff --git a/src/backend/pb/components.pb.go b/src/backend/components.pb.go similarity index 91% rename from src/backend/pb/components.pb.go rename to src/backend/components.pb.go index 753cfe6..c790f84 100644 --- a/src/backend/pb/components.pb.go +++ b/src/backend/components.pb.go @@ -4,7 +4,7 @@ // protoc v3.21.12 // source: components.proto -package proto +package main import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -181,8 +181,8 @@ type TextComponent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"` Websocket bool `protobuf:"varint,4,opt,name=websocket,proto3" json:"websocket,omitempty"` } @@ -219,6 +219,13 @@ func (*TextComponent) Descriptor() ([]byte, []int) { return file_components_proto_rawDescGZIP(), []int{2} } +func (x *TextComponent) GetId() string { + if x != nil { + return x.Id + } + return "" +} + func (x *TextComponent) GetName() string { if x != nil { return x.Name @@ -226,13 +233,6 @@ func (x *TextComponent) GetName() string { return "" } -func (x *TextComponent) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - func (x *TextComponent) GetText() string { if x != nil { return x.Text @@ -252,8 +252,8 @@ type ChartComponent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` Labels []string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"` Values []int32 `protobuf:"varint,5,rep,packed,name=values,proto3" json:"values,omitempty"` @@ -292,13 +292,6 @@ func (*ChartComponent) Descriptor() ([]byte, []int) { return file_components_proto_rawDescGZIP(), []int{3} } -func (x *ChartComponent) GetName() string { - if x != nil { - return x.Name - } - return "" -} - func (x *ChartComponent) GetId() int32 { if x != nil { return x.Id @@ -306,6 +299,13 @@ func (x *ChartComponent) GetId() int32 { return 0 } +func (x *ChartComponent) GetName() string { + if x != nil { + return x.Name + } + return "" +} + func (x *ChartComponent) GetType() string { if x != nil { return x.Type @@ -349,16 +349,16 @@ var file_components_proto_rawDesc = []byte{ 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x61, 0x6e, 0x6f, 0x70, 0x74, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x65, 0x0a, 0x0d, 0x54, 0x65, 0x78, - 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, + 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, @@ -367,10 +367,9 @@ var file_components_proto_rawDesc = []byte{ 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x2a, 0x24, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x65, 0x78, 0x74, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x68, 0x61, 0x72, 0x74, 0x10, 0x01, 0x42, - 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x2e, 0x6d, 0x61, 0x6c, 0x61, 0x63, 0x68, 0x79, 0x2e, 0x69, - 0x65, 0x2f, 0x6d, 0x61, 0x6c, 0x6d, 0x61, 0x6c, 0x32, 0x30, 0x30, 0x2f, 0x70, 0x61, 0x6e, 0x6f, - 0x70, 0x74, 0x65, 0x73, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x5a, 0x1e, 0x70, 0x61, 0x6e, 0x6f, 0x70, 0x74, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x73, 0x72, 0x63, 0x2f, 0x70, 0x61, 0x6e, 0x6f, 0x70, 0x74, 0x65, 0x73, 0x2f, 0x6d, 0x61, 0x69, + 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/src/common/proto/components.proto b/src/common/proto/components.proto index 53f1d03..3065a4d 100644 --- a/src/common/proto/components.proto +++ b/src/common/proto/components.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package panoptes; -option go_package = "git.malachy.ie/malmal200/panoptes/src/common/proto"; +option go_package = "panoptes.com/src/panoptes/main"; enum ComponentType { Text = 0; @@ -19,15 +19,15 @@ message Schema { } message TextComponent { - string name = 1; - int32 id = 2; + string id = 1; + string name = 2; string text = 3; bool websocket = 4; } message ChartComponent { - string name = 1; - int32 id = 2; + int32 id = 1; + string name = 2; string type = 3; repeated string labels = 4; repeated int32 values = 5; diff --git a/src/common/proto/gen.sh b/src/common/proto/gen.sh index 7fcf7aa..a5a5bcd 100755 --- a/src/common/proto/gen.sh +++ b/src/common/proto/gen.sh @@ -1,2 +1,2 @@ -protoc -I=$(pwd) --go_out=../../backend/pb/ --go_opt=paths=source_relative components.proto +protoc -I=$(pwd) --go_out=../../backend/ --go_opt=paths=source_relative components.proto protoc -I=$(pwd) --csharp_out=../../frontend/pb/ components.proto diff --git a/src/frontend/pb/Components.cs b/src/frontend/pb/Components.cs index f6ff3d1..830d0d9 100644 --- a/src/frontend/pb/Components.cs +++ b/src/frontend/pb/Components.cs @@ -27,20 +27,20 @@ namespace Panoptes { "ChBjb21wb25lbnRzLnByb3RvEghwYW5vcHRlcyJMCglDb21wb25lbnQSCgoC", "aWQYASABKAkSDAoEbmFtZRgCIAEoCRIlCgR0eXBlGAMgASgOMhcucGFub3B0", "ZXMuQ29tcG9uZW50VHlwZSIxCgZTY2hlbWESJwoKY29tcG9uZW50cxgBIAMo", - "CzITLnBhbm9wdGVzLkNvbXBvbmVudCJKCg1UZXh0Q29tcG9uZW50EgwKBG5h", - "bWUYASABKAkSCgoCaWQYAiABKAUSDAoEdGV4dBgDIAEoCRIRCgl3ZWJzb2Nr", - "ZXQYBCABKAgiawoOQ2hhcnRDb21wb25lbnQSDAoEbmFtZRgBIAEoCRIKCgJp", - "ZBgCIAEoBRIMCgR0eXBlGAMgASgJEg4KBmxhYmVscxgEIAMoCRIOCgZ2YWx1", + "CzITLnBhbm9wdGVzLkNvbXBvbmVudCJKCg1UZXh0Q29tcG9uZW50EgoKAmlk", + "GAEgASgJEgwKBG5hbWUYAiABKAkSDAoEdGV4dBgDIAEoCRIRCgl3ZWJzb2Nr", + "ZXQYBCABKAgiawoOQ2hhcnRDb21wb25lbnQSCgoCaWQYASABKAUSDAoEbmFt", + "ZRgCIAEoCRIMCgR0eXBlGAMgASgJEg4KBmxhYmVscxgEIAMoCRIOCgZ2YWx1", "ZXMYBSADKAUSEQoJd2Vic29ja2V0GAYgASgIKiQKDUNvbXBvbmVudFR5cGUS", - "CAoEVGV4dBAAEgkKBUNoYXJ0EAFCNFoyZ2l0Lm1hbGFjaHkuaWUvbWFsbWFs", - "MjAwL3Bhbm9wdGVzL3NyYy9jb21tb24vcHJvdG9iBnByb3RvMw==")); + "CAoEVGV4dBAAEgkKBUNoYXJ0EAFCIFoecGFub3B0ZXMuY29tL3NyYy9wYW5v", + "cHRlcy9tYWluYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Panoptes.ComponentType), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Panoptes.Component), global::Panoptes.Component.Parser, new[]{ "Id", "Name", "Type" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Panoptes.Schema), global::Panoptes.Schema.Parser, new[]{ "Components" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Panoptes.TextComponent), global::Panoptes.TextComponent.Parser, new[]{ "Name", "Id", "Text", "Websocket" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Panoptes.ChartComponent), global::Panoptes.ChartComponent.Parser, new[]{ "Name", "Id", "Type", "Labels", "Values", "Websocket" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Panoptes.TextComponent), global::Panoptes.TextComponent.Parser, new[]{ "Id", "Name", "Text", "Websocket" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Panoptes.ChartComponent), global::Panoptes.ChartComponent.Parser, new[]{ "Id", "Name", "Type", "Labels", "Values", "Websocket" }, null, null, null, null) })); } #endregion @@ -530,8 +530,8 @@ namespace Panoptes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TextComponent(TextComponent other) : this() { - name_ = other.name_; id_ = other.id_; + name_ = other.name_; text_ = other.text_; websocket_ = other.websocket_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); @@ -543,8 +543,20 @@ namespace Panoptes { return new TextComponent(this); } + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private string id_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Field number for the "name" field. - public const int NameFieldNumber = 1; + public const int NameFieldNumber = 2; private string name_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -555,18 +567,6 @@ namespace Panoptes { } } - /// Field number for the "id" field. - public const int IdFieldNumber = 2; - private int id_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Id { - get { return id_; } - set { - id_ = value; - } - } - /// Field number for the "text" field. public const int TextFieldNumber = 3; private string text_ = ""; @@ -606,8 +606,8 @@ namespace Panoptes { if (ReferenceEquals(other, this)) { return true; } - if (Name != other.Name) return false; if (Id != other.Id) return false; + if (Name != other.Name) return false; if (Text != other.Text) return false; if (Websocket != other.Websocket) return false; return Equals(_unknownFields, other._unknownFields); @@ -617,8 +617,8 @@ namespace Panoptes { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; + if (Id.Length != 0) hash ^= Id.GetHashCode(); if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (Id != 0) hash ^= Id.GetHashCode(); if (Text.Length != 0) hash ^= Text.GetHashCode(); if (Websocket != false) hash ^= Websocket.GetHashCode(); if (_unknownFields != null) { @@ -639,13 +639,13 @@ namespace Panoptes { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Name.Length != 0) { + if (Id.Length != 0) { output.WriteRawTag(10); - output.WriteString(Name); + output.WriteString(Id); } - if (Id != 0) { - output.WriteRawTag(16); - output.WriteInt32(Id); + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); } if (Text.Length != 0) { output.WriteRawTag(26); @@ -665,13 +665,13 @@ namespace Panoptes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Name.Length != 0) { + if (Id.Length != 0) { output.WriteRawTag(10); - output.WriteString(Name); + output.WriteString(Id); } - if (Id != 0) { - output.WriteRawTag(16); - output.WriteInt32(Id); + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); } if (Text.Length != 0) { output.WriteRawTag(26); @@ -691,12 +691,12 @@ namespace Panoptes { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } if (Name.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); } - if (Id != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); - } if (Text.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); } @@ -715,12 +715,12 @@ namespace Panoptes { if (other == null) { return; } + if (other.Id.Length != 0) { + Id = other.Id; + } if (other.Name.Length != 0) { Name = other.Name; } - if (other.Id != 0) { - Id = other.Id; - } if (other.Text.Length != 0) { Text = other.Text; } @@ -743,11 +743,11 @@ namespace Panoptes { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Name = input.ReadString(); + Id = input.ReadString(); break; } - case 16: { - Id = input.ReadInt32(); + case 18: { + Name = input.ReadString(); break; } case 26: { @@ -774,11 +774,11 @@ namespace Panoptes { _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { - Name = input.ReadString(); + Id = input.ReadString(); break; } - case 16: { - Id = input.ReadInt32(); + case 18: { + Name = input.ReadString(); break; } case 26: { @@ -830,8 +830,8 @@ namespace Panoptes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ChartComponent(ChartComponent other) : this() { - name_ = other.name_; id_ = other.id_; + name_ = other.name_; type_ = other.type_; labels_ = other.labels_.Clone(); values_ = other.values_.Clone(); @@ -845,20 +845,8 @@ namespace Panoptes { return new ChartComponent(this); } - /// Field number for the "name" field. - public const int NameFieldNumber = 1; - private string name_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - /// Field number for the "id" field. - public const int IdFieldNumber = 2; + public const int IdFieldNumber = 1; private int id_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] @@ -869,6 +857,18 @@ namespace Panoptes { } } + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Field number for the "type" field. public const int TypeFieldNumber = 3; private string type_ = ""; @@ -930,8 +930,8 @@ namespace Panoptes { if (ReferenceEquals(other, this)) { return true; } - if (Name != other.Name) return false; if (Id != other.Id) return false; + if (Name != other.Name) return false; if (Type != other.Type) return false; if(!labels_.Equals(other.labels_)) return false; if(!values_.Equals(other.values_)) return false; @@ -943,8 +943,8 @@ namespace Panoptes { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Name.Length != 0) hash ^= Name.GetHashCode(); if (Id != 0) hash ^= Id.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); if (Type.Length != 0) hash ^= Type.GetHashCode(); hash ^= labels_.GetHashCode(); hash ^= values_.GetHashCode(); @@ -967,14 +967,14 @@ namespace Panoptes { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE output.WriteRawMessage(this); #else - if (Name.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Name); - } if (Id != 0) { - output.WriteRawTag(16); + output.WriteRawTag(8); output.WriteInt32(Id); } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } if (Type.Length != 0) { output.WriteRawTag(26); output.WriteString(Type); @@ -995,14 +995,14 @@ namespace Panoptes { [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { - if (Name.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Name); - } if (Id != 0) { - output.WriteRawTag(16); + output.WriteRawTag(8); output.WriteInt32(Id); } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } if (Type.Length != 0) { output.WriteRawTag(26); output.WriteString(Type); @@ -1023,12 +1023,12 @@ namespace Panoptes { [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } if (Id != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } if (Type.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); } @@ -1049,12 +1049,12 @@ namespace Panoptes { if (other == null) { return; } - if (other.Name.Length != 0) { - Name = other.Name; - } if (other.Id != 0) { Id = other.Id; } + if (other.Name.Length != 0) { + Name = other.Name; + } if (other.Type.Length != 0) { Type = other.Type; } @@ -1078,12 +1078,12 @@ namespace Panoptes { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - Name = input.ReadString(); + case 8: { + Id = input.ReadInt32(); break; } - case 16: { - Id = input.ReadInt32(); + case 18: { + Name = input.ReadString(); break; } case 26: { @@ -1118,12 +1118,12 @@ namespace Panoptes { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - Name = input.ReadString(); + case 8: { + Id = input.ReadInt32(); break; } - case 16: { - Id = input.ReadInt32(); + case 18: { + Name = input.ReadString(); break; } case 26: {