// <auto-generated>
//     Generated by the protocol buffer compiler.  DO NOT EDIT!
//     source: mxaccess_gateway.proto
// </auto-generated>
#pragma warning disable 0414, 1591, 8981, 0612
#region Designer generated code

using grpc = global::Grpc.Core;

namespace ZB.MOM.WW.MxGateway.Contracts.Proto {
  /// <summary>
  /// Public client API for MXAccess sessions hosted by the gateway.
  /// </summary>
  public static partial class MxAccessGateway
  {
    static readonly string __ServiceName = "mxaccess_gateway.v1.MxAccessGateway";

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static void __Helper_SerializeMessage(global::Google.Protobuf.IMessage message, grpc::SerializationContext context)
    {
      #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
      if (message is global::Google.Protobuf.IBufferMessage)
      {
        context.SetPayloadLength(message.CalculateSize());
        global::Google.Protobuf.MessageExtensions.WriteTo(message, context.GetBufferWriter());
        context.Complete();
        return;
      }
      #endif
      context.Complete(global::Google.Protobuf.MessageExtensions.ToByteArray(message));
    }

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static class __Helper_MessageCache<T>
    {
      public static readonly bool IsBufferMessage = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(global::Google.Protobuf.IBufferMessage)).IsAssignableFrom(typeof(T));
    }

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static T __Helper_DeserializeMessage<T>(grpc::DeserializationContext context, global::Google.Protobuf.MessageParser<T> parser) where T : global::Google.Protobuf.IMessage<T>
    {
      #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
      if (__Helper_MessageCache<T>.IsBufferMessage)
      {
        return parser.ParseFrom(context.PayloadAsReadOnlySequence());
      }
      #endif
      return parser.ParseFrom(context.PayloadAsNewBuffer());
    }

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest> __Marshaller_mxaccess_gateway_v1_OpenSessionRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply> __Marshaller_mxaccess_gateway_v1_OpenSessionReply = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest> __Marshaller_mxaccess_gateway_v1_CloseSessionRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply> __Marshaller_mxaccess_gateway_v1_CloseSessionReply = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest> __Marshaller_mxaccess_gateway_v1_MxCommandRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply> __Marshaller_mxaccess_gateway_v1_MxCommandReply = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamEventsRequest> __Marshaller_mxaccess_gateway_v1_StreamEventsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamEventsRequest.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEvent> __Marshaller_mxaccess_gateway_v1_MxEvent = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEvent.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest> __Marshaller_mxaccess_gateway_v1_AcknowledgeAlarmRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply> __Marshaller_mxaccess_gateway_v1_AcknowledgeAlarmReply = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest> __Marshaller_mxaccess_gateway_v1_StreamAlarmsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage> __Marshaller_mxaccess_gateway_v1_AlarmFeedMessage = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.QueryActiveAlarmsRequest> __Marshaller_mxaccess_gateway_v1_QueryActiveAlarmsRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.QueryActiveAlarmsRequest.Parser));
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Marshaller<global::ZB.MOM.WW.MxGateway.Contracts.Proto.ActiveAlarmSnapshot> __Marshaller_mxaccess_gateway_v1_ActiveAlarmSnapshot = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::ZB.MOM.WW.MxGateway.Contracts.Proto.ActiveAlarmSnapshot.Parser));

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply> __Method_OpenSession = new grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply>(
        grpc::MethodType.Unary,
        __ServiceName,
        "OpenSession",
        __Marshaller_mxaccess_gateway_v1_OpenSessionRequest,
        __Marshaller_mxaccess_gateway_v1_OpenSessionReply);

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply> __Method_CloseSession = new grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply>(
        grpc::MethodType.Unary,
        __ServiceName,
        "CloseSession",
        __Marshaller_mxaccess_gateway_v1_CloseSessionRequest,
        __Marshaller_mxaccess_gateway_v1_CloseSessionReply);

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply> __Method_Invoke = new grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply>(
        grpc::MethodType.Unary,
        __ServiceName,
        "Invoke",
        __Marshaller_mxaccess_gateway_v1_MxCommandRequest,
        __Marshaller_mxaccess_gateway_v1_MxCommandReply);

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamEventsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEvent> __Method_StreamEvents = new grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamEventsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEvent>(
        grpc::MethodType.ServerStreaming,
        __ServiceName,
        "StreamEvents",
        __Marshaller_mxaccess_gateway_v1_StreamEventsRequest,
        __Marshaller_mxaccess_gateway_v1_MxEvent);

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply> __Method_AcknowledgeAlarm = new grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply>(
        grpc::MethodType.Unary,
        __ServiceName,
        "AcknowledgeAlarm",
        __Marshaller_mxaccess_gateway_v1_AcknowledgeAlarmRequest,
        __Marshaller_mxaccess_gateway_v1_AcknowledgeAlarmReply);

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage> __Method_StreamAlarms = new grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage>(
        grpc::MethodType.ServerStreaming,
        __ServiceName,
        "StreamAlarms",
        __Marshaller_mxaccess_gateway_v1_StreamAlarmsRequest,
        __Marshaller_mxaccess_gateway_v1_AlarmFeedMessage);

    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    static readonly grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.QueryActiveAlarmsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.ActiveAlarmSnapshot> __Method_QueryActiveAlarms = new grpc::Method<global::ZB.MOM.WW.MxGateway.Contracts.Proto.QueryActiveAlarmsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.ActiveAlarmSnapshot>(
        grpc::MethodType.ServerStreaming,
        __ServiceName,
        "QueryActiveAlarms",
        __Marshaller_mxaccess_gateway_v1_QueryActiveAlarmsRequest,
        __Marshaller_mxaccess_gateway_v1_ActiveAlarmSnapshot);

    /// <summary>Service descriptor</summary>
    public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
    {
      get { return global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxaccessGatewayReflection.Descriptor.Services[0]; }
    }

    /// <summary>Base class for server-side implementations of MxAccessGateway</summary>
    [grpc::BindServiceMethod(typeof(MxAccessGateway), "BindService")]
    public abstract partial class MxAccessGatewayBase
    {
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::System.Threading.Tasks.Task<global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply> OpenSession(global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest request, grpc::ServerCallContext context)
      {
        throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
      }

      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::System.Threading.Tasks.Task<global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply> CloseSession(global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest request, grpc::ServerCallContext context)
      {
        throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
      }

      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::System.Threading.Tasks.Task<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply> Invoke(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest request, grpc::ServerCallContext context)
      {
        throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
      }

      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::System.Threading.Tasks.Task StreamEvents(global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamEventsRequest request, grpc::IServerStreamWriter<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEvent> responseStream, grpc::ServerCallContext context)
      {
        throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
      }

      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::System.Threading.Tasks.Task<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply> AcknowledgeAlarm(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest request, grpc::ServerCallContext context)
      {
        throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
      }

      /// <summary>
      /// Session-less central alarm feed. The stream opens with the current
      /// active-alarm snapshot (one `active_alarm` per alarm), then a single
      /// `snapshot_complete`, then a `transition` for every subsequent change.
      /// Served by the gateway's always-on alarm monitor; any number of clients
      /// fan out from the single monitor without opening a worker session.
      /// </summary>
      /// <param name="request">The request received from the client.</param>
      /// <param name="responseStream">Used for sending responses back to the client.</param>
      /// <param name="context">The context of the server-side call handler being invoked.</param>
      /// <returns>A task indicating completion of the handler.</returns>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::System.Threading.Tasks.Task StreamAlarms(global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest request, grpc::IServerStreamWriter<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage> responseStream, grpc::ServerCallContext context)
      {
        throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
      }

      /// <summary>
      /// Point-in-time snapshot of the currently-active alarm set served from the
      /// gateway's always-on alarm monitor cache (session-less). Used after a
      /// reconnect to seed Part 9 client state, or to reconcile alarms that may
      /// have been missed during a transport blip. Streamed so callers can
      /// begin processing without buffering the full set.
      /// `QueryActiveAlarmsRequest.alarm_filter_prefix` optionally narrows the
      /// snapshot to alarms whose `alarm_full_reference` starts with the given
      /// prefix; an empty prefix returns the full set.
      /// </summary>
      /// <param name="request">The request received from the client.</param>
      /// <param name="responseStream">Used for sending responses back to the client.</param>
      /// <param name="context">The context of the server-side call handler being invoked.</param>
      /// <returns>A task indicating completion of the handler.</returns>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::System.Threading.Tasks.Task QueryActiveAlarms(global::ZB.MOM.WW.MxGateway.Contracts.Proto.QueryActiveAlarmsRequest request, grpc::IServerStreamWriter<global::ZB.MOM.WW.MxGateway.Contracts.Proto.ActiveAlarmSnapshot> responseStream, grpc::ServerCallContext context)
      {
        throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
      }

    }

    /// <summary>Client for MxAccessGateway</summary>
    public partial class MxAccessGatewayClient : grpc::ClientBase<MxAccessGatewayClient>
    {
      /// <summary>Creates a new client for MxAccessGateway</summary>
      /// <param name="channel">The channel to use to make remote calls.</param>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public MxAccessGatewayClient(grpc::ChannelBase channel) : base(channel)
      {
      }
      /// <summary>Creates a new client for MxAccessGateway that uses a custom <c>CallInvoker</c>.</summary>
      /// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public MxAccessGatewayClient(grpc::CallInvoker callInvoker) : base(callInvoker)
      {
      }
      /// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      protected MxAccessGatewayClient() : base()
      {
      }
      /// <summary>Protected constructor to allow creation of configured clients.</summary>
      /// <param name="configuration">The client configuration.</param>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      protected MxAccessGatewayClient(ClientBaseConfiguration configuration) : base(configuration)
      {
      }

      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply OpenSession(global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return OpenSession(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply OpenSession(global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest request, grpc::CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_OpenSession, null, options, request);
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncUnaryCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply> OpenSessionAsync(global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return OpenSessionAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncUnaryCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply> OpenSessionAsync(global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest request, grpc::CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_OpenSession, null, options, request);
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply CloseSession(global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return CloseSession(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply CloseSession(global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest request, grpc::CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_CloseSession, null, options, request);
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncUnaryCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply> CloseSessionAsync(global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return CloseSessionAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncUnaryCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply> CloseSessionAsync(global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest request, grpc::CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_CloseSession, null, options, request);
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply Invoke(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return Invoke(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply Invoke(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest request, grpc::CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_Invoke, null, options, request);
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncUnaryCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply> InvokeAsync(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return InvokeAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncUnaryCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply> InvokeAsync(global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest request, grpc::CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_Invoke, null, options, request);
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncServerStreamingCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEvent> StreamEvents(global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamEventsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return StreamEvents(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncServerStreamingCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEvent> StreamEvents(global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamEventsRequest request, grpc::CallOptions options)
      {
        return CallInvoker.AsyncServerStreamingCall(__Method_StreamEvents, null, options, request);
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply AcknowledgeAlarm(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return AcknowledgeAlarm(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply AcknowledgeAlarm(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest request, grpc::CallOptions options)
      {
        return CallInvoker.BlockingUnaryCall(__Method_AcknowledgeAlarm, null, options, request);
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncUnaryCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply> AcknowledgeAlarmAsync(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return AcknowledgeAlarmAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncUnaryCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply> AcknowledgeAlarmAsync(global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest request, grpc::CallOptions options)
      {
        return CallInvoker.AsyncUnaryCall(__Method_AcknowledgeAlarm, null, options, request);
      }
      /// <summary>
      /// Session-less central alarm feed. The stream opens with the current
      /// active-alarm snapshot (one `active_alarm` per alarm), then a single
      /// `snapshot_complete`, then a `transition` for every subsequent change.
      /// Served by the gateway's always-on alarm monitor; any number of clients
      /// fan out from the single monitor without opening a worker session.
      /// </summary>
      /// <param name="request">The request to send to the server.</param>
      /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
      /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
      /// <param name="cancellationToken">An optional token for canceling the call.</param>
      /// <returns>The call object.</returns>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncServerStreamingCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage> StreamAlarms(global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return StreamAlarms(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      /// Session-less central alarm feed. The stream opens with the current
      /// active-alarm snapshot (one `active_alarm` per alarm), then a single
      /// `snapshot_complete`, then a `transition` for every subsequent change.
      /// Served by the gateway's always-on alarm monitor; any number of clients
      /// fan out from the single monitor without opening a worker session.
      /// </summary>
      /// <param name="request">The request to send to the server.</param>
      /// <param name="options">The options for the call.</param>
      /// <returns>The call object.</returns>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncServerStreamingCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage> StreamAlarms(global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest request, grpc::CallOptions options)
      {
        return CallInvoker.AsyncServerStreamingCall(__Method_StreamAlarms, null, options, request);
      }
      /// <summary>
      /// Point-in-time snapshot of the currently-active alarm set served from the
      /// gateway's always-on alarm monitor cache (session-less). Used after a
      /// reconnect to seed Part 9 client state, or to reconcile alarms that may
      /// have been missed during a transport blip. Streamed so callers can
      /// begin processing without buffering the full set.
      /// `QueryActiveAlarmsRequest.alarm_filter_prefix` optionally narrows the
      /// snapshot to alarms whose `alarm_full_reference` starts with the given
      /// prefix; an empty prefix returns the full set.
      /// </summary>
      /// <param name="request">The request to send to the server.</param>
      /// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
      /// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
      /// <param name="cancellationToken">An optional token for canceling the call.</param>
      /// <returns>The call object.</returns>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncServerStreamingCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.ActiveAlarmSnapshot> QueryActiveAlarms(global::ZB.MOM.WW.MxGateway.Contracts.Proto.QueryActiveAlarmsRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
      {
        return QueryActiveAlarms(request, new grpc::CallOptions(headers, deadline, cancellationToken));
      }
      /// <summary>
      /// Point-in-time snapshot of the currently-active alarm set served from the
      /// gateway's always-on alarm monitor cache (session-less). Used after a
      /// reconnect to seed Part 9 client state, or to reconcile alarms that may
      /// have been missed during a transport blip. Streamed so callers can
      /// begin processing without buffering the full set.
      /// `QueryActiveAlarmsRequest.alarm_filter_prefix` optionally narrows the
      /// snapshot to alarms whose `alarm_full_reference` starts with the given
      /// prefix; an empty prefix returns the full set.
      /// </summary>
      /// <param name="request">The request to send to the server.</param>
      /// <param name="options">The options for the call.</param>
      /// <returns>The call object.</returns>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      public virtual grpc::AsyncServerStreamingCall<global::ZB.MOM.WW.MxGateway.Contracts.Proto.ActiveAlarmSnapshot> QueryActiveAlarms(global::ZB.MOM.WW.MxGateway.Contracts.Proto.QueryActiveAlarmsRequest request, grpc::CallOptions options)
      {
        return CallInvoker.AsyncServerStreamingCall(__Method_QueryActiveAlarms, null, options, request);
      }
      /// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
      [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
      protected override MxAccessGatewayClient NewInstance(ClientBaseConfiguration configuration)
      {
        return new MxAccessGatewayClient(configuration);
      }
    }

    /// <summary>Creates service definition that can be registered with a server</summary>
    /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    public static grpc::ServerServiceDefinition BindService(MxAccessGatewayBase serviceImpl)
    {
      return grpc::ServerServiceDefinition.CreateBuilder()
          .AddMethod(__Method_OpenSession, serviceImpl.OpenSession)
          .AddMethod(__Method_CloseSession, serviceImpl.CloseSession)
          .AddMethod(__Method_Invoke, serviceImpl.Invoke)
          .AddMethod(__Method_StreamEvents, serviceImpl.StreamEvents)
          .AddMethod(__Method_AcknowledgeAlarm, serviceImpl.AcknowledgeAlarm)
          .AddMethod(__Method_StreamAlarms, serviceImpl.StreamAlarms)
          .AddMethod(__Method_QueryActiveAlarms, serviceImpl.QueryActiveAlarms).Build();
    }

    /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
    /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
    /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
    /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
    [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
    public static void BindService(grpc::ServiceBinderBase serviceBinder, MxAccessGatewayBase serviceImpl)
    {
      serviceBinder.AddMethod(__Method_OpenSession, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.OpenSessionReply>(serviceImpl.OpenSession));
      serviceBinder.AddMethod(__Method_CloseSession, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.CloseSessionReply>(serviceImpl.CloseSession));
      serviceBinder.AddMethod(__Method_Invoke, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxCommandReply>(serviceImpl.Invoke));
      serviceBinder.AddMethod(__Method_StreamEvents, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamEventsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.MxEvent>(serviceImpl.StreamEvents));
      serviceBinder.AddMethod(__Method_AcknowledgeAlarm, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AcknowledgeAlarmReply>(serviceImpl.AcknowledgeAlarm));
      serviceBinder.AddMethod(__Method_StreamAlarms, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::ZB.MOM.WW.MxGateway.Contracts.Proto.StreamAlarmsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.AlarmFeedMessage>(serviceImpl.StreamAlarms));
      serviceBinder.AddMethod(__Method_QueryActiveAlarms, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::ZB.MOM.WW.MxGateway.Contracts.Proto.QueryActiveAlarmsRequest, global::ZB.MOM.WW.MxGateway.Contracts.Proto.ActiveAlarmSnapshot>(serviceImpl.QueryActiveAlarms));
    }

  }
}
#endregion
