// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: explainer.proto
#region Designer generated code

using System;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core;

namespace Explainer {
  public static class ShiFu
  {
    static readonly string __ServiceName = "explainer.ShiFu";

    static readonly Marshaller<global::Explainer.ExplainerRequest> __Marshaller_ExplainerRequest = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Explainer.ExplainerRequest.Parser.ParseFrom);
    static readonly Marshaller<global::Explainer.ExplainerReply> __Marshaller_ExplainerReply = Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Explainer.ExplainerReply.Parser.ParseFrom);

    static readonly Method<global::Explainer.ExplainerRequest, global::Explainer.ExplainerReply> __Method_TellMeWhy = new Method<global::Explainer.ExplainerRequest, global::Explainer.ExplainerReply>(
        MethodType.Unary,
        __ServiceName,
        "TellMeWhy",
        __Marshaller_ExplainerRequest,
        __Marshaller_ExplainerReply);

    // service descriptor
    public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
    {
      get { return global::Explainer.ExplainerReflection.Descriptor.Services[0]; }
    }

    // client interface
    public interface IShiFuClient
    {
      global::Explainer.ExplainerReply TellMeWhy(global::Explainer.ExplainerRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
      global::Explainer.ExplainerReply TellMeWhy(global::Explainer.ExplainerRequest request, CallOptions options);
      AsyncUnaryCall<global::Explainer.ExplainerReply> TellMeWhyAsync(global::Explainer.ExplainerRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));
      AsyncUnaryCall<global::Explainer.ExplainerReply> TellMeWhyAsync(global::Explainer.ExplainerRequest request, CallOptions options);
    }

    // server-side interface
    public interface IShiFu
    {
      Task<global::Explainer.ExplainerReply> TellMeWhy(global::Explainer.ExplainerRequest request, ServerCallContext context);
    }

    // client stub
    public class ShiFuClient : ClientBase, IShiFuClient
    {
      public ShiFuClient(Channel channel) : base(channel)
      {
      }
      public global::Explainer.ExplainerReply TellMeWhy(global::Explainer.ExplainerRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        var call = CreateCall(__Method_TellMeWhy, new CallOptions(headers, deadline, cancellationToken));
        return Calls.BlockingUnaryCall(call, request);
      }
      public global::Explainer.ExplainerReply TellMeWhy(global::Explainer.ExplainerRequest request, CallOptions options)
      {
        var call = CreateCall(__Method_TellMeWhy, options);
        return Calls.BlockingUnaryCall(call, request);
      }
      public AsyncUnaryCall<global::Explainer.ExplainerReply> TellMeWhyAsync(global::Explainer.ExplainerRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))
      {
        var call = CreateCall(__Method_TellMeWhy, new CallOptions(headers, deadline, cancellationToken));
        return Calls.AsyncUnaryCall(call, request);
      }
      public AsyncUnaryCall<global::Explainer.ExplainerReply> TellMeWhyAsync(global::Explainer.ExplainerRequest request, CallOptions options)
      {
        var call = CreateCall(__Method_TellMeWhy, options);
        return Calls.AsyncUnaryCall(call, request);
      }
    }

    // creates service definition that can be registered with a server
    public static ServerServiceDefinition BindService(IShiFu serviceImpl)
    {
      return ServerServiceDefinition.CreateBuilder(__ServiceName)
          .AddMethod(__Method_TellMeWhy, serviceImpl.TellMeWhy).Build();
    }

    // creates a new client
    public static ShiFuClient NewClient(Channel channel)
    {
      return new ShiFuClient(channel);
    }

  }
}
#endregion
