regenerate proto files for csharp, php, ruby

pull/25131/head
Jan Tattermusch 4 years ago
parent 8bb55930dc
commit 9c8818d2ee
  1. 997
      src/csharp/Grpc.IntegrationTesting/Messages.cs
  2. 20
      src/csharp/Grpc.IntegrationTesting/Test.cs
  3. 230
      src/csharp/Grpc.IntegrationTesting/TestGrpc.cs
  4. BIN
      src/php/tests/generated_code/GPBMetadata/Math.php
  5. BIN
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/Messages.php
  6. 9
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/PBEmpty.php
  7. BIN
      src/php/tests/interop/GPBMetadata/Src/Proto/Grpc/Testing/Test.php

File diff suppressed because it is too large Load Diff

@ -47,13 +47,19 @@ namespace Grpc.Testing {
"bmcuRW1wdHkaEy5ncnBjLnRlc3RpbmcuRW1wdHkyiQEKEFJlY29ubmVjdFNl",
"cnZpY2USOwoFU3RhcnQSHS5ncnBjLnRlc3RpbmcuUmVjb25uZWN0UGFyYW1z",
"GhMuZ3JwYy50ZXN0aW5nLkVtcHR5EjgKBFN0b3ASEy5ncnBjLnRlc3Rpbmcu",
"RW1wdHkaGy5ncnBjLnRlc3RpbmcuUmVjb25uZWN0SW5mbzJ/ChhMb2FkQmFs",
"YW5jZXJTdGF0c1NlcnZpY2USYwoOR2V0Q2xpZW50U3RhdHMSJi5ncnBjLnRl",
"c3RpbmcuTG9hZEJhbGFuY2VyU3RhdHNSZXF1ZXN0GicuZ3JwYy50ZXN0aW5n",
"LkxvYWRCYWxhbmNlclN0YXRzUmVzcG9uc2UiADKLAQoWWGRzVXBkYXRlSGVh",
"bHRoU2VydmljZRI2CgpTZXRTZXJ2aW5nEhMuZ3JwYy50ZXN0aW5nLkVtcHR5",
"GhMuZ3JwYy50ZXN0aW5nLkVtcHR5EjkKDVNldE5vdFNlcnZpbmcSEy5ncnBj",
"LnRlc3RpbmcuRW1wdHkaEy5ncnBjLnRlc3RpbmcuRW1wdHliBnByb3RvMw=="));
"RW1wdHkaGy5ncnBjLnRlc3RpbmcuUmVjb25uZWN0SW5mbzKGAgoYTG9hZEJh",
"bGFuY2VyU3RhdHNTZXJ2aWNlEmMKDkdldENsaWVudFN0YXRzEiYuZ3JwYy50",
"ZXN0aW5nLkxvYWRCYWxhbmNlclN0YXRzUmVxdWVzdBonLmdycGMudGVzdGlu",
"Zy5Mb2FkQmFsYW5jZXJTdGF0c1Jlc3BvbnNlIgAShAEKGUdldENsaWVudEFj",
"Y3VtdWxhdGVkU3RhdHMSMS5ncnBjLnRlc3RpbmcuTG9hZEJhbGFuY2VyQWNj",
"dW11bGF0ZWRTdGF0c1JlcXVlc3QaMi5ncnBjLnRlc3RpbmcuTG9hZEJhbGFu",
"Y2VyQWNjdW11bGF0ZWRTdGF0c1Jlc3BvbnNlIgAyiwEKFlhkc1VwZGF0ZUhl",
"YWx0aFNlcnZpY2USNgoKU2V0U2VydmluZxITLmdycGMudGVzdGluZy5FbXB0",
"eRoTLmdycGMudGVzdGluZy5FbXB0eRI5Cg1TZXROb3RTZXJ2aW5nEhMuZ3Jw",
"Yy50ZXN0aW5nLkVtcHR5GhMuZ3JwYy50ZXN0aW5nLkVtcHR5MnsKH1hkc1Vw",
"ZGF0ZUNsaWVudENvbmZpZ3VyZVNlcnZpY2USWAoJQ29uZmlndXJlEiQuZ3Jw",
"Yy50ZXN0aW5nLkNsaWVudENvbmZpZ3VyZVJlcXVlc3QaJS5ncnBjLnRlc3Rp",
"bmcuQ2xpZW50Q29uZmlndXJlUmVzcG9uc2ViBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Grpc.Testing.EmptyReflection.Descriptor, global::Grpc.Testing.MessagesReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, null, null));

