Core/Proto: Updated protobuf messages and services
This commit is contained in:
@@ -25,30 +25,24 @@ namespace Bgs.Protocol.Config {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"CiJiZ3MvbG93L3BiL2NsaWVudC9ycGNfY29uZmlnLnByb3RvEhNiZ3MucHJv",
|
||||
"dG9jb2wuY29uZmlnIosDCg9SUENNZXRob2RDb25maWcSGAoMc2VydmljZV9u",
|
||||
"dG9jb2wuY29uZmlnIoIDCg9SUENNZXRob2RDb25maWcSGAoMc2VydmljZV9u",
|
||||
"YW1lGAEgASgJQgIYARIXCgttZXRob2RfbmFtZRgCIAEoCUICGAESGgoPZml4",
|
||||
"ZWRfY2FsbF9jb3N0GAMgASgNOgExEhwKEWZpeGVkX3BhY2tldF9zaXplGAQg",
|
||||
"ASgNOgEwEh4KE3ZhcmlhYmxlX211bHRpcGxpZXIYBSABKAI6ATASFQoKbXVs",
|
||||
"dGlwbGllchgGIAEoAjoBMRIYChByYXRlX2xpbWl0X2NvdW50GAcgASgNEhoK",
|
||||
"EnJhdGVfbGltaXRfc2Vjb25kcxgIIAEoDRIXCg9tYXhfcGFja2V0X3NpemUY",
|
||||
"CSABKA0SGAoQbWF4X2VuY29kZWRfc2l6ZRgKIAEoDRIPCgd0aW1lb3V0GAsg",
|
||||
"ASgCEhMKC2NhcF9iYWxhbmNlGAwgASgNEhwKEWluY29tZV9wZXJfc2Vjb25k",
|
||||
"GA0gASgCOgEwEhQKDHNlcnZpY2VfaGFzaBgOIAEoDRIRCgltZXRob2RfaWQY",
|
||||
"DyABKA0irQEKDlJQQ01ldGVyQ29uZmlnEjQKBm1ldGhvZBgBIAMoCzIkLmJn",
|
||||
"cy5wcm90b2NvbC5jb25maWcuUlBDTWV0aG9kQ29uZmlnEhwKEWluY29tZV9w",
|
||||
"ZXJfc2Vjb25kGAIgASgNOgExEhcKD2luaXRpYWxfYmFsYW5jZRgDIAEoDRIT",
|
||||
"CgtjYXBfYmFsYW5jZRgEIAEoDRIZCg5zdGFydHVwX3BlcmlvZBgFIAEoAjoB",
|
||||
"MCJJCg1Qcm90b2NvbEFsaWFzEhsKE3NlcnZlcl9zZXJ2aWNlX25hbWUYASAC",
|
||||
"KAkSGwoTY2xpZW50X3NlcnZpY2VfbmFtZRgCIAIoCSJMCg5TZXJ2aWNlQWxp",
|
||||
"YXNlcxI6Cg5wcm90b2NvbF9hbGlhcxgBIAMoCzIiLmJncy5wcm90b2NvbC5j",
|
||||
"b25maWcuUHJvdG9jb2xBbGlhcw=="));
|
||||
"ZWRfY2FsbF9jb3N0GAMgASgNOgExEhkKEWZpeGVkX3BhY2tldF9zaXplGAQg",
|
||||
"ASgNEhsKE3ZhcmlhYmxlX211bHRpcGxpZXIYBSABKAISFQoKbXVsdGlwbGll",
|
||||
"chgGIAEoAjoBMRIYChByYXRlX2xpbWl0X2NvdW50GAcgASgNEhoKEnJhdGVf",
|
||||
"bGltaXRfc2Vjb25kcxgIIAEoDRIXCg9tYXhfcGFja2V0X3NpemUYCSABKA0S",
|
||||
"GAoQbWF4X2VuY29kZWRfc2l6ZRgKIAEoDRIPCgd0aW1lb3V0GAsgASgCEhMK",
|
||||
"C2NhcF9iYWxhbmNlGAwgASgNEhkKEWluY29tZV9wZXJfc2Vjb25kGA0gASgC",
|
||||
"EhQKDHNlcnZpY2VfaGFzaBgOIAEoDRIRCgltZXRob2RfaWQYDyABKA0iqgEK",
|
||||
"DlJQQ01ldGVyQ29uZmlnEjQKBm1ldGhvZBgBIAMoCzIkLmJncy5wcm90b2Nv",
|
||||
"bC5jb25maWcuUlBDTWV0aG9kQ29uZmlnEhwKEWluY29tZV9wZXJfc2Vjb25k",
|
||||
"GAIgASgNOgExEhcKD2luaXRpYWxfYmFsYW5jZRgDIAEoDRITCgtjYXBfYmFs",
|
||||
"YW5jZRgEIAEoDRIWCg5zdGFydHVwX3BlcmlvZBgFIAEoAg=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Bgs.Protocol.Config.RPCMethodConfig), global::Bgs.Protocol.Config.RPCMethodConfig.Parser, new[]{ "ServiceName", "MethodName", "FixedCallCost", "FixedPacketSize", "VariableMultiplier", "Multiplier", "RateLimitCount", "RateLimitSeconds", "MaxPacketSize", "MaxEncodedSize", "Timeout", "CapBalance", "IncomePerSecond", "ServiceHash", "MethodId" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Bgs.Protocol.Config.RPCMeterConfig), global::Bgs.Protocol.Config.RPCMeterConfig.Parser, new[]{ "Method", "IncomePerSecond", "InitialBalance", "CapBalance", "StartupPeriod" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Bgs.Protocol.Config.ProtocolAlias), global::Bgs.Protocol.Config.ProtocolAlias.Parser, new[]{ "ServerServiceName", "ClientServiceName" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Bgs.Protocol.Config.ServiceAliases), global::Bgs.Protocol.Config.ServiceAliases.Parser, new[]{ "ProtocolAlias" }, null, null, null, null)
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Bgs.Protocol.Config.RPCMeterConfig), global::Bgs.Protocol.Config.RPCMeterConfig.Parser, new[]{ "Method", "IncomePerSecond", "InitialBalance", "CapBalance", "StartupPeriod" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
@@ -1064,308 +1058,6 @@ namespace Bgs.Protocol.Config {
|
||||
|
||||
}
|
||||
|
||||
public sealed partial class ProtocolAlias : pb::IMessage<ProtocolAlias> {
|
||||
private static readonly pb::MessageParser<ProtocolAlias> _parser = new pb::MessageParser<ProtocolAlias>(() => new ProtocolAlias());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pb::MessageParser<ProtocolAlias> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Bgs.Protocol.Config.RpcConfigReflection.Descriptor.MessageTypes[2]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public ProtocolAlias() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public ProtocolAlias(ProtocolAlias other) : this() {
|
||||
serverServiceName_ = other.serverServiceName_;
|
||||
clientServiceName_ = other.clientServiceName_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public ProtocolAlias Clone() {
|
||||
return new ProtocolAlias(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "server_service_name" field.</summary>
|
||||
public const int ServerServiceNameFieldNumber = 1;
|
||||
private readonly static string ServerServiceNameDefaultValue = "";
|
||||
|
||||
private string serverServiceName_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public string ServerServiceName {
|
||||
get { return serverServiceName_ ?? ServerServiceNameDefaultValue; }
|
||||
set {
|
||||
serverServiceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "server_service_name" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool HasServerServiceName {
|
||||
get { return serverServiceName_ != null; }
|
||||
}
|
||||
/// <summary>Clears the value of the "server_service_name" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void ClearServerServiceName() {
|
||||
serverServiceName_ = null;
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "client_service_name" field.</summary>
|
||||
public const int ClientServiceNameFieldNumber = 2;
|
||||
private readonly static string ClientServiceNameDefaultValue = "";
|
||||
|
||||
private string clientServiceName_;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public string ClientServiceName {
|
||||
get { return clientServiceName_ ?? ClientServiceNameDefaultValue; }
|
||||
set {
|
||||
clientServiceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
/// <summary>Gets whether the "client_service_name" field is set</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool HasClientServiceName {
|
||||
get { return clientServiceName_ != null; }
|
||||
}
|
||||
/// <summary>Clears the value of the "client_service_name" field</summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void ClearClientServiceName() {
|
||||
clientServiceName_ = null;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as ProtocolAlias);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool Equals(ProtocolAlias other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (ServerServiceName != other.ServerServiceName) return false;
|
||||
if (ClientServiceName != other.ClientServiceName) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (HasServerServiceName) hash ^= ServerServiceName.GetHashCode();
|
||||
if (HasClientServiceName) hash ^= ClientServiceName.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
if (HasServerServiceName) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(ServerServiceName);
|
||||
}
|
||||
if (HasClientServiceName) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteString(ClientServiceName);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (HasServerServiceName) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(ServerServiceName);
|
||||
}
|
||||
if (HasClientServiceName) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientServiceName);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(ProtocolAlias other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.HasServerServiceName) {
|
||||
ServerServiceName = other.ServerServiceName;
|
||||
}
|
||||
if (other.HasClientServiceName) {
|
||||
ClientServiceName = other.ClientServiceName;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
ServerServiceName = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
ClientServiceName = input.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public sealed partial class ServiceAliases : pb::IMessage<ServiceAliases> {
|
||||
private static readonly pb::MessageParser<ServiceAliases> _parser = new pb::MessageParser<ServiceAliases>(() => new ServiceAliases());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pb::MessageParser<ServiceAliases> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Bgs.Protocol.Config.RpcConfigReflection.Descriptor.MessageTypes[3]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public ServiceAliases() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public ServiceAliases(ServiceAliases other) : this() {
|
||||
protocolAlias_ = other.protocolAlias_.Clone();
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public ServiceAliases Clone() {
|
||||
return new ServiceAliases(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "protocol_alias" field.</summary>
|
||||
public const int ProtocolAliasFieldNumber = 1;
|
||||
private static readonly pb::FieldCodec<global::Bgs.Protocol.Config.ProtocolAlias> _repeated_protocolAlias_codec
|
||||
= pb::FieldCodec.ForMessage(10, global::Bgs.Protocol.Config.ProtocolAlias.Parser);
|
||||
private readonly pbc::RepeatedField<global::Bgs.Protocol.Config.ProtocolAlias> protocolAlias_ = new pbc::RepeatedField<global::Bgs.Protocol.Config.ProtocolAlias>();
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public pbc::RepeatedField<global::Bgs.Protocol.Config.ProtocolAlias> ProtocolAlias {
|
||||
get { return protocolAlias_; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as ServiceAliases);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public bool Equals(ServiceAliases other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if(!protocolAlias_.Equals(other.protocolAlias_)) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
hash ^= protocolAlias_.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
protocolAlias_.WriteTo(output, _repeated_protocolAlias_codec);
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
size += protocolAlias_.CalculateSize(_repeated_protocolAlias_codec);
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(ServiceAliases other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
protocolAlias_.Add(other.protocolAlias_);
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
protocolAlias_.AddEntriesFrom(input, _repeated_protocolAlias_codec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user