2 // Generated by the protocol buffer compiler. DO NOT EDIT!
3 // source: src/proto/grpc/testing/report_qps_scenario_service.proto
5 // Original file comments:
6 // Copyright 2015 gRPC authors.
8 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
12 // http://www.apache.org/licenses/LICENSE-2.0
14 // Unless required by applicable law or agreed to in writing, software
15 // distributed under the License is distributed on an "AS IS" BASIS,
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 // See the License for the specific language governing permissions and
18 // limitations under the License.
20 // An integration test service that covers all the method signature permutations
21 // of unary/streaming requests/responses.
22 #pragma warning disable 0414, 1591
23 #region Designer generated code
25 using grpc = global::Grpc.Core;
27 namespace Grpc.Testing {
28 public static partial class ReportQpsScenarioService
30 static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService";
32 static readonly grpc::Marshaller<global::Grpc.Testing.ScenarioResult> __Marshaller_grpc_testing_ScenarioResult = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.ScenarioResult.Parser.ParseFrom);
33 static readonly grpc::Marshaller<global::Grpc.Testing.Void> __Marshaller_grpc_testing_Void = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Testing.Void.Parser.ParseFrom);
35 static readonly grpc::Method<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void> __Method_ReportScenario = new grpc::Method<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void>(
36 grpc::MethodType.Unary,
39 __Marshaller_grpc_testing_ScenarioResult,
40 __Marshaller_grpc_testing_Void);
42 /// <summary>Service descriptor</summary>
43 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
45 get { return global::Grpc.Testing.ReportQpsScenarioServiceReflection.Descriptor.Services[0]; }
48 /// <summary>Base class for server-side implementations of ReportQpsScenarioService</summary>
49 [grpc::BindServiceMethod(typeof(ReportQpsScenarioService), "BindService")]
50 public abstract partial class ReportQpsScenarioServiceBase
53 /// Report results of a QPS test benchmark scenario.
55 /// <param name="request">The request received from the client.</param>
56 /// <param name="context">The context of the server-side call handler being invoked.</param>
57 /// <returns>The response to send back to the client (wrapped by a task).</returns>
58 public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context)
60 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
65 /// <summary>Client for ReportQpsScenarioService</summary>
66 public partial class ReportQpsScenarioServiceClient : grpc::ClientBase<ReportQpsScenarioServiceClient>
68 /// <summary>Creates a new client for ReportQpsScenarioService</summary>
69 /// <param name="channel">The channel to use to make remote calls.</param>
70 public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel)
73 /// <summary>Creates a new client for ReportQpsScenarioService that uses a custom <c>CallInvoker</c>.</summary>
74 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
75 public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
78 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
79 protected ReportQpsScenarioServiceClient() : base()
82 /// <summary>Protected constructor to allow creation of configured clients.</summary>
83 /// <param name="configuration">The client configuration.</param>
84 protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration)
89 /// Report results of a QPS test benchmark scenario.
91 /// <param name="request">The request to send to the server.</param>
92 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
93 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
94 /// <param name="cancellationToken">An optional token for canceling the call.</param>
95 /// <returns>The response received from the server.</returns>
96 public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
98 return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken));
101 /// Report results of a QPS test benchmark scenario.
103 /// <param name="request">The request to send to the server.</param>
104 /// <param name="options">The options for the call.</param>
105 /// <returns>The response received from the server.</returns>
106 public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options)
108 return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request);
111 /// Report results of a QPS test benchmark scenario.
113 /// <param name="request">The request to send to the server.</param>
114 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
115 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
116 /// <param name="cancellationToken">An optional token for canceling the call.</param>
117 /// <returns>The call object.</returns>
118 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
120 return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
123 /// Report results of a QPS test benchmark scenario.
125 /// <param name="request">The request to send to the server.</param>
126 /// <param name="options">The options for the call.</param>
127 /// <returns>The call object.</returns>
128 public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options)
130 return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request);
132 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
133 protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration)
135 return new ReportQpsScenarioServiceClient(configuration);
139 /// <summary>Creates service definition that can be registered with a server</summary>
140 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
141 public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl)
143 return grpc::ServerServiceDefinition.CreateBuilder()
144 .AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build();
147 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
148 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
149 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
150 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
151 public static void BindService(grpc::ServiceBinderBase serviceBinder, ReportQpsScenarioServiceBase serviceImpl)
153 serviceBinder.AddMethod(__Method_ReportScenario, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void>(serviceImpl.ReportScenario));