f92ae8e974b91b44f82ddf74d9c0daa87e4bb611
[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     public abstract partial class ReportQpsScenarioServiceBase
50     {
51       /// <summary>
52       /// Report results of a QPS test benchmark scenario.
53       /// </summary>
54       /// <param name="request">The request received from the client.</param>
55       /// <param name="context">The context of the server-side call handler being invoked.</param>
56       /// <returns>The response to send back to the client (wrapped by a task).</returns>
57       public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Void> ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::ServerCallContext context)
58       {
59         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
60       }
61
62     }
63
64     /// <summary>Client for ReportQpsScenarioService</summary>
65     public partial class ReportQpsScenarioServiceClient : grpc::ClientBase<ReportQpsScenarioServiceClient>
66     {
67       /// <summary>Creates a new client for ReportQpsScenarioService</summary>
68       /// <param name="channel">The channel to use to make remote calls.</param>
69       public ReportQpsScenarioServiceClient(grpc::Channel channel) : base(channel)
70       {
71       }
72       /// <summary>Creates a new client for ReportQpsScenarioService that uses a custom <c>CallInvoker</c>.</summary>
73       /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
74       public ReportQpsScenarioServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
75       {
76       }
77       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
78       protected ReportQpsScenarioServiceClient() : base()
79       {
80       }
81       /// <summary>Protected constructor to allow creation of configured clients.</summary>
82       /// <param name="configuration">The client configuration.</param>
83       protected ReportQpsScenarioServiceClient(ClientBaseConfiguration configuration) : base(configuration)
84       {
85       }
86
87       /// <summary>
88       /// Report results of a QPS test benchmark scenario.
89       /// </summary>
90       /// <param name="request">The request to send to the server.</param>
91       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
92       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
93       /// <param name="cancellationToken">An optional token for canceling the call.</param>
94       /// <returns>The response received from the server.</returns>
95       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))
96       {
97         return ReportScenario(request, new grpc::CallOptions(headers, deadline, cancellationToken));
98       }
99       /// <summary>
100       /// Report results of a QPS test benchmark scenario.
101       /// </summary>
102       /// <param name="request">The request to send to the server.</param>
103       /// <param name="options">The options for the call.</param>
104       /// <returns>The response received from the server.</returns>
105       public virtual global::Grpc.Testing.Void ReportScenario(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options)
106       {
107         return CallInvoker.BlockingUnaryCall(__Method_ReportScenario, null, options, request);
108       }
109       /// <summary>
110       /// Report results of a QPS test benchmark scenario.
111       /// </summary>
112       /// <param name="request">The request to send to the server.</param>
113       /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
114       /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
115       /// <param name="cancellationToken">An optional token for canceling the call.</param>
116       /// <returns>The call object.</returns>
117       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))
118       {
119         return ReportScenarioAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
120       }
121       /// <summary>
122       /// Report results of a QPS test benchmark scenario.
123       /// </summary>
124       /// <param name="request">The request to send to the server.</param>
125       /// <param name="options">The options for the call.</param>
126       /// <returns>The call object.</returns>
127       public virtual grpc::AsyncUnaryCall<global::Grpc.Testing.Void> ReportScenarioAsync(global::Grpc.Testing.ScenarioResult request, grpc::CallOptions options)
128       {
129         return CallInvoker.AsyncUnaryCall(__Method_ReportScenario, null, options, request);
130       }
131       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
132       protected override ReportQpsScenarioServiceClient NewInstance(ClientBaseConfiguration configuration)
133       {
134         return new ReportQpsScenarioServiceClient(configuration);
135       }
136     }
137
138     /// <summary>Creates service definition that can be registered with a server</summary>
139     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
140     public static grpc::ServerServiceDefinition BindService(ReportQpsScenarioServiceBase serviceImpl)
141     {
142       return grpc::ServerServiceDefinition.CreateBuilder()
143           .AddMethod(__Method_ReportScenario, serviceImpl.ReportScenario).Build();
144     }
145
146     /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
147     /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
148     /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
149     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
150     public static void BindService(grpc::ServiceBinderBase serviceBinder, ReportQpsScenarioServiceBase serviceImpl)
151     {
152       serviceBinder.AddMethod(__Method_ReportScenario, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Grpc.Testing.ScenarioResult, global::Grpc.Testing.Void>(serviceImpl.ReportScenario));
153     }
154
155   }
156 }
157 #endregion