blob: 3e8eb3468955605f8d0a4e7a3660c88f950e7d63 [file] [log] [blame]
Jan Tattermusch52534672015-07-14 20:29:21 -07001// Generated by the protocol buffer compiler. DO NOT EDIT!
Jan Tattermusch091057a2016-11-24 13:08:45 +01002// source: grpc/health/v1/health.proto
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07003// Original file comments:
Jan Tattermusch4d5c3102017-06-07 10:23:56 +02004// Copyright 2015 gRPC authors.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07005//
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 Tattermuschbfee01d2016-04-28 10:52:41 -07009//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020010// http://www.apache.org/licenses/LICENSE-2.0
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070011//
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 Tattermuschbfee01d2016-04-28 10:52:41 -070017//
Jan Tattermuschca254732017-08-09 08:47:34 +020018#pragma warning disable 1591
Jan Tattermusch52534672015-07-14 20:29:21 -070019#region Designer generated code
20
21using System;
22using System.Threading;
23using System.Threading.Tasks;
Jan Tattermuschff4fc132017-03-14 09:27:50 +010024using grpc = global::Grpc.Core;
Jan Tattermusch52534672015-07-14 20:29:21 -070025
yang-gaea13f12016-02-19 11:05:28 -080026namespace Grpc.Health.V1 {
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080027 public static partial class Health
Jan Tattermusch52534672015-07-14 20:29:21 -070028 {
yang-gaea13f12016-02-19 11:05:28 -080029 static readonly string __ServiceName = "grpc.health.v1.Health";
Jan Tattermusch52534672015-07-14 20:29:21 -070030
Jan Tattermuschff4fc132017-03-14 09:27:50 +010031 static readonly grpc::Marshaller<global::Grpc.Health.V1.HealthCheckRequest> __Marshaller_HealthCheckRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1.HealthCheckRequest.Parser.ParseFrom);
32 static readonly grpc::Marshaller<global::Grpc.Health.V1.HealthCheckResponse> __Marshaller_HealthCheckResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1.HealthCheckResponse.Parser.ParseFrom);
Jan Tattermusch52534672015-07-14 20:29:21 -070033
Jan Tattermuschff4fc132017-03-14 09:27:50 +010034 static readonly grpc::Method<global::Grpc.Health.V1.HealthCheckRequest, global::Grpc.Health.V1.HealthCheckResponse> __Method_Check = new grpc::Method<global::Grpc.Health.V1.HealthCheckRequest, global::Grpc.Health.V1.HealthCheckResponse>(
35 grpc::MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070036 __ServiceName,
Jan Tattermusch52534672015-07-14 20:29:21 -070037 "Check",
38 __Marshaller_HealthCheckRequest,
39 __Marshaller_HealthCheckResponse);
40
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070041 /// <summary>Service descriptor</summary>
Jan Tattermusche6af5d12015-08-03 10:57:43 -070042 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
43 {
yang-gaea13f12016-02-19 11:05:28 -080044 get { return global::Grpc.Health.V1.HealthReflection.Descriptor.Services[0]; }
Jan Tattermusche6af5d12015-08-03 10:57:43 -070045 }
46
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070047 /// <summary>Base class for server-side implementations of Health</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080048 public abstract partial class HealthBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070049 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010050 public virtual global::System.Threading.Tasks.Task<global::Grpc.Health.V1.HealthCheckResponse> Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::ServerCallContext context)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070051 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010052 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070053 }
54
55 }
56
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070057 /// <summary>Client for Health</summary>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010058 public partial class HealthClient : grpc::ClientBase<HealthClient>
Jan Tattermusch52534672015-07-14 20:29:21 -070059 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070060 /// <summary>Creates a new client for Health</summary>
61 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010062 public HealthClient(grpc::Channel channel) : base(channel)
Jan Tattermusch52534672015-07-14 20:29:21 -070063 {
64 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070065 /// <summary>Creates a new client for Health that uses a custom <c>CallInvoker</c>.</summary>
66 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010067 public HealthClient(grpc::CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch52534672015-07-14 20:29:21 -070068 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070069 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070070 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -070071 protected HealthClient() : base()
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070072 {
Jan Tattermusch52534672015-07-14 20:29:21 -070073 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070074 /// <summary>Protected constructor to allow creation of configured clients.</summary>
75 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -070076 protected HealthClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch52534672015-07-14 20:29:21 -070077 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070078 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -070079
Jan Tattermuschff4fc132017-03-14 09:27:50 +010080 public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070081 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010082 return Check(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -070083 }
Jan Tattermuschff4fc132017-03-14 09:27:50 +010084 public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -070085 {
86 return CallInvoker.BlockingUnaryCall(__Method_Check, null, options, request);
87 }
Jan Tattermuschff4fc132017-03-14 09:27:50 +010088 public virtual grpc::AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
Jan Tattermuschddc4e342016-03-21 19:03:14 -070089 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010090 return CheckAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -070091 }
Jan Tattermuschff4fc132017-03-14 09:27:50 +010092 public virtual grpc::AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -070093 {
94 return CallInvoker.AsyncUnaryCall(__Method_Check, null, options, request);
95 }
Jan Tattermusch10098d12016-10-06 13:15:12 +020096 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -070097 protected override HealthClient NewInstance(ClientBaseConfiguration configuration)
98 {
99 return new HealthClient(configuration);
Jan Tattermusch52534672015-07-14 20:29:21 -0700100 }
101 }
102
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700103 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100104 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100105 public static grpc::ServerServiceDefinition BindService(HealthBase serviceImpl)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700106 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100107 return grpc::ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700108 .AddMethod(__Method_Check, serviceImpl.Check).Build();
109 }
110
Jan Tattermusch52534672015-07-14 20:29:21 -0700111 }
112}
113#endregion