From 2e20f385e1e82277e10c0fb2fab7977945a84b30 Mon Sep 17 00:00:00 2001 From: n0099 Date: Fri, 30 Dec 2022 03:24:08 +0800 Subject: [PATCH] $ ./protoc.sh tbm php cs --- tbm_cs/Post/Common/Abstract.g.cs | 456 +++++++++++++++++ tbm_cs/Post/Thread.g.cs | 461 +----------------- tbm_cs/Wrapper/ThreadAbstractWrapper.g.cs | 223 +++++++++ .../GPBMetadata/Post/Common/PBAbstract.php | 35 ++ tbm_php/GPBMetadata/Post/Thread.php | 18 +- .../Wrapper/ThreadAbstractWrapper.php | 29 ++ .../Post/{Thread => Common}/PBAbstract.php | 11 +- tbm_php/TbClient/Post/Thread.php | 12 +- tbm_php/TbClient/Post/Thread_Abstract.php | 16 - .../Wrapper/ThreadAbstractWrapper.php | 58 +++ 10 files changed, 836 insertions(+), 483 deletions(-) create mode 100644 tbm_cs/Post/Common/Abstract.g.cs create mode 100644 tbm_cs/Wrapper/ThreadAbstractWrapper.g.cs create mode 100644 tbm_php/GPBMetadata/Post/Common/PBAbstract.php create mode 100644 tbm_php/GPBMetadata/Wrapper/ThreadAbstractWrapper.php rename tbm_php/TbClient/Post/{Thread => Common}/PBAbstract.php (93%) delete mode 100644 tbm_php/TbClient/Post/Thread_Abstract.php create mode 100644 tbm_php/TbClient/Wrapper/ThreadAbstractWrapper.php diff --git a/tbm_cs/Post/Common/Abstract.g.cs b/tbm_cs/Post/Common/Abstract.g.cs new file mode 100644 index 000000000..4d2dfd06c --- /dev/null +++ b/tbm_cs/Post/Common/Abstract.g.cs @@ -0,0 +1,456 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Post/Common/Abstract.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#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 TbClient.Post.Common { + + /// Holder for reflection information generated from Post/Common/Abstract.proto + public static partial class AbstractReflection { + + #region Descriptor + /// File descriptor for Post/Common/Abstract.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static AbstractReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "ChpQb3N0L0NvbW1vbi9BYnN0cmFjdC5wcm90bxIUdGJDbGllbnQucG9zdC5j", + "b21tb24idQoIQWJzdHJhY3QSDAoEdHlwZRgBIAEoBRIMCgR0ZXh0GAIgASgJ", + "EgwKBGxpbmsYAyABKAkSCwoDc3JjGAQgASgJEgoKAnVuGAUgASgJEhMKC2R1", + "cmluZ190aW1lGAYgASgJEhEKCXZvaWNlX21kNRgHIAEoCWIGcHJvdG8z")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::TbClient.Post.Common.Abstract), global::TbClient.Post.Common.Abstract.Parser, new[]{ "Type", "Text", "Link", "Src", "Un", "DuringTime", "VoiceMd5" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class Abstract : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Abstract()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TbClient.Post.Common.AbstractReflection.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 Abstract() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Abstract(Abstract other) : this() { + type_ = other.type_; + text_ = other.text_; + link_ = other.link_; + src_ = other.src_; + un_ = other.un_; + duringTime_ = other.duringTime_; + voiceMd5_ = other.voiceMd5_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Abstract Clone() { + return new Abstract(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private int type_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Type { + get { return type_; } + set { + type_ = value; + } + } + + /// Field number for the "text" field. + public const int TextFieldNumber = 2; + private string text_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Text { + get { return text_; } + set { + text_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "link" field. + public const int LinkFieldNumber = 3; + private string link_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Link { + get { return link_; } + set { + link_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "src" field. + public const int SrcFieldNumber = 4; + private string src_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Src { + get { return src_; } + set { + src_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "un" field. + public const int UnFieldNumber = 5; + private string un_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Un { + get { return un_; } + set { + un_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "during_time" field. + public const int DuringTimeFieldNumber = 6; + private string duringTime_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DuringTime { + get { return duringTime_; } + set { + duringTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "voice_md5" field. + public const int VoiceMd5FieldNumber = 7; + private string voiceMd5_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VoiceMd5 { + get { return voiceMd5_; } + set { + voiceMd5_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Abstract); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Abstract other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Text != other.Text) return false; + if (Link != other.Link) return false; + if (Src != other.Src) return false; + if (Un != other.Un) return false; + if (DuringTime != other.DuringTime) return false; + if (VoiceMd5 != other.VoiceMd5) 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 (Type != 0) hash ^= Type.GetHashCode(); + if (Text.Length != 0) hash ^= Text.GetHashCode(); + if (Link.Length != 0) hash ^= Link.GetHashCode(); + if (Src.Length != 0) hash ^= Src.GetHashCode(); + if (Un.Length != 0) hash ^= Un.GetHashCode(); + if (DuringTime.Length != 0) hash ^= DuringTime.GetHashCode(); + if (VoiceMd5.Length != 0) hash ^= VoiceMd5.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 (Type != 0) { + output.WriteRawTag(8); + output.WriteInt32(Type); + } + if (Text.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Text); + } + if (Link.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Link); + } + if (Src.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Src); + } + if (Un.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Un); + } + if (DuringTime.Length != 0) { + output.WriteRawTag(50); + output.WriteString(DuringTime); + } + if (VoiceMd5.Length != 0) { + output.WriteRawTag(58); + output.WriteString(VoiceMd5); + } + 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 (Type != 0) { + output.WriteRawTag(8); + output.WriteInt32(Type); + } + if (Text.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Text); + } + if (Link.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Link); + } + if (Src.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Src); + } + if (Un.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Un); + } + if (DuringTime.Length != 0) { + output.WriteRawTag(50); + output.WriteString(DuringTime); + } + if (VoiceMd5.Length != 0) { + output.WriteRawTag(58); + output.WriteString(VoiceMd5); + } + 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 (Type != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + } + if (Text.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); + } + if (Link.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Link); + } + if (Src.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Src); + } + if (Un.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Un); + } + if (DuringTime.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DuringTime); + } + if (VoiceMd5.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VoiceMd5); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Abstract other) { + if (other == null) { + return; + } + if (other.Type != 0) { + Type = other.Type; + } + if (other.Text.Length != 0) { + Text = other.Text; + } + if (other.Link.Length != 0) { + Link = other.Link; + } + if (other.Src.Length != 0) { + Src = other.Src; + } + if (other.Un.Length != 0) { + Un = other.Un; + } + if (other.DuringTime.Length != 0) { + DuringTime = other.DuringTime; + } + if (other.VoiceMd5.Length != 0) { + VoiceMd5 = other.VoiceMd5; + } + _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 8: { + Type = input.ReadInt32(); + break; + } + case 18: { + Text = input.ReadString(); + break; + } + case 26: { + Link = input.ReadString(); + break; + } + case 34: { + Src = input.ReadString(); + break; + } + case 42: { + Un = input.ReadString(); + break; + } + case 50: { + DuringTime = input.ReadString(); + break; + } + case 58: { + VoiceMd5 = input.ReadString(); + 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 8: { + Type = input.ReadInt32(); + break; + } + case 18: { + Text = input.ReadString(); + break; + } + case 26: { + Link = input.ReadString(); + break; + } + case 34: { + Src = input.ReadString(); + break; + } + case 42: { + Un = input.ReadString(); + break; + } + case 50: { + DuringTime = input.ReadString(); + break; + } + case 58: { + VoiceMd5 = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/tbm_cs/Post/Thread.g.cs b/tbm_cs/Post/Thread.g.cs index ad853743b..f8322987c 100644 --- a/tbm_cs/Post/Thread.g.cs +++ b/tbm_cs/Post/Thread.g.cs @@ -26,26 +26,24 @@ static ThreadReflection() { string.Concat( "ChFQb3N0L1RocmVhZC5wcm90bxINdGJDbGllbnQucG9zdBoKVXNlci5wcm90", "bxoVUG9zdC9Db21tb24vWmFuLnByb3RvGhVQb3N0L0NvbW1vbi9MYnMucHJv", - "dG8aF1Bvc3QvQ29tbW9uL0FncmVlLnByb3RvIqkFCgZUaHJlYWQSCwoDdGlk", - "GAIgASgDEg0KBXRpdGxlGAMgASgJEhEKCXJlcGx5X251bRgEIAEoBRIQCgh2", - "aWV3X251bRgFIAEoBRIVCg1sYXN0X3RpbWVfaW50GAcgASgFEhQKDHRocmVh", - "ZF90eXBlcxgIIAEoBRIOCgZpc190b3AYCSABKAUSDwoHaXNfZ29vZBgKIAEo", - "BRIeCgZhdXRob3IYEiABKAsyDi50YkNsaWVudC5Vc2VyEiQKDGxhc3RfcmVw", - "bHllchgTIAEoCzIOLnRiQ2xpZW50LlVzZXISMQoJX2Fic3RyYWN0GBUgAygL", - "Mh4udGJDbGllbnQucG9zdC5UaHJlYWQuQWJzdHJhY3QSCwoDZmlkGBsgASgD", - "EhYKDmxpdmVfcG9zdF90eXBlGB0gASgJEhUKDWZpcnN0X3Bvc3RfaWQYKCAB", - "KAMSJgoDemFuGCkgASgLMhkudGJDbGllbnQucG9zdC5jb21tb24uWmFuEhMK", - "C2NyZWF0ZV90aW1lGC0gASgFEhQKDGlzX21lbWJlcnRvcBg2IAEoBRIRCglh", - "dXRob3JfaWQYOCABKAMSKwoIbG9jYXRpb24YPiABKAsyGS50YkNsaWVudC5w", - "b3N0LmNvbW1vbi5MYnMSEQoJYWdyZWVfbnVtGHwgASgFEioKBWFncmVlGH4g", - "ASgLMhsudGJDbGllbnQucG9zdC5jb21tb24uQWdyZWUSEgoJc2hhcmVfbnVt", - "GIcBIAEoAxp1CghBYnN0cmFjdBIMCgR0eXBlGAEgASgFEgwKBHRleHQYAiAB", - "KAkSDAoEbGluaxgDIAEoCRILCgNzcmMYBCABKAkSCgoCdW4YBSABKAkSEwoL", - "ZHVyaW5nX3RpbWUYBiABKAkSEQoJdm9pY2VfbWQ1GAcgASgJYgZwcm90bzM=")); + "dG8aF1Bvc3QvQ29tbW9uL0FncmVlLnByb3RvGhpQb3N0L0NvbW1vbi9BYnN0", + "cmFjdC5wcm90byKyBAoGVGhyZWFkEgsKA3RpZBgCIAEoAxINCgV0aXRsZRgD", + "IAEoCRIRCglyZXBseV9udW0YBCABKAUSEAoIdmlld19udW0YBSABKAUSFQoN", + "bGFzdF90aW1lX2ludBgHIAEoBRIUCgx0aHJlYWRfdHlwZXMYCCABKAUSDgoG", + "aXNfdG9wGAkgASgFEg8KB2lzX2dvb2QYCiABKAUSHgoGYXV0aG9yGBIgASgL", + "Mg4udGJDbGllbnQuVXNlchIkCgxsYXN0X3JlcGx5ZXIYEyABKAsyDi50YkNs", + "aWVudC5Vc2VyEjEKCV9hYnN0cmFjdBgVIAMoCzIeLnRiQ2xpZW50LnBvc3Qu", + "Y29tbW9uLkFic3RyYWN0EgsKA2ZpZBgbIAEoAxIWCg5saXZlX3Bvc3RfdHlw", + "ZRgdIAEoCRIVCg1maXJzdF9wb3N0X2lkGCggASgDEiYKA3phbhgpIAEoCzIZ", + "LnRiQ2xpZW50LnBvc3QuY29tbW9uLlphbhITCgtjcmVhdGVfdGltZRgtIAEo", + "BRIUCgxpc19tZW1iZXJ0b3AYNiABKAUSEQoJYXV0aG9yX2lkGDggASgDEisK", + "CGxvY2F0aW9uGD4gASgLMhkudGJDbGllbnQucG9zdC5jb21tb24uTGJzEhEK", + "CWFncmVlX251bRh8IAEoBRIqCgVhZ3JlZRh+IAEoCzIbLnRiQ2xpZW50LnBv", + "c3QuY29tbW9uLkFncmVlEhIKCXNoYXJlX251bRiHASABKANiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { global::TbClient.UserReflection.Descriptor, global::TbClient.Post.Common.ZanReflection.Descriptor, global::TbClient.Post.Common.LbsReflection.Descriptor, global::TbClient.Post.Common.AgreeReflection.Descriptor, }, + new pbr::FileDescriptor[] { global::TbClient.UserReflection.Descriptor, global::TbClient.Post.Common.ZanReflection.Descriptor, global::TbClient.Post.Common.LbsReflection.Descriptor, global::TbClient.Post.Common.AgreeReflection.Descriptor, global::TbClient.Post.Common.AbstractReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::TbClient.Post.Thread), global::TbClient.Post.Thread.Parser, new[]{ "Tid", "Title", "ReplyNum", "ViewNum", "LastTimeInt", "ThreadTypes", "IsTop", "IsGood", "Author", "LastReplyer", "Abstract", "Fid", "LivePostType", "FirstPostId", "Zan", "CreateTime", "IsMembertop", "AuthorId", "Location", "AgreeNum", "Agree", "ShareNum" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::TbClient.Post.Thread.Types.Abstract), global::TbClient.Post.Thread.Types.Abstract.Parser, new[]{ "Type", "Text", "Link", "Src", "Un", "DuringTime", "VoiceMd5" }, null, null, null, null)}) + new pbr::GeneratedClrTypeInfo(typeof(global::TbClient.Post.Thread), global::TbClient.Post.Thread.Parser, new[]{ "Tid", "Title", "ReplyNum", "ViewNum", "LastTimeInt", "ThreadTypes", "IsTop", "IsGood", "Author", "LastReplyer", "Abstract", "Fid", "LivePostType", "FirstPostId", "Zan", "CreateTime", "IsMembertop", "AuthorId", "Location", "AgreeNum", "Agree", "ShareNum" }, null, null, null, null) })); } #endregion @@ -239,12 +237,12 @@ public int IsGood { /// Field number for the "_abstract" field. public const int AbstractFieldNumber = 21; - private static readonly pb::FieldCodec _repeated_Abstract_codec - = pb::FieldCodec.ForMessage(170, global::TbClient.Post.Thread.Types.Abstract.Parser); - private readonly pbc::RepeatedField Abstract_ = new pbc::RepeatedField(); + private static readonly pb::FieldCodec _repeated_Abstract_codec + = pb::FieldCodec.ForMessage(170, global::TbClient.Post.Common.Abstract.Parser); + private readonly pbc::RepeatedField Abstract_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public pbc::RepeatedField Abstract { + public pbc::RepeatedField Abstract { get { return Abstract_; } } @@ -1050,425 +1048,6 @@ public void MergeFrom(pb::CodedInputStream input) { } #endif - #region Nested types - /// Container for nested types declared in the Thread message type. - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static partial class Types { - public sealed partial class Abstract : pb::IMessage - #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE - , pb::IBufferMessage - #endif - { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Abstract()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public static pbr::MessageDescriptor Descriptor { - get { return global::TbClient.Post.Thread.Descriptor.NestedTypes[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 Abstract() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Abstract(Abstract other) : this() { - type_ = other.type_; - text_ = other.text_; - link_ = other.link_; - src_ = other.src_; - un_ = other.un_; - duringTime_ = other.duringTime_; - voiceMd5_ = other.voiceMd5_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public Abstract Clone() { - return new Abstract(this); - } - - /// Field number for the "type" field. - public const int TypeFieldNumber = 1; - private int type_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public int Type { - get { return type_; } - set { - type_ = value; - } - } - - /// Field number for the "text" field. - public const int TextFieldNumber = 2; - private string text_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Text { - get { return text_; } - set { - text_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "link" field. - public const int LinkFieldNumber = 3; - private string link_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Link { - get { return link_; } - set { - link_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "src" field. - public const int SrcFieldNumber = 4; - private string src_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Src { - get { return src_; } - set { - src_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "un" field. - public const int UnFieldNumber = 5; - private string un_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string Un { - get { return un_; } - set { - un_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "during_time" field. - public const int DuringTimeFieldNumber = 6; - private string duringTime_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string DuringTime { - get { return duringTime_; } - set { - duringTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "voice_md5" field. - public const int VoiceMd5FieldNumber = 7; - private string voiceMd5_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public string VoiceMd5 { - get { return voiceMd5_; } - set { - voiceMd5_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public override bool Equals(object other) { - return Equals(other as Abstract); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public bool Equals(Abstract other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if (Type != other.Type) return false; - if (Text != other.Text) return false; - if (Link != other.Link) return false; - if (Src != other.Src) return false; - if (Un != other.Un) return false; - if (DuringTime != other.DuringTime) return false; - if (VoiceMd5 != other.VoiceMd5) 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 (Type != 0) hash ^= Type.GetHashCode(); - if (Text.Length != 0) hash ^= Text.GetHashCode(); - if (Link.Length != 0) hash ^= Link.GetHashCode(); - if (Src.Length != 0) hash ^= Src.GetHashCode(); - if (Un.Length != 0) hash ^= Un.GetHashCode(); - if (DuringTime.Length != 0) hash ^= DuringTime.GetHashCode(); - if (VoiceMd5.Length != 0) hash ^= VoiceMd5.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 (Type != 0) { - output.WriteRawTag(8); - output.WriteInt32(Type); - } - if (Text.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Text); - } - if (Link.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Link); - } - if (Src.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Src); - } - if (Un.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Un); - } - if (DuringTime.Length != 0) { - output.WriteRawTag(50); - output.WriteString(DuringTime); - } - if (VoiceMd5.Length != 0) { - output.WriteRawTag(58); - output.WriteString(VoiceMd5); - } - 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 (Type != 0) { - output.WriteRawTag(8); - output.WriteInt32(Type); - } - if (Text.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Text); - } - if (Link.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Link); - } - if (Src.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Src); - } - if (Un.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Un); - } - if (DuringTime.Length != 0) { - output.WriteRawTag(50); - output.WriteString(DuringTime); - } - if (VoiceMd5.Length != 0) { - output.WriteRawTag(58); - output.WriteString(VoiceMd5); - } - 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 (Type != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); - } - if (Text.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Text); - } - if (Link.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Link); - } - if (Src.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Src); - } - if (Un.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Un); - } - if (DuringTime.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DuringTime); - } - if (VoiceMd5.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(VoiceMd5); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] - public void MergeFrom(Abstract other) { - if (other == null) { - return; - } - if (other.Type != 0) { - Type = other.Type; - } - if (other.Text.Length != 0) { - Text = other.Text; - } - if (other.Link.Length != 0) { - Link = other.Link; - } - if (other.Src.Length != 0) { - Src = other.Src; - } - if (other.Un.Length != 0) { - Un = other.Un; - } - if (other.DuringTime.Length != 0) { - DuringTime = other.DuringTime; - } - if (other.VoiceMd5.Length != 0) { - VoiceMd5 = other.VoiceMd5; - } - _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 8: { - Type = input.ReadInt32(); - break; - } - case 18: { - Text = input.ReadString(); - break; - } - case 26: { - Link = input.ReadString(); - break; - } - case 34: { - Src = input.ReadString(); - break; - } - case 42: { - Un = input.ReadString(); - break; - } - case 50: { - DuringTime = input.ReadString(); - break; - } - case 58: { - VoiceMd5 = input.ReadString(); - 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 8: { - Type = input.ReadInt32(); - break; - } - case 18: { - Text = input.ReadString(); - break; - } - case 26: { - Link = input.ReadString(); - break; - } - case 34: { - Src = input.ReadString(); - break; - } - case 42: { - Un = input.ReadString(); - break; - } - case 50: { - DuringTime = input.ReadString(); - break; - } - case 58: { - VoiceMd5 = input.ReadString(); - break; - } - } - } - } - #endif - - } - - } - #endregion - } #endregion diff --git a/tbm_cs/Wrapper/ThreadAbstractWrapper.g.cs b/tbm_cs/Wrapper/ThreadAbstractWrapper.g.cs new file mode 100644 index 000000000..df97a7650 --- /dev/null +++ b/tbm_cs/Wrapper/ThreadAbstractWrapper.g.cs @@ -0,0 +1,223 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Wrapper/ThreadAbstractWrapper.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#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 TbClient.Wrapper { + + /// Holder for reflection information generated from Wrapper/ThreadAbstractWrapper.proto + public static partial class ThreadAbstractWrapperReflection { + + #region Descriptor + /// File descriptor for Wrapper/ThreadAbstractWrapper.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ThreadAbstractWrapperReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CiNXcmFwcGVyL1RocmVhZEFic3RyYWN0V3JhcHBlci5wcm90bxIQdGJDbGll", + "bnQud3JhcHBlchoaUG9zdC9Db21tb24vQWJzdHJhY3QucHJvdG8iRgoVVGhy", + "ZWFkQWJzdHJhY3RXcmFwcGVyEi0KBXZhbHVlGAEgAygLMh4udGJDbGllbnQu", + "cG9zdC5jb21tb24uQWJzdHJhY3RiBnByb3RvMw==")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { global::TbClient.Post.Common.AbstractReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::TbClient.Wrapper.ThreadAbstractWrapper), global::TbClient.Wrapper.ThreadAbstractWrapper.Parser, new[]{ "Value" }, null, null, null, null) + })); + } + #endregion + + } + #region Messages + public sealed partial class ThreadAbstractWrapper : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ThreadAbstractWrapper()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::TbClient.Wrapper.ThreadAbstractWrapperReflection.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 ThreadAbstractWrapper() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ThreadAbstractWrapper(ThreadAbstractWrapper other) : this() { + value_ = other.value_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ThreadAbstractWrapper Clone() { + return new ThreadAbstractWrapper(this); + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_value_codec + = pb::FieldCodec.ForMessage(10, global::TbClient.Post.Common.Abstract.Parser); + private readonly pbc::RepeatedField value_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Value { + get { return value_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ThreadAbstractWrapper); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ThreadAbstractWrapper other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!value_.Equals(other.value_)) 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; + hash ^= value_.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 + value_.WriteTo(output, _repeated_value_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) { + value_.WriteTo(ref output, _repeated_value_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; + size += value_.CalculateSize(_repeated_value_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ThreadAbstractWrapper other) { + if (other == null) { + return; + } + value_.Add(other.value_); + _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: { + value_.AddEntriesFrom(input, _repeated_value_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: { + value_.AddEntriesFrom(ref input, _repeated_value_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/tbm_php/GPBMetadata/Post/Common/PBAbstract.php b/tbm_php/GPBMetadata/Post/Common/PBAbstract.php new file mode 100644 index 000000000..5be4e3ae4 --- /dev/null +++ b/tbm_php/GPBMetadata/Post/Common/PBAbstract.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + ' + +Post/Common/Abstract.prototbClient.post.common"u +Abstract +type ( +text (  +link (  +src (  + +un (  + during_time (  + voice_md5 ( bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/tbm_php/GPBMetadata/Post/Thread.php b/tbm_php/GPBMetadata/Post/Thread.php index 8cf5ec10e..5a78e92b2 100644 --- a/tbm_php/GPBMetadata/Post/Thread.php +++ b/tbm_php/GPBMetadata/Post/Thread.php @@ -18,10 +18,11 @@ public static function initOnce() { \GPBMetadata\Post\Common\Zan::initOnce(); \GPBMetadata\Post\Common\Lbs::initOnce(); \GPBMetadata\Post\Common\Agree::initOnce(); + \GPBMetadata\Post\Common\PBAbstract::initOnce(); $pool->internalAddGeneratedFile( ' - -Post/Thread.proto tbClient.postPost/Common/Zan.protoPost/Common/Lbs.protoPost/Common/Agree.proto" + +Post/Thread.proto tbClient.postPost/Common/Zan.protoPost/Common/Lbs.protoPost/Common/Agree.protoPost/Common/Abstract.proto" Thread tid ( title (  @@ -34,7 +35,7 @@ public static function initOnce() { ( author ( 2.tbClient.User$ last_replyer ( 2.tbClient.User1 - _abstract ( 2.tbClient.post.Thread.Abstract + _abstract ( 2.tbClient.post.common.Abstract fid ( live_post_type (  first_post_id( (& @@ -45,16 +46,7 @@ public static function initOnce() { location> ( 2.tbClient.post.common.Lbs agree_num| (* agree~ ( 2.tbClient.post.common.Agree - share_num (u -Abstract -type ( -text (  -link (  -src (  - -un (  - during_time (  - voice_md5 ( bproto3' + share_num (bproto3' , true); static::$is_initialized = true; diff --git a/tbm_php/GPBMetadata/Wrapper/ThreadAbstractWrapper.php b/tbm_php/GPBMetadata/Wrapper/ThreadAbstractWrapper.php new file mode 100644 index 000000000..0416c07f8 --- /dev/null +++ b/tbm_php/GPBMetadata/Wrapper/ThreadAbstractWrapper.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + ' + +#Wrapper/ThreadAbstractWrapper.prototbClient.wrapper"F +ThreadAbstractWrapper- +value ( 2.tbClient.post.common.Abstractbproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/tbm_php/TbClient/Post/Thread/PBAbstract.php b/tbm_php/TbClient/Post/Common/PBAbstract.php similarity index 93% rename from tbm_php/TbClient/Post/Thread/PBAbstract.php rename to tbm_php/TbClient/Post/Common/PBAbstract.php index f13ed6ce2..8fa4a1589 100644 --- a/tbm_php/TbClient/Post/Thread/PBAbstract.php +++ b/tbm_php/TbClient/Post/Common/PBAbstract.php @@ -1,15 +1,15 @@ tbClient.post.Thread.Abstract + * Generated from protobuf message tbClient.post.common.Abstract */ class PBAbstract extends \Google\Protobuf\Internal\Message { @@ -58,7 +58,7 @@ class PBAbstract extends \Google\Protobuf\Internal\Message * } */ public function __construct($data = NULL) { - \GPBMetadata\Post\Thread::initOnce(); + \GPBMetadata\Post\Common\PBAbstract::initOnce(); parent::__construct($data); } @@ -218,6 +218,3 @@ public function setVoiceMd5($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PBAbstract::class, \TbClient\Post\Thread_Abstract::class); - diff --git a/tbm_php/TbClient/Post/Thread.php b/tbm_php/TbClient/Post/Thread.php index 30aa480eb..6c320750d 100644 --- a/tbm_php/TbClient/Post/Thread.php +++ b/tbm_php/TbClient/Post/Thread.php @@ -54,7 +54,7 @@ class Thread extends \Google\Protobuf\Internal\Message */ protected $last_replyer = null; /** - * Generated from protobuf field repeated .tbClient.post.Thread.Abstract _abstract = 21; + * Generated from protobuf field repeated .tbClient.post.common.Abstract _abstract = 21; */ private $_abstract; /** @@ -118,7 +118,7 @@ class Thread extends \Google\Protobuf\Internal\Message * @type int $is_good * @type \TbClient\User $author * @type \TbClient\User $last_replyer - * @type array<\TbClient\Post\Thread\PBAbstract>|\Google\Protobuf\Internal\RepeatedField $_abstract + * @type array<\TbClient\Post\Common\PBAbstract>|\Google\Protobuf\Internal\RepeatedField $_abstract * @type int|string $fid * @type string $live_post_type * @type int|string $first_post_id @@ -378,7 +378,7 @@ public function setLastReplyer($var) } /** - * Generated from protobuf field repeated .tbClient.post.Thread.Abstract _abstract = 21; + * Generated from protobuf field repeated .tbClient.post.common.Abstract _abstract = 21; * @return \Google\Protobuf\Internal\RepeatedField */ public function getAbstract() @@ -387,13 +387,13 @@ public function getAbstract() } /** - * Generated from protobuf field repeated .tbClient.post.Thread.Abstract _abstract = 21; - * @param array<\TbClient\Post\Thread\PBAbstract>|\Google\Protobuf\Internal\RepeatedField $var + * Generated from protobuf field repeated .tbClient.post.common.Abstract _abstract = 21; + * @param array<\TbClient\Post\Common\PBAbstract>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setAbstract($var) { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \TbClient\Post\Thread\PBAbstract::class); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \TbClient\Post\Common\PBAbstract::class); $this->_abstract = $arr; return $this; diff --git a/tbm_php/TbClient/Post/Thread_Abstract.php b/tbm_php/TbClient/Post/Thread_Abstract.php deleted file mode 100644 index 0174d33b9..000000000 --- a/tbm_php/TbClient/Post/Thread_Abstract.php +++ /dev/null @@ -1,16 +0,0 @@ -tbClient.wrapper.ThreadAbstractWrapper + */ +class ThreadAbstractWrapper extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated .tbClient.post.common.Abstract value = 1; + */ + private $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\TbClient\Post\Common\PBAbstract>|\Google\Protobuf\Internal\RepeatedField $value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Wrapper\ThreadAbstractWrapper::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated .tbClient.post.common.Abstract value = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field repeated .tbClient.post.common.Abstract value = 1; + * @param array<\TbClient\Post\Common\PBAbstract>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setValue($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \TbClient\Post\Common\PBAbstract::class); + $this->value = $arr; + + return $this; + } + +} +