Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
Jan Tattermusch | 091057a | 2016-11-24 13:08:45 +0100 | [diff] [blame] | 2 | // source: grpc/health/v1/health.proto |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 3 | // Original file comments: |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 4 | // Copyright 2015 gRPC authors. |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 5 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 6 | // 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 Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 9 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 10 | // http://www.apache.org/licenses/LICENSE-2.0 |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 11 | // |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 12 | // 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 Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 17 | // |
Jan Tattermusch | ca25473 | 2017-08-09 08:47:34 +0200 | [diff] [blame] | 18 | #pragma warning disable 1591 |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 19 | #region Designer generated code |
| 20 | |
| 21 | using System; |
| 22 | using System.Threading; |
| 23 | using System.Threading.Tasks; |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 24 | using grpc = global::Grpc.Core; |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 25 | |
yang-g | aea13f1 | 2016-02-19 11:05:28 -0800 | [diff] [blame] | 26 | namespace Grpc.Health.V1 { |
Alexander Polcyn | c0f4c2c | 2016-11-07 10:24:35 -0800 | [diff] [blame] | 27 | public static partial class Health |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 28 | { |
yang-g | aea13f1 | 2016-02-19 11:05:28 -0800 | [diff] [blame] | 29 | static readonly string __ServiceName = "grpc.health.v1.Health"; |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 30 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 31 | 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 Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 33 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 34 | 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 Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 36 | __ServiceName, |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 37 | "Check", |
| 38 | __Marshaller_HealthCheckRequest, |
| 39 | __Marshaller_HealthCheckResponse); |
| 40 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 41 | /// <summary>Service descriptor</summary> |
Jan Tattermusch | e6af5d1 | 2015-08-03 10:57:43 -0700 | [diff] [blame] | 42 | public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor |
| 43 | { |
yang-g | aea13f1 | 2016-02-19 11:05:28 -0800 | [diff] [blame] | 44 | get { return global::Grpc.Health.V1.HealthReflection.Descriptor.Services[0]; } |
Jan Tattermusch | e6af5d1 | 2015-08-03 10:57:43 -0700 | [diff] [blame] | 45 | } |
| 46 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 47 | /// <summary>Base class for server-side implementations of Health</summary> |
Alexander Polcyn | c0f4c2c | 2016-11-07 10:24:35 -0800 | [diff] [blame] | 48 | public abstract partial class HealthBase |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 49 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 50 | public virtual global::System.Threading.Tasks.Task<global::Grpc.Health.V1.HealthCheckResponse> Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::ServerCallContext context) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 51 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 52 | throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, "")); |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | } |
| 56 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 57 | /// <summary>Client for Health</summary> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 58 | public partial class HealthClient : grpc::ClientBase<HealthClient> |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 59 | { |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 60 | /// <summary>Creates a new client for Health</summary> |
| 61 | /// <param name="channel">The channel to use to make remote calls.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 62 | public HealthClient(grpc::Channel channel) : base(channel) |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 63 | { |
| 64 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 65 | /// <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 Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 67 | public HealthClient(grpc::CallInvoker callInvoker) : base(callInvoker) |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 68 | { |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 69 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 70 | /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 71 | protected HealthClient() : base() |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 72 | { |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 73 | } |
Jan Tattermusch | ed6ea4c | 2016-06-22 12:38:44 -0700 | [diff] [blame] | 74 | /// <summary>Protected constructor to allow creation of configured clients.</summary> |
| 75 | /// <param name="configuration">The client configuration.</param> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 76 | protected HealthClient(ClientBaseConfiguration configuration) : base(configuration) |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 77 | { |
Jan Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 78 | } |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 79 | |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 80 | 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 Tattermusch | cc97fed | 2015-08-05 00:44:29 -0700 | [diff] [blame] | 81 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 82 | return Check(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 83 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 84 | public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 85 | { |
| 86 | return CallInvoker.BlockingUnaryCall(__Method_Check, null, options, request); |
| 87 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 88 | 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 Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 89 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 90 | return CheckAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken)); |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 91 | } |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 92 | public virtual grpc::AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options) |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 93 | { |
| 94 | return CallInvoker.AsyncUnaryCall(__Method_Check, null, options, request); |
| 95 | } |
Jan Tattermusch | 10098d1 | 2016-10-06 13:15:12 +0200 | [diff] [blame] | 96 | /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary> |
Jan Tattermusch | ddc4e34 | 2016-03-21 19:03:14 -0700 | [diff] [blame] | 97 | protected override HealthClient NewInstance(ClientBaseConfiguration configuration) |
| 98 | { |
| 99 | return new HealthClient(configuration); |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 100 | } |
| 101 | } |
| 102 | |
Jan Tattermusch | bfee01d | 2016-04-28 10:52:41 -0700 | [diff] [blame] | 103 | /// <summary>Creates service definition that can be registered with a server</summary> |
Jan Tattermusch | 00f6636 | 2016-12-12 13:02:29 +0100 | [diff] [blame] | 104 | /// <param name="serviceImpl">An object implementing the server-side handling logic.</param> |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 105 | public static grpc::ServerServiceDefinition BindService(HealthBase serviceImpl) |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 106 | { |
Jan Tattermusch | ff4fc13 | 2017-03-14 09:27:50 +0100 | [diff] [blame] | 107 | return grpc::ServerServiceDefinition.CreateBuilder() |
Jan Tattermusch | eeef5ed | 2016-03-14 16:08:39 -0700 | [diff] [blame] | 108 | .AddMethod(__Method_Check, serviceImpl.Check).Build(); |
| 109 | } |
| 110 | |
Jan Tattermusch | 5253467 | 2015-07-14 20:29:21 -0700 | [diff] [blame] | 111 | } |
| 112 | } |
| 113 | #endregion |