blob: 58439577e3067bd8d1c2c3ef3a58aca9aa14e029 [file] [log] [blame]
Jan Tattermusch02017762016-11-23 15:39:56 +01001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch091057a2016-11-24 13:08:45 +01002// source: grpc/reflection/v1alpha/reflection.proto
Jan Tattermusch02017762016-11-23 15:39:56 +01003// Original file comments:
Jan Tattermusch4d5c3102017-06-07 10:23:56 +02004// Copyright 2016 gRPC authors.
Jan Tattermusch02017762016-11-23 15:39:56 +01005//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +02006// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
Jan Tattermusch02017762016-11-23 15:39:56 +01009//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020010// http://www.apache.org/licenses/LICENSE-2.0
Jan Tattermusch02017762016-11-23 15:39:56 +010011//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020012// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
Jan Tattermusch02017762016-11-23 15:39:56 +010017//
18// Service exported by server reflection
19//
Jan Tattermuschca254732017-08-09 08:47:34 +020020#pragma warning disable 1591
Jan Tattermusch02017762016-11-23 15:39:56 +010021#region Designer generated code
22
23using System;
24using System.Threading;
25using System.Threading.Tasks;
Jan Tattermuschff4fc132017-03-14 09:27:50 +010026using grpc = global::Grpc.Core;
Jan Tattermusch02017762016-11-23 15:39:56 +010027
28namespace Grpc.Reflection.V1Alpha {
Jan Tattermusch091057a2016-11-24 13:08:45 +010029 public static partial class ServerReflection
Jan Tattermusch02017762016-11-23 15:39:56 +010030 {
31 static readonly string __ServiceName = "grpc.reflection.v1alpha.ServerReflection";
32
Jan Tattermuschff4fc132017-03-14 09:27:50 +010033 static readonly grpc::Marshaller<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest> __Marshaller_ServerReflectionRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Reflection.V1Alpha.ServerReflectionRequest.Parser.ParseFrom);
34 static readonly grpc::Marshaller<global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> __Marshaller_ServerReflectionResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Reflection.V1Alpha.ServerReflectionResponse.Parser.ParseFrom);
Jan Tattermusch02017762016-11-23 15:39:56 +010035
Jan Tattermuschff4fc132017-03-14 09:27:50 +010036 static readonly grpc::Method<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> __Method_ServerReflectionInfo = new grpc::Method<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse>(
37 grpc::MethodType.DuplexStreaming,
Jan Tattermusch02017762016-11-23 15:39:56 +010038 __ServiceName,
39 "ServerReflectionInfo",
40 __Marshaller_ServerReflectionRequest,
41 __Marshaller_ServerReflectionResponse);
42
43 /// <summary>Service descriptor</summary>
44 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
45 {
46 get { return global::Grpc.Reflection.V1Alpha.ReflectionReflection.Descriptor.Services[0]; }
47 }
48
49 /// <summary>Base class for server-side implementations of ServerReflection</summary>
Jan Tattermusch091057a2016-11-24 13:08:45 +010050 public abstract partial class ServerReflectionBase
Jan Tattermusch02017762016-11-23 15:39:56 +010051 {
52 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +010053 /// The reflection service is structured as a bidirectional stream, ensuring
54 /// all related requests go to a single server.
Jan Tattermusch02017762016-11-23 15:39:56 +010055 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +010056 /// <param name="requestStream">Used for reading requests from the client.</param>
57 /// <param name="responseStream">Used for sending responses back to the client.</param>
58 /// <param name="context">The context of the server-side call handler being invoked.</param>
59 /// <returns>A task indicating completion of the handler.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010060 public virtual global::System.Threading.Tasks.Task ServerReflectionInfo(grpc::IAsyncStreamReader<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest> requestStream, grpc::IServerStreamWriter<global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> responseStream, grpc::ServerCallContext context)
Jan Tattermusch02017762016-11-23 15:39:56 +010061 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010062 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermusch02017762016-11-23 15:39:56 +010063 }
64
65 }
66
67 /// <summary>Client for ServerReflection</summary>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010068 public partial class ServerReflectionClient : grpc::ClientBase<ServerReflectionClient>
Jan Tattermusch02017762016-11-23 15:39:56 +010069 {
70 /// <summary>Creates a new client for ServerReflection</summary>
71 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010072 public ServerReflectionClient(grpc::Channel channel) : base(channel)
Jan Tattermusch02017762016-11-23 15:39:56 +010073 {
74 }
75 /// <summary>Creates a new client for ServerReflection that uses a custom <c>CallInvoker</c>.</summary>
76 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010077 public ServerReflectionClient(grpc::CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch02017762016-11-23 15:39:56 +010078 {
79 }
80 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
81 protected ServerReflectionClient() : base()
82 {
83 }
84 /// <summary>Protected constructor to allow creation of configured clients.</summary>
85 /// <param name="configuration">The client configuration.</param>
86 protected ServerReflectionClient(ClientBaseConfiguration configuration) : base(configuration)
87 {
88 }
89
90 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +010091 /// The reflection service is structured as a bidirectional stream, ensuring
92 /// all related requests go to a single server.
Jan Tattermusch02017762016-11-23 15:39:56 +010093 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +010094 /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
95 /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
96 /// <param name="cancellationToken">An optional token for canceling the call.</param>
97 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010098 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> ServerReflectionInfo(grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermusch02017762016-11-23 15:39:56 +010099 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100100 return ServerReflectionInfo(new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermusch02017762016-11-23 15:39:56 +0100101 }
102 /// <summary>
Jan Tattermusch726f40f2016-12-12 12:09:35 +0100103 /// The reflection service is structured as a bidirectional stream, ensuring
104 /// all related requests go to a single server.
Jan Tattermusch02017762016-11-23 15:39:56 +0100105 /// </summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100106 /// <param name="options">The options for the call.</param>
107 /// <returns>The call object.</returns>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100108 public virtual grpc::AsyncDuplexStreamingCall<global::Grpc.Reflection.V1Alpha.ServerReflectionRequest, global::Grpc.Reflection.V1Alpha.ServerReflectionResponse> ServerReflectionInfo(grpc::CallOptions options)
Jan Tattermusch02017762016-11-23 15:39:56 +0100109 {
110 return CallInvoker.AsyncDuplexStreamingCall(__Method_ServerReflectionInfo, null, options);
111 }
112 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
113 protected override ServerReflectionClient NewInstance(ClientBaseConfiguration configuration)
114 {
115 return new ServerReflectionClient(configuration);
116 }
117 }
118
119 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100120 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100121 public static grpc::ServerServiceDefinition BindService(ServerReflectionBase serviceImpl)
Jan Tattermusch02017762016-11-23 15:39:56 +0100122 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100123 return grpc::ServerServiceDefinition.CreateBuilder()
Jan Tattermusch02017762016-11-23 15:39:56 +0100124 .AddMethod(__Method_ServerReflectionInfo, serviceImpl.ServerReflectionInfo).Build();
125 }
126
127 }
128}
129#endregion