blob: 24a72599798fa24efb62b0a8c2475d381b8864c2 [file] [log] [blame]
Jan Tattermusch386bbdf2017-12-13 02:42:22 +01001// <auto-generated>
2// Generated by the protocol buffer compiler. DO NOT EDIT!
3// source: grpc/health/v1/health.proto
4// </auto-generated>
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07005// Original file comments:
Jan Tattermusch4d5c3102017-06-07 10:23:56 +02006// Copyright 2015 gRPC authors.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -07007//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +02008// 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
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070011//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020012// http://www.apache.org/licenses/LICENSE-2.0
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070013//
Jan Tattermusch4d5c3102017-06-07 10:23:56 +020014// 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.
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070019//
Jan Tattermuschca254732017-08-09 08:47:34 +020020#pragma warning disable 1591
Jan Tattermusch52534672015-07-14 20:29:21 -070021#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 Tattermusch52534672015-07-14 20:29:21 -070027
yang-gaea13f12016-02-19 11:05:28 -080028namespace Grpc.Health.V1 {
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080029 public static partial class Health
Jan Tattermusch52534672015-07-14 20:29:21 -070030 {
yang-gaea13f12016-02-19 11:05:28 -080031 static readonly string __ServiceName = "grpc.health.v1.Health";
Jan Tattermusch52534672015-07-14 20:29:21 -070032
Jan Tattermuschff4fc132017-03-14 09:27:50 +010033 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);
34 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 -070035
Jan Tattermuschff4fc132017-03-14 09:27:50 +010036 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>(
37 grpc::MethodType.Unary,
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070038 __ServiceName,
Jan Tattermusch52534672015-07-14 20:29:21 -070039 "Check",
40 __Marshaller_HealthCheckRequest,
41 __Marshaller_HealthCheckResponse);
42
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070043 /// <summary>Service descriptor</summary>
Jan Tattermusche6af5d12015-08-03 10:57:43 -070044 public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
45 {
yang-gaea13f12016-02-19 11:05:28 -080046 get { return global::Grpc.Health.V1.HealthReflection.Descriptor.Services[0]; }
Jan Tattermusche6af5d12015-08-03 10:57:43 -070047 }
48
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070049 /// <summary>Base class for server-side implementations of Health</summary>
Alexander Polcync0f4c2c2016-11-07 10:24:35 -080050 public abstract partial class HealthBase
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070051 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010052 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 -070053 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010054 throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -070055 }
56
57 }
58
Jan Tattermuschbfee01d2016-04-28 10:52:41 -070059 /// <summary>Client for Health</summary>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010060 public partial class HealthClient : grpc::ClientBase<HealthClient>
Jan Tattermusch52534672015-07-14 20:29:21 -070061 {
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070062 /// <summary>Creates a new client for Health</summary>
63 /// <param name="channel">The channel to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010064 public HealthClient(grpc::Channel channel) : base(channel)
Jan Tattermusch52534672015-07-14 20:29:21 -070065 {
66 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070067 /// <summary>Creates a new client for Health that uses a custom <c>CallInvoker</c>.</summary>
68 /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +010069 public HealthClient(grpc::CallInvoker callInvoker) : base(callInvoker)
Jan Tattermusch52534672015-07-14 20:29:21 -070070 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070071 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070072 /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -070073 protected HealthClient() : base()
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070074 {
Jan Tattermusch52534672015-07-14 20:29:21 -070075 }
Jan Tattermusched6ea4c2016-06-22 12:38:44 -070076 /// <summary>Protected constructor to allow creation of configured clients.</summary>
77 /// <param name="configuration">The client configuration.</param>
Jan Tattermuschddc4e342016-03-21 19:03:14 -070078 protected HealthClient(ClientBaseConfiguration configuration) : base(configuration)
Jan Tattermusch52534672015-07-14 20:29:21 -070079 {
Jan Tattermuschcc97fed2015-08-05 00:44:29 -070080 }
Jan Tattermuschddc4e342016-03-21 19:03:14 -070081
Jan Tattermuschff4fc132017-03-14 09:27:50 +010082 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 -070083 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010084 return Check(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -070085 }
Jan Tattermuschff4fc132017-03-14 09:27:50 +010086 public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options)
Jan Tattermuschddc4e342016-03-21 19:03:14 -070087 {
88 return CallInvoker.BlockingUnaryCall(__Method_Check, null, options, request);
89 }
Jan Tattermuschff4fc132017-03-14 09:27:50 +010090 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 -070091 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +010092 return CheckAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
Jan Tattermuschddc4e342016-03-21 19:03:14 -070093 }
Jan Tattermuschff4fc132017-03-14 09:27:50 +010094 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 -070095 {
96 return CallInvoker.AsyncUnaryCall(__Method_Check, null, options, request);
97 }
Jan Tattermusch10098d12016-10-06 13:15:12 +020098 /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
Jan Tattermuschddc4e342016-03-21 19:03:14 -070099 protected override HealthClient NewInstance(ClientBaseConfiguration configuration)
100 {
101 return new HealthClient(configuration);
Jan Tattermusch52534672015-07-14 20:29:21 -0700102 }
103 }
104
Jan Tattermuschbfee01d2016-04-28 10:52:41 -0700105 /// <summary>Creates service definition that can be registered with a server</summary>
Jan Tattermusch00f66362016-12-12 13:02:29 +0100106 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100107 public static grpc::ServerServiceDefinition BindService(HealthBase serviceImpl)
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700108 {
Jan Tattermuschff4fc132017-03-14 09:27:50 +0100109 return grpc::ServerServiceDefinition.CreateBuilder()
Jan Tattermuscheeef5ed2016-03-14 16:08:39 -0700110 .AddMethod(__Method_Check, serviceImpl.Check).Build();
111 }
112
Jan Tattermusch52534672015-07-14 20:29:21 -0700113 }
114}
115#endregion