From fd3d125988862b13c452abb1f844e8961994946a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 16 Jul 2019 08:31:44 -0400 Subject: [PATCH] regenerate C# protos with src/csharp/generate_proto_csharp.sh --- src/csharp/Grpc.Examples/MathGrpc.cs | 2 +- .../BenchmarkServiceGrpc.cs | 2 +- .../EmptyServiceGrpc.cs | 2 +- .../Grpc.IntegrationTesting/Messages.cs | 110 ++++++++++++++---- .../Grpc.IntegrationTesting/MetricsGrpc.cs | 2 +- .../ReportQpsScenarioServiceGrpc.cs | 2 +- .../Grpc.IntegrationTesting/TestGrpc.cs | 6 +- .../WorkerServiceGrpc.cs | 2 +- 8 files changed, 96 insertions(+), 32 deletions(-) diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index fab64354411..5186d2f6dae 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -130,7 +130,7 @@ namespace Math { { /// Creates a new client for Math /// The channel to use to make remote calls. - public MathClient(grpc::Channel channel) : base(channel) + public MathClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for Math that uses a custom CallInvoker. diff --git a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs index 5b37b144f2a..4a608be318c 100644 --- a/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/BenchmarkServiceGrpc.cs @@ -148,7 +148,7 @@ namespace Grpc.Testing { { /// Creates a new client for BenchmarkService /// The channel to use to make remote calls. - public BenchmarkServiceClient(grpc::Channel channel) : base(channel) + public BenchmarkServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for BenchmarkService that uses a custom CallInvoker. diff --git a/src/csharp/Grpc.IntegrationTesting/EmptyServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/EmptyServiceGrpc.cs index 50c6e159206..30fd6dec542 100644 --- a/src/csharp/Grpc.IntegrationTesting/EmptyServiceGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/EmptyServiceGrpc.cs @@ -49,7 +49,7 @@ namespace Grpc.Testing { { /// Creates a new client for EmptyService /// The channel to use to make remote calls. - public EmptyServiceClient(grpc::Channel channel) : base(channel) + public EmptyServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for EmptyService that uses a custom CallInvoker. diff --git a/src/csharp/Grpc.IntegrationTesting/Messages.cs b/src/csharp/Grpc.IntegrationTesting/Messages.cs index 3b6c0010222..5c5042b75b6 100644 --- a/src/csharp/Grpc.IntegrationTesting/Messages.cs +++ b/src/csharp/Grpc.IntegrationTesting/Messages.cs @@ -28,41 +28,42 @@ namespace Grpc.Testing { "LnRlc3RpbmciGgoJQm9vbFZhbHVlEg0KBXZhbHVlGAEgASgIIkAKB1BheWxv", "YWQSJwoEdHlwZRgBIAEoDjIZLmdycGMudGVzdGluZy5QYXlsb2FkVHlwZRIM", "CgRib2R5GAIgASgMIisKCkVjaG9TdGF0dXMSDAoEY29kZRgBIAEoBRIPCgdt", - "ZXNzYWdlGAIgASgJIs4CCg1TaW1wbGVSZXF1ZXN0EjAKDXJlc3BvbnNlX3R5", + "ZXNzYWdlGAIgASgJIuYCCg1TaW1wbGVSZXF1ZXN0EjAKDXJlc3BvbnNlX3R5", "cGUYASABKA4yGS5ncnBjLnRlc3RpbmcuUGF5bG9hZFR5cGUSFQoNcmVzcG9u", "c2Vfc2l6ZRgCIAEoBRImCgdwYXlsb2FkGAMgASgLMhUuZ3JwYy50ZXN0aW5n", "LlBheWxvYWQSFQoNZmlsbF91c2VybmFtZRgEIAEoCBIYChBmaWxsX29hdXRo", "X3Njb3BlGAUgASgIEjQKE3Jlc3BvbnNlX2NvbXByZXNzZWQYBiABKAsyFy5n", "cnBjLnRlc3RpbmcuQm9vbFZhbHVlEjEKD3Jlc3BvbnNlX3N0YXR1cx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W5n", + "LlJlc3BvbnNlUGFyYW1ldGVycxImCgdwYXlsb2FkGAMgASgLMhUuZ3JwYy50", + "ZXN0aW5nLlBheWxvYWQSMQoPcmVzcG9uc2Vfc3RhdHVzGAcgASgLMhguZ3Jw", + "Yy50ZXN0aW5nLkVjaG9TdGF0dXMiRQobU3RyZWFtaW5nT3V0cHV0Q2FsbFJl", + "c3BvbnNlEiYKB3BheWxvYWQYASABKAsyFS5ncnBjLnRlc3RpbmcuUGF5bG9h", + "ZCIzCg9SZWNvbm5lY3RQYXJhbXMSIAoYbWF4X3JlY29ubmVjdF9iYWNrb2Zm", + "X21zGAEgASgFIjMKDVJlY29ubmVjdEluZm8SDgoGcGFzc2VkGAEgASgIEhIK", + "CmJhY2tvZmZfbXMYAiADKAUqHwoLUGF5bG9hZFR5cGUSEAoMQ09NUFJFU1NB", + "QkxFEABiBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.BoolValue), global::Grpc.Testing.BoolValue.Parser, new[]{ "Value" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Payload), global::Grpc.Testing.Payload.Parser, new[]{ "Type", "Body" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.EchoStatus), global::Grpc.Testing.EchoStatus.Parser, new[]{ "Code", "Message" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompressed", "ResponseStatus", "ExpectCompressed" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleResponse), global::Grpc.Testing.SimpleResponse.Parser, new[]{ "Payload", "Username", "OauthScope" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompressed", "ResponseStatus", "ExpectCompressed", "FillServerId" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleResponse), global::Grpc.Testing.SimpleResponse.Parser, new[]{ "Payload", "Username", "OauthScope", "ServerId" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallRequest), global::Grpc.Testing.StreamingInputCallRequest.Parser, new[]{ "Payload", "ExpectCompressed" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallResponse), global::Grpc.Testing.StreamingInputCallResponse.Parser, new[]{ "AggregatedPayloadSize" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs", "Compressed" }, null, null, null), @@ -589,6 +590,7 @@ namespace Grpc.Testing { responseCompressed_ = other.responseCompressed_ != null ? other.responseCompressed_.Clone() : null; responseStatus_ = other.responseStatus_ != null ? other.responseStatus_.Clone() : null; expectCompressed_ = other.expectCompressed_ != null ? other.expectCompressed_.Clone() : null; + fillServerId_ = other.fillServerId_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -713,6 +715,20 @@ namespace Grpc.Testing { } } + /// Field number for the "fill_server_id" field. + public const int FillServerIdFieldNumber = 9; + private bool fillServerId_; + /// + /// Whether SimpleResponse should include server_id. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public bool FillServerId { + get { return fillServerId_; } + set { + fillServerId_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as SimpleRequest); @@ -734,6 +750,7 @@ namespace Grpc.Testing { if (!object.Equals(ResponseCompressed, other.ResponseCompressed)) return false; if (!object.Equals(ResponseStatus, other.ResponseStatus)) return false; if (!object.Equals(ExpectCompressed, other.ExpectCompressed)) return false; + if (FillServerId != other.FillServerId) return false; return Equals(_unknownFields, other._unknownFields); } @@ -748,6 +765,7 @@ namespace Grpc.Testing { if (responseCompressed_ != null) hash ^= ResponseCompressed.GetHashCode(); if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode(); if (expectCompressed_ != null) hash ^= ExpectCompressed.GetHashCode(); + if (FillServerId != false) hash ^= FillServerId.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -793,6 +811,10 @@ namespace Grpc.Testing { output.WriteRawTag(66); output.WriteMessage(ExpectCompressed); } + if (FillServerId != false) { + output.WriteRawTag(72); + output.WriteBool(FillServerId); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -825,6 +847,9 @@ namespace Grpc.Testing { if (expectCompressed_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExpectCompressed); } + if (FillServerId != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -872,6 +897,9 @@ namespace Grpc.Testing { } ExpectCompressed.MergeFrom(other.ExpectCompressed); } + if (other.FillServerId != false) { + FillServerId = other.FillServerId; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -927,6 +955,10 @@ namespace Grpc.Testing { input.ReadMessage(ExpectCompressed); break; } + case 72: { + FillServerId = input.ReadBool(); + break; + } } } } @@ -964,6 +996,7 @@ namespace Grpc.Testing { payload_ = other.payload_ != null ? other.payload_.Clone() : null; username_ = other.username_; oauthScope_ = other.oauthScope_; + serverId_ = other.serverId_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } @@ -1015,6 +1048,21 @@ namespace Grpc.Testing { } } + /// Field number for the "server_id" field. + public const int ServerIdFieldNumber = 4; + private string serverId_ = ""; + /// + /// Server ID. This must be unique among different server instances, + /// but the same across all RPC's made to a particular server instance. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + public string ServerId { + get { return serverId_; } + set { + serverId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] public override bool Equals(object other) { return Equals(other as SimpleResponse); @@ -1031,6 +1079,7 @@ namespace Grpc.Testing { if (!object.Equals(Payload, other.Payload)) return false; if (Username != other.Username) return false; if (OauthScope != other.OauthScope) return false; + if (ServerId != other.ServerId) return false; return Equals(_unknownFields, other._unknownFields); } @@ -1040,6 +1089,7 @@ namespace Grpc.Testing { if (payload_ != null) hash ^= Payload.GetHashCode(); if (Username.Length != 0) hash ^= Username.GetHashCode(); if (OauthScope.Length != 0) hash ^= OauthScope.GetHashCode(); + if (ServerId.Length != 0) hash ^= ServerId.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1065,6 +1115,10 @@ namespace Grpc.Testing { output.WriteRawTag(26); output.WriteString(OauthScope); } + if (ServerId.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ServerId); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } @@ -1082,6 +1136,9 @@ namespace Grpc.Testing { if (OauthScope.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(OauthScope); } + if (ServerId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ServerId); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1105,6 +1162,9 @@ namespace Grpc.Testing { if (other.OauthScope.Length != 0) { OauthScope = other.OauthScope; } + if (other.ServerId.Length != 0) { + ServerId = other.ServerId; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } @@ -1131,6 +1191,10 @@ namespace Grpc.Testing { OauthScope = input.ReadString(); break; } + case 34: { + ServerId = input.ReadString(); + break; + } } } } diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index 9b11e990d2d..fbc3690d2ac 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -92,7 +92,7 @@ namespace Grpc.Testing { { /// Creates a new client for MetricsService /// The channel to use to make remote calls. - public MetricsServiceClient(grpc::Channel channel) : base(channel) + public MetricsServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for MetricsService that uses a custom CallInvoker. diff --git a/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs index 1a505ebc764..e35c7c39fd5 100644 --- a/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ReportQpsScenarioServiceGrpc.cs @@ -67,7 +67,7 @@ namespace Grpc.Testing { { /// Creates a new client for ReportQpsScenarioService /// The channel to use to make remote calls. - public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel) + public ReportQpsScenarioServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for ReportQpsScenarioService that uses a custom CallInvoker. diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index e7b93094c65..f358a6d175c 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -216,7 +216,7 @@ namespace Grpc.Testing { { /// Creates a new client for TestService /// The channel to use to make remote calls. - public TestServiceClient(grpc::Channel channel) : base(channel) + public TestServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for TestService that uses a custom CallInvoker. @@ -602,7 +602,7 @@ namespace Grpc.Testing { { /// Creates a new client for UnimplementedService /// The channel to use to make remote calls. - public UnimplementedServiceClient(grpc::Channel channel) : base(channel) + public UnimplementedServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for UnimplementedService that uses a custom CallInvoker. @@ -741,7 +741,7 @@ namespace Grpc.Testing { { /// Creates a new client for ReconnectService /// The channel to use to make remote calls. - public ReconnectServiceClient(grpc::Channel channel) : base(channel) + public ReconnectServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for ReconnectService that uses a custom CallInvoker. diff --git a/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs b/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs index 14c26f99a6b..66378081626 100644 --- a/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/WorkerServiceGrpc.cs @@ -138,7 +138,7 @@ namespace Grpc.Testing { { /// Creates a new client for WorkerService /// The channel to use to make remote calls. - public WorkerServiceClient(grpc::Channel channel) : base(channel) + public WorkerServiceClient(grpc::ChannelBase channel) : base(channel) { } /// Creates a new client for WorkerService that uses a custom CallInvoker.