• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: grpc/health/v1/health.proto
4 // </auto-generated>
5 // Original file comments:
6 // Copyright 2015 The 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 // The canonical version of this proto can be found at
21 // https://github.com/grpc/grpc-proto/blob/master/grpc/health/v1/health.proto
22 //
23 #pragma warning disable 0414, 1591
24 #region Designer generated code
25 
26 using grpc = global::Grpc.Core;
27 
28 namespace Grpc.Health.V1 {
29   public static partial class Health
30   {
31     static readonly string __ServiceName = "grpc.health.v1.Health";
32 
33     static readonly grpc::Marshaller<global::Grpc.Health.V1.HealthCheckRequest> __Marshaller_grpc_health_v1_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_grpc_health_v1_HealthCheckResponse = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Grpc.Health.V1.HealthCheckResponse.Parser.ParseFrom);
35 
36     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,
38         __ServiceName,
39         "Check",
40         __Marshaller_grpc_health_v1_HealthCheckRequest,
41         __Marshaller_grpc_health_v1_HealthCheckResponse);
42 
43     /// <summary>Service descriptor</summary>
44     public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
45     {
46       get { return global::Grpc.Health.V1.HealthReflection.Descriptor.Services[0]; }
47     }
48 
49     /// <summary>Base class for server-side implementations of Health</summary>
50     public abstract partial class HealthBase
51     {
Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::ServerCallContext context)52       public virtual global::System.Threading.Tasks.Task<global::Grpc.Health.V1.HealthCheckResponse> Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::ServerCallContext context)
53       {
54         throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
55       }
56 
57     }
58 
59     /// <summary>Client for Health</summary>
60     public partial class HealthClient : grpc::ClientBase<HealthClient>
61     {
62       /// <summary>Creates a new client for Health</summary>
63       /// <param name="channel">The channel to use to make remote calls.</param>
HealthClient(grpc::Channel channel)64       public HealthClient(grpc::Channel channel) : base(channel)
65       {
66       }
67       /// <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>
HealthClient(grpc::CallInvoker callInvoker)69       public HealthClient(grpc::CallInvoker callInvoker) : base(callInvoker)
70       {
71       }
72       /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
HealthClient()73       protected HealthClient() : base()
74       {
75       }
76       /// <summary>Protected constructor to allow creation of configured clients.</summary>
77       /// <param name="configuration">The client configuration.</param>
HealthClient(ClientBaseConfiguration configuration)78       protected HealthClient(ClientBaseConfiguration configuration) : base(configuration)
79       {
80       }
81 
Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))82       public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
83       {
84         return Check(request, new grpc::CallOptions(headers, deadline, cancellationToken));
85       }
Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options)86       public virtual global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options)
87       {
88         return CallInvoker.BlockingUnaryCall(__Method_Check, null, options, request);
89       }
CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))90       public virtual grpc::AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
91       {
92         return CheckAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
93       }
CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options)94       public virtual grpc::AsyncUnaryCall<global::Grpc.Health.V1.HealthCheckResponse> CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, grpc::CallOptions options)
95       {
96         return CallInvoker.AsyncUnaryCall(__Method_Check, null, options, request);
97       }
98       /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
NewInstance(ClientBaseConfiguration configuration)99       protected override HealthClient NewInstance(ClientBaseConfiguration configuration)
100       {
101         return new HealthClient(configuration);
102       }
103     }
104 
105     /// <summary>Creates service definition that can be registered with a server</summary>
106     /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
BindService(HealthBase serviceImpl)107     public static grpc::ServerServiceDefinition BindService(HealthBase serviceImpl)
108     {
109       return grpc::ServerServiceDefinition.CreateBuilder()
110           .AddMethod(__Method_Check, serviceImpl.Check).Build();
111     }
112 
113   }
114 }
115 #endregion
116