Imported Upstream version 1.21.0
[platform/upstream/grpc.git] / src / csharp / Grpc.IntegrationTesting / ReportQpsScenarioServiceGrpc.cs
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: src/proto/grpc/testing/report_qps_scenario_service.proto
4 // </auto-generated>
5 // Original file comments:
6 // Copyright 2015 gRPC authors.
7 //
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
11 //
12 //     http://www.apache.org/licenses/LICENSE-2.0
13 //
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.
19 //
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
24
25 using grpc = global::Grpc.Core;
26
27 namespace Grpc.Testing {
28   public static partial class ReportQpsScenarioService
29   {
30     static readonly string __ServiceName = "grpc.testing.ReportQpsScenarioService";
31
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);
34
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,
37         __ServiceName,
38         "ReportScenario",
39         __Marshaller_grpc_testing_ScenarioResult,
40         __Marshaller_grpc_testing_Void);
41
42     /// <summary>Service descriptor</summary>
43     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
44     {
45       get { return global::Grpc.Testing.ReportQpsScenarioServiceReflection.Descriptor.Services[0]; }
46     }
47
48     /// <summary>Base class for server-side implementations of ReportQpsScenarioService</summary>
49     [grpc::BindServiceMethod(typeof(ReportQpsScenarioService), "BindService")]
50     public abstract partial class ReportQpsScenarioServiceBase
51     {
52       /// <summary>
53       /// Report results of a QPS test benchmark scenario.
54       /// </summary>
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)
59       {
60         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
61       }
62
63     }
64
65     /// <summary>Client for ReportQpsScenarioService</summary>
66     public partial class ReportQpsScenarioServiceClient : grpc::ClientBase<ReportQpsScenarioServiceClient>
67     {
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)
71       {
72       }
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)
76       {
77       }
78       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
79       protected ReportQpsScenarioServiceClient() : base()
80       {
81       }
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)
85       {
86       }
87
88       /// <summary>
89       /// Report results of a QPS test benchmark scenario.
90       /// </summary>
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))
97       {
98         return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken));
99       }
100       /// <summary>
101       /// Report results of a QPS test benchmark scenario.
102       /// </summary>
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)
107       {
108         return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request);
109       }
110       /// <summary>
111       /// Report results of a QPS test benchmark scenario.
112       /// </summary>
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))
119       {
120         return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
121       }
122       /// <summary>
123       /// Report results of a QPS test benchmark scenario.
124       /// </summary>
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)
129       {
130         return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request);
131       }
132       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
133       protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration)
134       {
135         return new ReportQpsScenarioServiceClient(configuration);
136       }
137     }
138
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)
142     {
143       return grpc::ServerServiceDefinition.CreateBuilder()
144           .AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build();
145     }
146
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)
152     {
153       serviceBinder.AddMethod(__Method_ReportScenario, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void>(serviceImpl.ReportScenario));
154     }
155
156   }
157 }
158 #endregion