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

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace ScadaLink.Communication.Grpc {

  /// <summary>Holder for reflection information generated from Protos/sitestream.proto</summary>
  public static partial class SitestreamReflection {

    #region Descriptor
    /// <summary>File descriptor for Protos/sitestream.proto</summary>
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static SitestreamReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "ChdQcm90b3Mvc2l0ZXN0cmVhbS5wcm90bxIKc2l0ZXN0cmVhbRofZ29vZ2xl",
            "L3Byb3RvYnVmL3RpbWVzdGFtcC5wcm90byJNChVJbnN0YW5jZVN0cmVhbVJl",
            "cXVlc3QSFgoOY29ycmVsYXRpb25faWQYASABKAkSHAoUaW5zdGFuY2VfdW5p",
            "cXVlX25hbWUYAiABKAkiqAEKD1NpdGVTdHJlYW1FdmVudBIWCg5jb3JyZWxh",
            "dGlvbl9pZBgBIAEoCRI9ChFhdHRyaWJ1dGVfY2hhbmdlZBgCIAEoCzIgLnNp",
            "dGVzdHJlYW0uQXR0cmlidXRlVmFsdWVVcGRhdGVIABI1Cg1hbGFybV9jaGFu",
            "Z2VkGAMgASgLMhwuc2l0ZXN0cmVhbS5BbGFybVN0YXRlVXBkYXRlSABCBwoF",
            "ZXZlbnQiyAEKFEF0dHJpYnV0ZVZhbHVlVXBkYXRlEhwKFGluc3RhbmNlX3Vu",
            "aXF1ZV9uYW1lGAEgASgJEhYKDmF0dHJpYnV0ZV9wYXRoGAIgASgJEhYKDmF0",
            "dHJpYnV0ZV9uYW1lGAMgASgJEg0KBXZhbHVlGAQgASgJEiQKB3F1YWxpdHkY",
            "BSABKA4yEy5zaXRlc3RyZWFtLlF1YWxpdHkSLQoJdGltZXN0YW1wGAYgASgL",
            "MhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCLsAQoQQWxhcm1TdGF0ZVVw",
            "ZGF0ZRIcChRpbnN0YW5jZV91bmlxdWVfbmFtZRgBIAEoCRISCgphbGFybV9u",
            "YW1lGAIgASgJEikKBXN0YXRlGAMgASgOMhouc2l0ZXN0cmVhbS5BbGFybVN0",
            "YXRlRW51bRIQCghwcmlvcml0eRgEIAEoBRItCgl0aW1lc3RhbXAYBSABKAsy",
            "Gi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEikKBWxldmVsGAYgASgOMhou",
            "c2l0ZXN0cmVhbS5BbGFybUxldmVsRW51bRIPCgdtZXNzYWdlGAcgASgJKlwK",
            "B1F1YWxpdHkSFwoTUVVBTElUWV9VTlNQRUNJRklFRBAAEhAKDFFVQUxJVFlf",
            "R09PRBABEhUKEVFVQUxJVFlfVU5DRVJUQUlOEAISDwoLUVVBTElUWV9CQUQQ",
            "AypdCg5BbGFybVN0YXRlRW51bRIbChdBTEFSTV9TVEFURV9VTlNQRUNJRklF",
            "RBAAEhYKEkFMQVJNX1NUQVRFX05PUk1BTBABEhYKEkFMQVJNX1NUQVRFX0FD",
            "VElWRRACKoUBCg5BbGFybUxldmVsRW51bRIUChBBTEFSTV9MRVZFTF9OT05F",
            "EAASEwoPQUxBUk1fTEVWRUxfTE9XEAESFwoTQUxBUk1fTEVWRUxfTE9XX0xP",
            "VxACEhQKEEFMQVJNX0xFVkVMX0hJR0gQAxIZChVBTEFSTV9MRVZFTF9ISUdI",
            "X0hJR0gQBDJqChFTaXRlU3RyZWFtU2VydmljZRJVChFTdWJzY3JpYmVJbnN0",
            "YW5jZRIhLnNpdGVzdHJlYW0uSW5zdGFuY2VTdHJlYW1SZXF1ZXN0Ghsuc2l0",
            "ZXN0cmVhbS5TaXRlU3RyZWFtRXZlbnQwAUIfqgIcU2NhZGFMaW5rLkNvbW11",
            "bmljYXRpb24uR3JwY2IGcHJvdG8z"));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, },
          new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ScadaLink.Communication.Grpc.Quality), typeof(global::ScadaLink.Communication.Grpc.AlarmStateEnum), typeof(global::ScadaLink.Communication.Grpc.AlarmLevelEnum), }, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.InstanceStreamRequest), global::ScadaLink.Communication.Grpc.InstanceStreamRequest.Parser, new[]{ "CorrelationId", "InstanceUniqueName" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.SiteStreamEvent), global::ScadaLink.Communication.Grpc.SiteStreamEvent.Parser, new[]{ "CorrelationId", "AttributeChanged", "AlarmChanged" }, new[]{ "Event" }, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AttributeValueUpdate), global::ScadaLink.Communication.Grpc.AttributeValueUpdate.Parser, new[]{ "InstanceUniqueName", "AttributePath", "AttributeName", "Value", "Quality", "Timestamp" }, null, null, null, null),
            new pbr::GeneratedClrTypeInfo(typeof(global::ScadaLink.Communication.Grpc.AlarmStateUpdate), global::ScadaLink.Communication.Grpc.AlarmStateUpdate.Parser, new[]{ "InstanceUniqueName", "AlarmName", "State", "Priority", "Timestamp", "Level", "Message" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Enums
  public enum Quality {
    [pbr::OriginalName("QUALITY_UNSPECIFIED")] Unspecified = 0,
    [pbr::OriginalName("QUALITY_GOOD")] Good = 1,
    [pbr::OriginalName("QUALITY_UNCERTAIN")] Uncertain = 2,
    [pbr::OriginalName("QUALITY_BAD")] Bad = 3,
  }

  public enum AlarmStateEnum {
    [pbr::OriginalName("ALARM_STATE_UNSPECIFIED")] AlarmStateUnspecified = 0,
    [pbr::OriginalName("ALARM_STATE_NORMAL")] AlarmStateNormal = 1,
    [pbr::OriginalName("ALARM_STATE_ACTIVE")] AlarmStateActive = 2,
  }

  /// <summary>
  /// Severity level for an active alarm. Binary trigger types (ValueMatch,
  /// RangeViolation, RateOfChange) always emit ALARM_LEVEL_NONE. The HiLo
  /// trigger type emits one of the directional values.
  /// </summary>
  public enum AlarmLevelEnum {
    [pbr::OriginalName("ALARM_LEVEL_NONE")] AlarmLevelNone = 0,
    [pbr::OriginalName("ALARM_LEVEL_LOW")] AlarmLevelLow = 1,
    [pbr::OriginalName("ALARM_LEVEL_LOW_LOW")] AlarmLevelLowLow = 2,
    [pbr::OriginalName("ALARM_LEVEL_HIGH")] AlarmLevelHigh = 3,
    [pbr::OriginalName("ALARM_LEVEL_HIGH_HIGH")] AlarmLevelHighHigh = 4,
  }

  #endregion

  #region Messages
  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class InstanceStreamRequest : pb::IMessage<InstanceStreamRequest>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<InstanceStreamRequest> _parser = new pb::MessageParser<InstanceStreamRequest>(() => new InstanceStreamRequest());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<InstanceStreamRequest> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::ScadaLink.Communication.Grpc.SitestreamReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public InstanceStreamRequest() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public InstanceStreamRequest(InstanceStreamRequest other) : this() {
      correlationId_ = other.correlationId_;
      instanceUniqueName_ = other.instanceUniqueName_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public InstanceStreamRequest Clone() {
      return new InstanceStreamRequest(this);
    }

    /// <summary>Field number for the "correlation_id" field.</summary>
    public const int CorrelationIdFieldNumber = 1;
    private string correlationId_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string CorrelationId {
      get { return correlationId_; }
      set {
        correlationId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "instance_unique_name" field.</summary>
    public const int InstanceUniqueNameFieldNumber = 2;
    private string instanceUniqueName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string InstanceUniqueName {
      get { return instanceUniqueName_; }
      set {
        instanceUniqueName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as InstanceStreamRequest);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(InstanceStreamRequest other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (CorrelationId != other.CorrelationId) return false;
      if (InstanceUniqueName != other.InstanceUniqueName) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (CorrelationId.Length != 0) hash ^= CorrelationId.GetHashCode();
      if (InstanceUniqueName.Length != 0) hash ^= InstanceUniqueName.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (CorrelationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(CorrelationId);
      }
      if (InstanceUniqueName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(InstanceUniqueName);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (CorrelationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(CorrelationId);
      }
      if (InstanceUniqueName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(InstanceUniqueName);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (CorrelationId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(CorrelationId);
      }
      if (InstanceUniqueName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InstanceUniqueName);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(InstanceStreamRequest other) {
      if (other == null) {
        return;
      }
      if (other.CorrelationId.Length != 0) {
        CorrelationId = other.CorrelationId;
      }
      if (other.InstanceUniqueName.Length != 0) {
        InstanceUniqueName = other.InstanceUniqueName;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            CorrelationId = input.ReadString();
            break;
          }
          case 18: {
            InstanceUniqueName = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            CorrelationId = input.ReadString();
            break;
          }
          case 18: {
            InstanceUniqueName = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class SiteStreamEvent : pb::IMessage<SiteStreamEvent>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<SiteStreamEvent> _parser = new pb::MessageParser<SiteStreamEvent>(() => new SiteStreamEvent());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<SiteStreamEvent> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::ScadaLink.Communication.Grpc.SitestreamReflection.Descriptor.MessageTypes[1]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public SiteStreamEvent() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public SiteStreamEvent(SiteStreamEvent other) : this() {
      correlationId_ = other.correlationId_;
      switch (other.EventCase) {
        case EventOneofCase.AttributeChanged:
          AttributeChanged = other.AttributeChanged.Clone();
          break;
        case EventOneofCase.AlarmChanged:
          AlarmChanged = other.AlarmChanged.Clone();
          break;
      }

      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public SiteStreamEvent Clone() {
      return new SiteStreamEvent(this);
    }

    /// <summary>Field number for the "correlation_id" field.</summary>
    public const int CorrelationIdFieldNumber = 1;
    private string correlationId_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string CorrelationId {
      get { return correlationId_; }
      set {
        correlationId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "attribute_changed" field.</summary>
    public const int AttributeChangedFieldNumber = 2;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::ScadaLink.Communication.Grpc.AttributeValueUpdate AttributeChanged {
      get { return eventCase_ == EventOneofCase.AttributeChanged ? (global::ScadaLink.Communication.Grpc.AttributeValueUpdate) event_ : null; }
      set {
        event_ = value;
        eventCase_ = value == null ? EventOneofCase.None : EventOneofCase.AttributeChanged;
      }
    }

    /// <summary>Field number for the "alarm_changed" field.</summary>
    public const int AlarmChangedFieldNumber = 3;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::ScadaLink.Communication.Grpc.AlarmStateUpdate AlarmChanged {
      get { return eventCase_ == EventOneofCase.AlarmChanged ? (global::ScadaLink.Communication.Grpc.AlarmStateUpdate) event_ : null; }
      set {
        event_ = value;
        eventCase_ = value == null ? EventOneofCase.None : EventOneofCase.AlarmChanged;
      }
    }

    private object event_;
    /// <summary>Enum of possible cases for the "event" oneof.</summary>
    public enum EventOneofCase {
      None = 0,
      AttributeChanged = 2,
      AlarmChanged = 3,
    }
    private EventOneofCase eventCase_ = EventOneofCase.None;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public EventOneofCase EventCase {
      get { return eventCase_; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void ClearEvent() {
      eventCase_ = EventOneofCase.None;
      event_ = null;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as SiteStreamEvent);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(SiteStreamEvent other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (CorrelationId != other.CorrelationId) return false;
      if (!object.Equals(AttributeChanged, other.AttributeChanged)) return false;
      if (!object.Equals(AlarmChanged, other.AlarmChanged)) return false;
      if (EventCase != other.EventCase) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (CorrelationId.Length != 0) hash ^= CorrelationId.GetHashCode();
      if (eventCase_ == EventOneofCase.AttributeChanged) hash ^= AttributeChanged.GetHashCode();
      if (eventCase_ == EventOneofCase.AlarmChanged) hash ^= AlarmChanged.GetHashCode();
      hash ^= (int) eventCase_;
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (CorrelationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(CorrelationId);
      }
      if (eventCase_ == EventOneofCase.AttributeChanged) {
        output.WriteRawTag(18);
        output.WriteMessage(AttributeChanged);
      }
      if (eventCase_ == EventOneofCase.AlarmChanged) {
        output.WriteRawTag(26);
        output.WriteMessage(AlarmChanged);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (CorrelationId.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(CorrelationId);
      }
      if (eventCase_ == EventOneofCase.AttributeChanged) {
        output.WriteRawTag(18);
        output.WriteMessage(AttributeChanged);
      }
      if (eventCase_ == EventOneofCase.AlarmChanged) {
        output.WriteRawTag(26);
        output.WriteMessage(AlarmChanged);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (CorrelationId.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(CorrelationId);
      }
      if (eventCase_ == EventOneofCase.AttributeChanged) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AttributeChanged);
      }
      if (eventCase_ == EventOneofCase.AlarmChanged) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(AlarmChanged);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(SiteStreamEvent other) {
      if (other == null) {
        return;
      }
      if (other.CorrelationId.Length != 0) {
        CorrelationId = other.CorrelationId;
      }
      switch (other.EventCase) {
        case EventOneofCase.AttributeChanged:
          if (AttributeChanged == null) {
            AttributeChanged = new global::ScadaLink.Communication.Grpc.AttributeValueUpdate();
          }
          AttributeChanged.MergeFrom(other.AttributeChanged);
          break;
        case EventOneofCase.AlarmChanged:
          if (AlarmChanged == null) {
            AlarmChanged = new global::ScadaLink.Communication.Grpc.AlarmStateUpdate();
          }
          AlarmChanged.MergeFrom(other.AlarmChanged);
          break;
      }

      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            CorrelationId = input.ReadString();
            break;
          }
          case 18: {
            global::ScadaLink.Communication.Grpc.AttributeValueUpdate subBuilder = new global::ScadaLink.Communication.Grpc.AttributeValueUpdate();
            if (eventCase_ == EventOneofCase.AttributeChanged) {
              subBuilder.MergeFrom(AttributeChanged);
            }
            input.ReadMessage(subBuilder);
            AttributeChanged = subBuilder;
            break;
          }
          case 26: {
            global::ScadaLink.Communication.Grpc.AlarmStateUpdate subBuilder = new global::ScadaLink.Communication.Grpc.AlarmStateUpdate();
            if (eventCase_ == EventOneofCase.AlarmChanged) {
              subBuilder.MergeFrom(AlarmChanged);
            }
            input.ReadMessage(subBuilder);
            AlarmChanged = subBuilder;
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            CorrelationId = input.ReadString();
            break;
          }
          case 18: {
            global::ScadaLink.Communication.Grpc.AttributeValueUpdate subBuilder = new global::ScadaLink.Communication.Grpc.AttributeValueUpdate();
            if (eventCase_ == EventOneofCase.AttributeChanged) {
              subBuilder.MergeFrom(AttributeChanged);
            }
            input.ReadMessage(subBuilder);
            AttributeChanged = subBuilder;
            break;
          }
          case 26: {
            global::ScadaLink.Communication.Grpc.AlarmStateUpdate subBuilder = new global::ScadaLink.Communication.Grpc.AlarmStateUpdate();
            if (eventCase_ == EventOneofCase.AlarmChanged) {
              subBuilder.MergeFrom(AlarmChanged);
            }
            input.ReadMessage(subBuilder);
            AlarmChanged = subBuilder;
            break;
          }
        }
      }
    }
    #endif

  }

  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class AttributeValueUpdate : pb::IMessage<AttributeValueUpdate>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<AttributeValueUpdate> _parser = new pb::MessageParser<AttributeValueUpdate>(() => new AttributeValueUpdate());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<AttributeValueUpdate> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::ScadaLink.Communication.Grpc.SitestreamReflection.Descriptor.MessageTypes[2]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public AttributeValueUpdate() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public AttributeValueUpdate(AttributeValueUpdate other) : this() {
      instanceUniqueName_ = other.instanceUniqueName_;
      attributePath_ = other.attributePath_;
      attributeName_ = other.attributeName_;
      value_ = other.value_;
      quality_ = other.quality_;
      timestamp_ = other.timestamp_ != null ? other.timestamp_.Clone() : null;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public AttributeValueUpdate Clone() {
      return new AttributeValueUpdate(this);
    }

    /// <summary>Field number for the "instance_unique_name" field.</summary>
    public const int InstanceUniqueNameFieldNumber = 1;
    private string instanceUniqueName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string InstanceUniqueName {
      get { return instanceUniqueName_; }
      set {
        instanceUniqueName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "attribute_path" field.</summary>
    public const int AttributePathFieldNumber = 2;
    private string attributePath_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string AttributePath {
      get { return attributePath_; }
      set {
        attributePath_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "attribute_name" field.</summary>
    public const int AttributeNameFieldNumber = 3;
    private string attributeName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string AttributeName {
      get { return attributeName_; }
      set {
        attributeName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "value" field.</summary>
    public const int ValueFieldNumber = 4;
    private string value_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Value {
      get { return value_; }
      set {
        value_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "quality" field.</summary>
    public const int QualityFieldNumber = 5;
    private global::ScadaLink.Communication.Grpc.Quality quality_ = global::ScadaLink.Communication.Grpc.Quality.Unspecified;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::ScadaLink.Communication.Grpc.Quality Quality {
      get { return quality_; }
      set {
        quality_ = value;
      }
    }

    /// <summary>Field number for the "timestamp" field.</summary>
    public const int TimestampFieldNumber = 6;
    private global::Google.Protobuf.WellKnownTypes.Timestamp timestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp Timestamp {
      get { return timestamp_; }
      set {
        timestamp_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as AttributeValueUpdate);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(AttributeValueUpdate other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (InstanceUniqueName != other.InstanceUniqueName) return false;
      if (AttributePath != other.AttributePath) return false;
      if (AttributeName != other.AttributeName) return false;
      if (Value != other.Value) return false;
      if (Quality != other.Quality) return false;
      if (!object.Equals(Timestamp, other.Timestamp)) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (InstanceUniqueName.Length != 0) hash ^= InstanceUniqueName.GetHashCode();
      if (AttributePath.Length != 0) hash ^= AttributePath.GetHashCode();
      if (AttributeName.Length != 0) hash ^= AttributeName.GetHashCode();
      if (Value.Length != 0) hash ^= Value.GetHashCode();
      if (Quality != global::ScadaLink.Communication.Grpc.Quality.Unspecified) hash ^= Quality.GetHashCode();
      if (timestamp_ != null) hash ^= Timestamp.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (InstanceUniqueName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(InstanceUniqueName);
      }
      if (AttributePath.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(AttributePath);
      }
      if (AttributeName.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(AttributeName);
      }
      if (Value.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(Value);
      }
      if (Quality != global::ScadaLink.Communication.Grpc.Quality.Unspecified) {
        output.WriteRawTag(40);
        output.WriteEnum((int) Quality);
      }
      if (timestamp_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Timestamp);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (InstanceUniqueName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(InstanceUniqueName);
      }
      if (AttributePath.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(AttributePath);
      }
      if (AttributeName.Length != 0) {
        output.WriteRawTag(26);
        output.WriteString(AttributeName);
      }
      if (Value.Length != 0) {
        output.WriteRawTag(34);
        output.WriteString(Value);
      }
      if (Quality != global::ScadaLink.Communication.Grpc.Quality.Unspecified) {
        output.WriteRawTag(40);
        output.WriteEnum((int) Quality);
      }
      if (timestamp_ != null) {
        output.WriteRawTag(50);
        output.WriteMessage(Timestamp);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (InstanceUniqueName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InstanceUniqueName);
      }
      if (AttributePath.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AttributePath);
      }
      if (AttributeName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AttributeName);
      }
      if (Value.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Value);
      }
      if (Quality != global::ScadaLink.Communication.Grpc.Quality.Unspecified) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Quality);
      }
      if (timestamp_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Timestamp);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(AttributeValueUpdate other) {
      if (other == null) {
        return;
      }
      if (other.InstanceUniqueName.Length != 0) {
        InstanceUniqueName = other.InstanceUniqueName;
      }
      if (other.AttributePath.Length != 0) {
        AttributePath = other.AttributePath;
      }
      if (other.AttributeName.Length != 0) {
        AttributeName = other.AttributeName;
      }
      if (other.Value.Length != 0) {
        Value = other.Value;
      }
      if (other.Quality != global::ScadaLink.Communication.Grpc.Quality.Unspecified) {
        Quality = other.Quality;
      }
      if (other.timestamp_ != null) {
        if (timestamp_ == null) {
          Timestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Timestamp.MergeFrom(other.Timestamp);
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            InstanceUniqueName = input.ReadString();
            break;
          }
          case 18: {
            AttributePath = input.ReadString();
            break;
          }
          case 26: {
            AttributeName = input.ReadString();
            break;
          }
          case 34: {
            Value = input.ReadString();
            break;
          }
          case 40: {
            Quality = (global::ScadaLink.Communication.Grpc.Quality) input.ReadEnum();
            break;
          }
          case 50: {
            if (timestamp_ == null) {
              Timestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Timestamp);
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            InstanceUniqueName = input.ReadString();
            break;
          }
          case 18: {
            AttributePath = input.ReadString();
            break;
          }
          case 26: {
            AttributeName = input.ReadString();
            break;
          }
          case 34: {
            Value = input.ReadString();
            break;
          }
          case 40: {
            Quality = (global::ScadaLink.Communication.Grpc.Quality) input.ReadEnum();
            break;
          }
          case 50: {
            if (timestamp_ == null) {
              Timestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Timestamp);
            break;
          }
        }
      }
    }
    #endif

  }

  [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
  public sealed partial class AlarmStateUpdate : pb::IMessage<AlarmStateUpdate>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<AlarmStateUpdate> _parser = new pb::MessageParser<AlarmStateUpdate>(() => new AlarmStateUpdate());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<AlarmStateUpdate> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::ScadaLink.Communication.Grpc.SitestreamReflection.Descriptor.MessageTypes[3]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public AlarmStateUpdate() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public AlarmStateUpdate(AlarmStateUpdate other) : this() {
      instanceUniqueName_ = other.instanceUniqueName_;
      alarmName_ = other.alarmName_;
      state_ = other.state_;
      priority_ = other.priority_;
      timestamp_ = other.timestamp_ != null ? other.timestamp_.Clone() : null;
      level_ = other.level_;
      message_ = other.message_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public AlarmStateUpdate Clone() {
      return new AlarmStateUpdate(this);
    }

    /// <summary>Field number for the "instance_unique_name" field.</summary>
    public const int InstanceUniqueNameFieldNumber = 1;
    private string instanceUniqueName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string InstanceUniqueName {
      get { return instanceUniqueName_; }
      set {
        instanceUniqueName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "alarm_name" field.</summary>
    public const int AlarmNameFieldNumber = 2;
    private string alarmName_ = "";
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string AlarmName {
      get { return alarmName_; }
      set {
        alarmName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    /// <summary>Field number for the "state" field.</summary>
    public const int StateFieldNumber = 3;
    private global::ScadaLink.Communication.Grpc.AlarmStateEnum state_ = global::ScadaLink.Communication.Grpc.AlarmStateEnum.AlarmStateUnspecified;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::ScadaLink.Communication.Grpc.AlarmStateEnum State {
      get { return state_; }
      set {
        state_ = value;
      }
    }

    /// <summary>Field number for the "priority" field.</summary>
    public const int PriorityFieldNumber = 4;
    private int priority_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int Priority {
      get { return priority_; }
      set {
        priority_ = value;
      }
    }

    /// <summary>Field number for the "timestamp" field.</summary>
    public const int TimestampFieldNumber = 5;
    private global::Google.Protobuf.WellKnownTypes.Timestamp timestamp_;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::Google.Protobuf.WellKnownTypes.Timestamp Timestamp {
      get { return timestamp_; }
      set {
        timestamp_ = value;
      }
    }

    /// <summary>Field number for the "level" field.</summary>
    public const int LevelFieldNumber = 6;
    private global::ScadaLink.Communication.Grpc.AlarmLevelEnum level_ = global::ScadaLink.Communication.Grpc.AlarmLevelEnum.AlarmLevelNone;
    /// <summary>
    /// ALARM_LEVEL_NONE for binary trigger types; set by HiLo.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public global::ScadaLink.Communication.Grpc.AlarmLevelEnum Level {
      get { return level_; }
      set {
        level_ = value;
      }
    }

    /// <summary>Field number for the "message" field.</summary>
    public const int MessageFieldNumber = 7;
    private string message_ = "";
    /// <summary>
    /// Optional per-band operator message; empty when unset.
    /// </summary>
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public string Message {
      get { return message_; }
      set {
        message_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as AlarmStateUpdate);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(AlarmStateUpdate other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (InstanceUniqueName != other.InstanceUniqueName) return false;
      if (AlarmName != other.AlarmName) return false;
      if (State != other.State) return false;
      if (Priority != other.Priority) return false;
      if (!object.Equals(Timestamp, other.Timestamp)) return false;
      if (Level != other.Level) return false;
      if (Message != other.Message) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (InstanceUniqueName.Length != 0) hash ^= InstanceUniqueName.GetHashCode();
      if (AlarmName.Length != 0) hash ^= AlarmName.GetHashCode();
      if (State != global::ScadaLink.Communication.Grpc.AlarmStateEnum.AlarmStateUnspecified) hash ^= State.GetHashCode();
      if (Priority != 0) hash ^= Priority.GetHashCode();
      if (timestamp_ != null) hash ^= Timestamp.GetHashCode();
      if (Level != global::ScadaLink.Communication.Grpc.AlarmLevelEnum.AlarmLevelNone) hash ^= Level.GetHashCode();
      if (Message.Length != 0) hash ^= Message.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (InstanceUniqueName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(InstanceUniqueName);
      }
      if (AlarmName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(AlarmName);
      }
      if (State != global::ScadaLink.Communication.Grpc.AlarmStateEnum.AlarmStateUnspecified) {
        output.WriteRawTag(24);
        output.WriteEnum((int) State);
      }
      if (Priority != 0) {
        output.WriteRawTag(32);
        output.WriteInt32(Priority);
      }
      if (timestamp_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(Timestamp);
      }
      if (Level != global::ScadaLink.Communication.Grpc.AlarmLevelEnum.AlarmLevelNone) {
        output.WriteRawTag(48);
        output.WriteEnum((int) Level);
      }
      if (Message.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(Message);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (InstanceUniqueName.Length != 0) {
        output.WriteRawTag(10);
        output.WriteString(InstanceUniqueName);
      }
      if (AlarmName.Length != 0) {
        output.WriteRawTag(18);
        output.WriteString(AlarmName);
      }
      if (State != global::ScadaLink.Communication.Grpc.AlarmStateEnum.AlarmStateUnspecified) {
        output.WriteRawTag(24);
        output.WriteEnum((int) State);
      }
      if (Priority != 0) {
        output.WriteRawTag(32);
        output.WriteInt32(Priority);
      }
      if (timestamp_ != null) {
        output.WriteRawTag(42);
        output.WriteMessage(Timestamp);
      }
      if (Level != global::ScadaLink.Communication.Grpc.AlarmLevelEnum.AlarmLevelNone) {
        output.WriteRawTag(48);
        output.WriteEnum((int) Level);
      }
      if (Message.Length != 0) {
        output.WriteRawTag(58);
        output.WriteString(Message);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (InstanceUniqueName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(InstanceUniqueName);
      }
      if (AlarmName.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(AlarmName);
      }
      if (State != global::ScadaLink.Communication.Grpc.AlarmStateEnum.AlarmStateUnspecified) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) State);
      }
      if (Priority != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Priority);
      }
      if (timestamp_ != null) {
        size += 1 + pb::CodedOutputStream.ComputeMessageSize(Timestamp);
      }
      if (Level != global::ScadaLink.Communication.Grpc.AlarmLevelEnum.AlarmLevelNone) {
        size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Level);
      }
      if (Message.Length != 0) {
        size += 1 + pb::CodedOutputStream.ComputeStringSize(Message);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(AlarmStateUpdate other) {
      if (other == null) {
        return;
      }
      if (other.InstanceUniqueName.Length != 0) {
        InstanceUniqueName = other.InstanceUniqueName;
      }
      if (other.AlarmName.Length != 0) {
        AlarmName = other.AlarmName;
      }
      if (other.State != global::ScadaLink.Communication.Grpc.AlarmStateEnum.AlarmStateUnspecified) {
        State = other.State;
      }
      if (other.Priority != 0) {
        Priority = other.Priority;
      }
      if (other.timestamp_ != null) {
        if (timestamp_ == null) {
          Timestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp();
        }
        Timestamp.MergeFrom(other.Timestamp);
      }
      if (other.Level != global::ScadaLink.Communication.Grpc.AlarmLevelEnum.AlarmLevelNone) {
        Level = other.Level;
      }
      if (other.Message.Length != 0) {
        Message = other.Message;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 10: {
            InstanceUniqueName = input.ReadString();
            break;
          }
          case 18: {
            AlarmName = input.ReadString();
            break;
          }
          case 24: {
            State = (global::ScadaLink.Communication.Grpc.AlarmStateEnum) input.ReadEnum();
            break;
          }
          case 32: {
            Priority = input.ReadInt32();
            break;
          }
          case 42: {
            if (timestamp_ == null) {
              Timestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Timestamp);
            break;
          }
          case 48: {
            Level = (global::ScadaLink.Communication.Grpc.AlarmLevelEnum) input.ReadEnum();
            break;
          }
          case 58: {
            Message = input.ReadString();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
      if ((tag & 7) == 4) {
        // Abort on any end group tag.
        return;
      }
      switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 10: {
            InstanceUniqueName = input.ReadString();
            break;
          }
          case 18: {
            AlarmName = input.ReadString();
            break;
          }
          case 24: {
            State = (global::ScadaLink.Communication.Grpc.AlarmStateEnum) input.ReadEnum();
            break;
          }
          case 32: {
            Priority = input.ReadInt32();
            break;
          }
          case 42: {
            if (timestamp_ == null) {
              Timestamp = new global::Google.Protobuf.WellKnownTypes.Timestamp();
            }
            input.ReadMessage(Timestamp);
            break;
          }
          case 48: {
            Level = (global::ScadaLink.Communication.Grpc.AlarmLevelEnum) input.ReadEnum();
            break;
          }
          case 58: {
            Message = input.ReadString();
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code