@ -947,6 +947,8 @@ namespace Grpc.Testing {
static readonly grpc::Marshaller<global::Grpc.Testing.LoadBalancerStatsRequest> __Marshaller_grpc_testing_LoadBalancerStatsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerStatsRequest.Parser));
static readonly grpc::Marshaller<global::Grpc.Testing.LoadBalancerStatsResponse> __Marshaller_grpc_testing_LoadBalancerStatsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerStatsResponse.Parser));
static readonly grpc::Marshaller<global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest> __Marshaller_grpc_testing_LoadBalancerAccumulatedStatsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest.Parser));
static readonly grpc::Marshaller<global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> __Marshaller_grpc_testing_LoadBalancerAccumulatedStatsResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse.Parser));
static readonly grpc::Method<global::Grpc.Testing.LoadBalancerStatsRequest, global::Grpc.Testing.LoadBalancerStatsResponse> __Method_GetClientStats = new grpc::Method<global::Grpc.Testing.LoadBalancerStatsRequest, global::Grpc.Testing.LoadBalancerStatsResponse>(
grpc::MethodType.Unary,
@ -955,6 +957,13 @@ namespace Grpc.Testing {
__Marshaller_grpc_testing_LoadBalancerStatsRequest,
__Marshaller_grpc_testing_LoadBalancerStatsResponse);
static readonly grpc::Method<global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> __Method_GetClientAccumulatedStats = new grpc::Method<global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse>(
grpc::MethodType.Unary,
__ServiceName,
"GetClientAccumulatedStats",
__Marshaller_grpc_testing_LoadBalancerAccumulatedStatsRequest,
__Marshaller_grpc_testing_LoadBalancerAccumulatedStatsResponse);
/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
@ -976,6 +985,17 @@ namespace Grpc.Testing {
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
/// <summary>
/// Gets the accumulated stats for RPCs sent by a test client.
/// </summary>
/// <param name="request">The request received from the client.</param>
/// <param name="context">The context of the server-side call handler being invoked.</param>
/// <returns>The response to send back to the client (wrapped by a task).</returns>
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// <summary>Client for LoadBalancerStatsService</summary>
@ -1045,6 +1065,50 @@ namespace Grpc.Testing {
{
return CallInvoker.AsyncUnaryCall(__Method_GetClientStats, null, options, request);
}
/// <summary>
/// Gets the accumulated stats for RPCs sent by a test client.
/// </summary>
/// <param name="request">The request to send to the server.</param>
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
/// <param name="cancellationToken">An optional token for canceling the call.</param>
/// <returns>The response received from the server.</returns>
public virtual global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetClientAccumulatedStats(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
/// <summary>
/// Gets the accumulated stats for RPCs sent by a test client.
/// </summary>
/// <param name="request">The request to send to the server.</param>
/// <param name="options">The options for the call.</param>
/// <returns>The response received from the server.</returns>
public virtual global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse GetClientAccumulatedStats(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_GetClientAccumulatedStats, null, options, request);
}
/// <summary>
/// Gets the accumulated stats for RPCs sent by a test client.
/// </summary>
/// <param name="request">The request to send to the server.</param>
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
/// <param name="cancellationToken">An optional token for canceling the call.</param>
/// <returns>The call object.</returns>
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> GetClientAccumulatedStatsAsync(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetClientAccumulatedStatsAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
/// <summary>
/// Gets the accumulated stats for RPCs sent by a test client.
/// </summary>
/// <param name="request">The request to send to the server.</param>
/// <param name="options">The options for the call.</param>
/// <returns>The call object.</returns>
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse> GetClientAccumulatedStatsAsync(global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_GetClientAccumulatedStats, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override LoadBalancerStatsServiceClient NewInstance(ClientBaseConfiguration configuration)
{
@ -1057,7 +1121,8 @@ namespace Grpc.Testing {
public static grpc::ServerServiceDefinition BindService(LoadBalancerStatsServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_GetClientStats, serviceImpl.GetClientStats).Build();
.AddMethod(__Method_GetClientStats, serviceImpl.GetClientStats)
.AddMethod(__Method_GetClientAccumulatedStats, serviceImpl.GetClientAccumulatedStats).Build();
}
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
@ -1067,6 +1132,7 @@ namespace Grpc.Testing {
public static void BindService(grpc::ServiceBinderBase serviceBinder, LoadBalancerStatsServiceBase serviceImpl)
{
serviceBinder.AddMethod(__Method_GetClientStats, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.LoadBalancerStatsRequest, global::Grpc.Testing.LoadBalancerStatsResponse>(serviceImpl.GetClientStats));
serviceBinder.AddMethod(__Method_GetClientAccumulatedStats, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.LoadBalancerAccumulatedStatsRequest, global::Grpc.Testing.LoadBalancerAccumulatedStatsResponse>(serviceImpl.GetClientAccumulatedStats));
}
}
@ -1227,5 +1293,167 @@ namespace Grpc.Testing {
}
}
/// <summary>
/// A service to dynamically update the configuration of an xDS test client.
/// </summary>
public static partial class XdsUpdateClientConfigureService
{
static readonly string __ServiceName = "grpc.testing.XdsUpdateClientConfigureService";
static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
{
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
if (message is global::Google.Protobuf.IBufferMessage)
{
context.SetPayloadLength(message.CalculateSize());
global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
context.Complete();
return;
}
#endif
context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
}
static class __Helper_MessageCache<T>
{
public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
}
static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
{
#if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
if (__Helper_MessageCache<T>.IsBufferMessage)
{
return parser.ParseFrom(context.PayloadAsReadOnlySequence());
}
#endif
return parser.ParseFrom(context.PayloadAsNewBuffer());
}
static readonly grpc::Marshaller<global::Grpc.Testing.ClientConfigureRequest> __Marshaller_grpc_testing_ClientConfigureRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ClientConfigureRequest.Parser));
static readonly grpc::Marshaller<global::Grpc.Testing.ClientConfigureResponse> __Marshaller_grpc_testing_ClientConfigureResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Grpc.Testing.ClientConfigureResponse.Parser));
static readonly grpc::Method<global::Grpc.Testing.ClientConfigureRequest, global::Grpc.Testing.ClientConfigureResponse> __Method_Configure = new grpc::Method<global::Grpc.Testing.ClientConfigureRequest, global::Grpc.Testing.ClientConfigureResponse>(
grpc::MethodType.Unary,
__ServiceName,
"Configure",
__Marshaller_grpc_testing_ClientConfigureRequest,
__Marshaller_grpc_testing_ClientConfigureResponse);
/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::Grpc.Testing.TestReflection.Descriptor.Services[5]; }
}
/// <summary>Base class for server-side implementations of XdsUpdateClientConfigureService</summary>
[grpc::BindServiceMethod(typeof(XdsUpdateClientConfigureService), "BindService")]
public abstract partial class XdsUpdateClientConfigureServiceBase
{
/// <summary>
/// Update the tes client's configuration.
/// </summary>
/// <param name="request">The request received from the client.</param>
/// <param name="context">The context of the server-side call handler being invoked.</param>
/// <returns>The response to send back to the client (wrapped by a task).</returns>
public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.ClientConfigureResponse> Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}
}
/// <summary>Client for XdsUpdateClientConfigureService</summary>
public partial class XdsUpdateClientConfigureServiceClient : grpc::ClientBase<XdsUpdateClientConfigureServiceClient>
{
/// <summary>Creates a new client for XdsUpdateClientConfigureService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public XdsUpdateClientConfigureServiceClient(grpc::ChannelBase channel) : base(channel)
{
}
/// <summary>Creates a new client for XdsUpdateClientConfigureService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public XdsUpdateClientConfigureServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected XdsUpdateClientConfigureServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected XdsUpdateClientConfigureServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}
/// <summary>
/// Update the tes client's configuration.
/// </summary>
/// <param name="request">The request to send to the server.</param>
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
/// <param name="cancellationToken">An optional token for canceling the call.</param>
/// <returns>The response received from the server.</returns>
public virtual global::Grpc.Testing.ClientConfigureResponse Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return Configure(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
/// <summary>
/// Update the tes client's configuration.
/// </summary>
/// <param name="request">The request to send to the server.</param>
/// <param name="options">The options for the call.</param>
/// <returns>The response received from the server.</returns>
public virtual global::Grpc.Testing.ClientConfigureResponse Configure(global::Grpc.Testing.ClientConfigureRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_Configure, null, options, request);
}
/// <summary>
/// Update the tes client's configuration.
/// </summary>
/// <param name="request">The request to send to the server.</param>
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
/// <param name="cancellationToken">An optional token for canceling the call.</param>
/// <returns>The call object.</returns>
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.ClientConfigureResponse> ConfigureAsync(global::Grpc.Testing.ClientConfigureRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return ConfigureAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
/// <summary>
/// Update the tes client's configuration.
/// </summary>
/// <param name="request">The request to send to the server.</param>
/// <param name="options">The options for the call.</param>
/// <returns>The call object.</returns>
public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.ClientConfigureResponse> ConfigureAsync(global::Grpc.Testing.ClientConfigureRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_Configure, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override XdsUpdateClientConfigureServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new XdsUpdateClientConfigureServiceClient(configuration);
}
}
/// <summary>Creates service definition that can be registered with a server</summary>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static grpc::ServerServiceDefinition BindService(XdsUpdateClientConfigureServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_Configure, serviceImpl.Configure).Build();
}
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static void BindService(grpc::ServiceBinderBase serviceBinder, XdsUpdateClientConfigureServiceBase serviceImpl)
{
serviceBinder.AddMethod(__Method_Configure, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.ClientConfigureRequest, global::Grpc.Testing.ClientConfigureResponse>(serviceImpl.Configure));
}
}
}
#endregion

@ -14,9 +14,12 @@ class PBEmpty
if (static::$is_initialized == true) {
return;
}
$pool->internalAddGeneratedFile(hex2bin(
"0a4a0a227372632f70726f746f2f677270632f74657374696e672f656d7074792e70726f746f120c677270632e74657374696e67220e0a0c456d7074794d657373616765620670726f746f33"
), true);
$pool->internalAddGeneratedFile(
'
J
"src/proto/grpc/testing/empty.proto grpc.testing"
EmptyMessagebproto3'
, true);
static::$is_initialized = true;
}

Loading…
Cancel
Save