All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.yamcs.protobuf.Event Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: yamcs/protobuf/events/events.proto

package org.yamcs.protobuf;

/**
 * Protobuf type {@code yamcs.protobuf.events.Event}
 */
public final class Event extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:yamcs.protobuf.events.Event)
    EventOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Event.newBuilder() to construct.
  private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Event() {
    source_ = "";
    type_ = "";
    message_ = "";
    severity_ = 0;
    createdBy_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new Event();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Event(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            com.google.protobuf.ByteString bs = input.readBytes();
            bitField0_ |= 0x00000001;
            source_ = bs;
            break;
          }
          case 18: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (((bitField0_ & 0x00000002) != 0)) {
              subBuilder = generationTime_.toBuilder();
            }
            generationTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(generationTime_);
              generationTime_ = subBuilder.buildPartial();
            }
            bitField0_ |= 0x00000002;
            break;
          }
          case 26: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (((bitField0_ & 0x00000004) != 0)) {
              subBuilder = receptionTime_.toBuilder();
            }
            receptionTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(receptionTime_);
              receptionTime_ = subBuilder.buildPartial();
            }
            bitField0_ |= 0x00000004;
            break;
          }
          case 32: {
            bitField0_ |= 0x00000008;
            seqNumber_ = input.readInt32();
            break;
          }
          case 42: {
            com.google.protobuf.ByteString bs = input.readBytes();
            bitField0_ |= 0x00000010;
            type_ = bs;
            break;
          }
          case 50: {
            com.google.protobuf.ByteString bs = input.readBytes();
            bitField0_ |= 0x00000020;
            message_ = bs;
            break;
          }
          case 56: {
            int rawValue = input.readEnum();
              @SuppressWarnings("deprecation")
            org.yamcs.protobuf.Event.EventSeverity value = org.yamcs.protobuf.Event.EventSeverity.valueOf(rawValue);
            if (value == null) {
              unknownFields.mergeVarintField(7, rawValue);
            } else {
              bitField0_ |= 0x00000040;
              severity_ = rawValue;
            }
            break;
          }
          case 82: {
            com.google.protobuf.ByteString bs = input.readBytes();
            bitField0_ |= 0x00000080;
            createdBy_ = bs;
            break;
          }
          case 90: {
            if (!((mutable_bitField0_ & 0x00000100) != 0)) {
              extra_ = com.google.protobuf.MapField.newMapField(
                  ExtraDefaultEntryHolder.defaultEntry);
              mutable_bitField0_ |= 0x00000100;
            }
            com.google.protobuf.MapEntry
            extra__ = input.readMessage(
                ExtraDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
            extra_.getMutableMap().put(
                extra__.getKey(), extra__.getValue());
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.yamcs.protobuf.EventsProto.internal_static_yamcs_protobuf_events_Event_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(
      int number) {
    switch (number) {
      case 11:
        return internalGetExtra();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.yamcs.protobuf.EventsProto.internal_static_yamcs_protobuf_events_Event_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.yamcs.protobuf.Event.class, org.yamcs.protobuf.Event.Builder.class);
  }

  /**
   * 
   * The severity levels, in order are:
   * INFO, WATCH, WARNING, DISTRESS, CRITICAL, SEVERE.
   * A migration is underway to fully move away from the legacy
   * INFO, WARNING, ERROR levels.
   * 
* * Protobuf enum {@code yamcs.protobuf.events.Event.EventSeverity} */ public enum EventSeverity implements com.google.protobuf.ProtocolMessageEnum { /** * INFO = 0; */ INFO(0), /** * WARNING = 1; */ WARNING(1), /** *
     * Legacy, avoid use.
     * 
* * ERROR = 2 [deprecated = true]; */ @java.lang.Deprecated ERROR(2), /** * WATCH = 3; */ WATCH(3), /** *
     * Placeholder for future WARNING constant.
     * (correctly sorted between WATCH and DISTRESS)
     * Most clients can ignore, this state is here
     * to give Protobuf clients (Python Client, Yamcs Studio)
     * the time to add a migration for supporting both WARNING
     * and WARNING_NEW (Protobuf serializes the number).
     * Then in a later phase, we move from:
     * WARNING=1, WARNING_NEW=4
     * To:
     * WARNING_OLD=1, WARNING=4
     * (which is a transparent change to JSON clients)
     * 
* * WARNING_NEW = 4; */ WARNING_NEW(4), /** * DISTRESS = 5; */ DISTRESS(5), /** * CRITICAL = 6; */ CRITICAL(6), /** * SEVERE = 7; */ SEVERE(7), ; /** * INFO = 0; */ public static final int INFO_VALUE = 0; /** * WARNING = 1; */ public static final int WARNING_VALUE = 1; /** *
     * Legacy, avoid use.
     * 
* * ERROR = 2 [deprecated = true]; */ @java.lang.Deprecated public static final int ERROR_VALUE = 2; /** * WATCH = 3; */ public static final int WATCH_VALUE = 3; /** *
     * Placeholder for future WARNING constant.
     * (correctly sorted between WATCH and DISTRESS)
     * Most clients can ignore, this state is here
     * to give Protobuf clients (Python Client, Yamcs Studio)
     * the time to add a migration for supporting both WARNING
     * and WARNING_NEW (Protobuf serializes the number).
     * Then in a later phase, we move from:
     * WARNING=1, WARNING_NEW=4
     * To:
     * WARNING_OLD=1, WARNING=4
     * (which is a transparent change to JSON clients)
     * 
* * WARNING_NEW = 4; */ public static final int WARNING_NEW_VALUE = 4; /** * DISTRESS = 5; */ public static final int DISTRESS_VALUE = 5; /** * CRITICAL = 6; */ public static final int CRITICAL_VALUE = 6; /** * SEVERE = 7; */ public static final int SEVERE_VALUE = 7; public final int getNumber() { return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static EventSeverity valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static EventSeverity forNumber(int value) { switch (value) { case 0: return INFO; case 1: return WARNING; case 2: return ERROR; case 3: return WATCH; case 4: return WARNING_NEW; case 5: return DISTRESS; case 6: return CRITICAL; case 7: return SEVERE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< EventSeverity> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public EventSeverity findValueByNumber(int number) { return EventSeverity.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return org.yamcs.protobuf.Event.getDescriptor().getEnumTypes().get(0); } private static final EventSeverity[] VALUES = values(); public static EventSeverity valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } return VALUES[desc.getIndex()]; } private final int value; private EventSeverity(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:yamcs.protobuf.events.Event.EventSeverity) } private int bitField0_; public static final int SOURCE_FIELD_NUMBER = 1; private volatile java.lang.Object source_; /** * optional string source = 1; * @return Whether the source field is set. */ @java.lang.Override public boolean hasSource() { return ((bitField0_ & 0x00000001) != 0); } /** * optional string source = 1; * @return The source. */ @java.lang.Override public java.lang.String getSource() { java.lang.Object ref = source_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { source_ = s; } return s; } } /** * optional string source = 1; * @return The bytes for source. */ @java.lang.Override public com.google.protobuf.ByteString getSourceBytes() { java.lang.Object ref = source_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); source_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GENERATIONTIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp generationTime_; /** * optional .google.protobuf.Timestamp generationTime = 2; * @return Whether the generationTime field is set. */ @java.lang.Override public boolean hasGenerationTime() { return ((bitField0_ & 0x00000002) != 0); } /** * optional .google.protobuf.Timestamp generationTime = 2; * @return The generationTime. */ @java.lang.Override public com.google.protobuf.Timestamp getGenerationTime() { return generationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : generationTime_; } /** * optional .google.protobuf.Timestamp generationTime = 2; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getGenerationTimeOrBuilder() { return generationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : generationTime_; } public static final int RECEPTIONTIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp receptionTime_; /** * optional .google.protobuf.Timestamp receptionTime = 3; * @return Whether the receptionTime field is set. */ @java.lang.Override public boolean hasReceptionTime() { return ((bitField0_ & 0x00000004) != 0); } /** * optional .google.protobuf.Timestamp receptionTime = 3; * @return The receptionTime. */ @java.lang.Override public com.google.protobuf.Timestamp getReceptionTime() { return receptionTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : receptionTime_; } /** * optional .google.protobuf.Timestamp receptionTime = 3; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getReceptionTimeOrBuilder() { return receptionTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : receptionTime_; } public static final int SEQNUMBER_FIELD_NUMBER = 4; private int seqNumber_; /** * optional int32 seqNumber = 4; * @return Whether the seqNumber field is set. */ @java.lang.Override public boolean hasSeqNumber() { return ((bitField0_ & 0x00000008) != 0); } /** * optional int32 seqNumber = 4; * @return The seqNumber. */ @java.lang.Override public int getSeqNumber() { return seqNumber_; } public static final int TYPE_FIELD_NUMBER = 5; private volatile java.lang.Object type_; /** * optional string type = 5; * @return Whether the type field is set. */ @java.lang.Override public boolean hasType() { return ((bitField0_ & 0x00000010) != 0); } /** * optional string type = 5; * @return The type. */ @java.lang.Override public java.lang.String getType() { java.lang.Object ref = type_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { type_ = s; } return s; } } /** * optional string type = 5; * @return The bytes for type. */ @java.lang.Override public com.google.protobuf.ByteString getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); type_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MESSAGE_FIELD_NUMBER = 6; private volatile java.lang.Object message_; /** * optional string message = 6; * @return Whether the message field is set. */ @java.lang.Override public boolean hasMessage() { return ((bitField0_ & 0x00000020) != 0); } /** * optional string message = 6; * @return The message. */ @java.lang.Override public java.lang.String getMessage() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { message_ = s; } return s; } } /** * optional string message = 6; * @return The bytes for message. */ @java.lang.Override public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SEVERITY_FIELD_NUMBER = 7; private int severity_; /** * optional .yamcs.protobuf.events.Event.EventSeverity severity = 7 [default = INFO]; * @return Whether the severity field is set. */ @java.lang.Override public boolean hasSeverity() { return ((bitField0_ & 0x00000040) != 0); } /** * optional .yamcs.protobuf.events.Event.EventSeverity severity = 7 [default = INFO]; * @return The severity. */ @java.lang.Override public org.yamcs.protobuf.Event.EventSeverity getSeverity() { @SuppressWarnings("deprecation") org.yamcs.protobuf.Event.EventSeverity result = org.yamcs.protobuf.Event.EventSeverity.valueOf(severity_); return result == null ? org.yamcs.protobuf.Event.EventSeverity.INFO : result; } public static final int CREATEDBY_FIELD_NUMBER = 10; private volatile java.lang.Object createdBy_; /** *
   * Set by API when event was posted by a user
   * 
* * optional string createdBy = 10; * @return Whether the createdBy field is set. */ @java.lang.Override public boolean hasCreatedBy() { return ((bitField0_ & 0x00000080) != 0); } /** *
   * Set by API when event was posted by a user
   * 
* * optional string createdBy = 10; * @return The createdBy. */ @java.lang.Override public java.lang.String getCreatedBy() { java.lang.Object ref = createdBy_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { createdBy_ = s; } return s; } } /** *
   * Set by API when event was posted by a user
   * 
* * optional string createdBy = 10; * @return The bytes for createdBy. */ @java.lang.Override public com.google.protobuf.ByteString getCreatedByBytes() { java.lang.Object ref = createdBy_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); createdBy_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int EXTRA_FIELD_NUMBER = 11; private static final class ExtraDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( org.yamcs.protobuf.EventsProto.internal_static_yamcs_protobuf_events_Event_ExtraEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } private com.google.protobuf.MapField< java.lang.String, java.lang.String> extra_; private com.google.protobuf.MapField internalGetExtra() { if (extra_ == null) { return com.google.protobuf.MapField.emptyMapField( ExtraDefaultEntryHolder.defaultEntry); } return extra_; } public int getExtraCount() { return internalGetExtra().getMap().size(); } /** *
   * Additional properties
   * 
* * map<string, string> extra = 11; */ @java.lang.Override public boolean containsExtra( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetExtra().getMap().containsKey(key); } /** * Use {@link #getExtraMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getExtra() { return getExtraMap(); } /** *
   * Additional properties
   * 
* * map<string, string> extra = 11; */ @java.lang.Override public java.util.Map getExtraMap() { return internalGetExtra().getMap(); } /** *
   * Additional properties
   * 
* * map<string, string> extra = 11; */ @java.lang.Override public java.lang.String getExtraOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetExtra().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
   * Additional properties
   * 
* * map<string, string> extra = 11; */ @java.lang.Override public java.lang.String getExtraOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetExtra().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getGenerationTime()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(3, getReceptionTime()); } if (((bitField0_ & 0x00000008) != 0)) { output.writeInt32(4, seqNumber_); } if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, type_); } if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, message_); } if (((bitField0_ & 0x00000040) != 0)) { output.writeEnum(7, severity_); } if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, createdBy_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetExtra(), ExtraDefaultEntryHolder.defaultEntry, 11); unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getGenerationTime()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getReceptionTime()); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, seqNumber_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, type_); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, message_); } if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(7, severity_); } if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, createdBy_); } for (java.util.Map.Entry entry : internalGetExtra().getMap().entrySet()) { com.google.protobuf.MapEntry extra__ = ExtraDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, extra__); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.yamcs.protobuf.Event)) { return super.equals(obj); } org.yamcs.protobuf.Event other = (org.yamcs.protobuf.Event) obj; if (hasSource() != other.hasSource()) return false; if (hasSource()) { if (!getSource() .equals(other.getSource())) return false; } if (hasGenerationTime() != other.hasGenerationTime()) return false; if (hasGenerationTime()) { if (!getGenerationTime() .equals(other.getGenerationTime())) return false; } if (hasReceptionTime() != other.hasReceptionTime()) return false; if (hasReceptionTime()) { if (!getReceptionTime() .equals(other.getReceptionTime())) return false; } if (hasSeqNumber() != other.hasSeqNumber()) return false; if (hasSeqNumber()) { if (getSeqNumber() != other.getSeqNumber()) return false; } if (hasType() != other.hasType()) return false; if (hasType()) { if (!getType() .equals(other.getType())) return false; } if (hasMessage() != other.hasMessage()) return false; if (hasMessage()) { if (!getMessage() .equals(other.getMessage())) return false; } if (hasSeverity() != other.hasSeverity()) return false; if (hasSeverity()) { if (severity_ != other.severity_) return false; } if (hasCreatedBy() != other.hasCreatedBy()) return false; if (hasCreatedBy()) { if (!getCreatedBy() .equals(other.getCreatedBy())) return false; } if (!internalGetExtra().equals( other.internalGetExtra())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasSource()) { hash = (37 * hash) + SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSource().hashCode(); } if (hasGenerationTime()) { hash = (37 * hash) + GENERATIONTIME_FIELD_NUMBER; hash = (53 * hash) + getGenerationTime().hashCode(); } if (hasReceptionTime()) { hash = (37 * hash) + RECEPTIONTIME_FIELD_NUMBER; hash = (53 * hash) + getReceptionTime().hashCode(); } if (hasSeqNumber()) { hash = (37 * hash) + SEQNUMBER_FIELD_NUMBER; hash = (53 * hash) + getSeqNumber(); } if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } if (hasMessage()) { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } if (hasSeverity()) { hash = (37 * hash) + SEVERITY_FIELD_NUMBER; hash = (53 * hash) + severity_; } if (hasCreatedBy()) { hash = (37 * hash) + CREATEDBY_FIELD_NUMBER; hash = (53 * hash) + getCreatedBy().hashCode(); } if (!internalGetExtra().getMap().isEmpty()) { hash = (37 * hash) + EXTRA_FIELD_NUMBER; hash = (53 * hash) + internalGetExtra().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static org.yamcs.protobuf.Event parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.Event parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.yamcs.protobuf.Event parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.Event parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.yamcs.protobuf.Event parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static org.yamcs.protobuf.Event parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static org.yamcs.protobuf.Event parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.yamcs.protobuf.Event parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static org.yamcs.protobuf.Event parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static org.yamcs.protobuf.Event parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static org.yamcs.protobuf.Event parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static org.yamcs.protobuf.Event parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.yamcs.protobuf.Event prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code yamcs.protobuf.events.Event} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yamcs.protobuf.events.Event) org.yamcs.protobuf.EventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.yamcs.protobuf.EventsProto.internal_static_yamcs_protobuf_events_Event_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 11: return internalGetExtra(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 11: return internalGetMutableExtra(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return org.yamcs.protobuf.EventsProto.internal_static_yamcs_protobuf_events_Event_fieldAccessorTable .ensureFieldAccessorsInitialized( org.yamcs.protobuf.Event.class, org.yamcs.protobuf.Event.Builder.class); } // Construct using org.yamcs.protobuf.Event.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getGenerationTimeFieldBuilder(); getReceptionTimeFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); source_ = ""; bitField0_ = (bitField0_ & ~0x00000001); if (generationTimeBuilder_ == null) { generationTime_ = null; } else { generationTimeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); if (receptionTimeBuilder_ == null) { receptionTime_ = null; } else { receptionTimeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); seqNumber_ = 0; bitField0_ = (bitField0_ & ~0x00000008); type_ = ""; bitField0_ = (bitField0_ & ~0x00000010); message_ = ""; bitField0_ = (bitField0_ & ~0x00000020); severity_ = 0; bitField0_ = (bitField0_ & ~0x00000040); createdBy_ = ""; bitField0_ = (bitField0_ & ~0x00000080); internalGetMutableExtra().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return org.yamcs.protobuf.EventsProto.internal_static_yamcs_protobuf_events_Event_descriptor; } @java.lang.Override public org.yamcs.protobuf.Event getDefaultInstanceForType() { return org.yamcs.protobuf.Event.getDefaultInstance(); } @java.lang.Override public org.yamcs.protobuf.Event build() { org.yamcs.protobuf.Event result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public org.yamcs.protobuf.Event buildPartial() { org.yamcs.protobuf.Event result = new org.yamcs.protobuf.Event(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { to_bitField0_ |= 0x00000001; } result.source_ = source_; if (((from_bitField0_ & 0x00000002) != 0)) { if (generationTimeBuilder_ == null) { result.generationTime_ = generationTime_; } else { result.generationTime_ = generationTimeBuilder_.build(); } to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000004) != 0)) { if (receptionTimeBuilder_ == null) { result.receptionTime_ = receptionTime_; } else { result.receptionTime_ = receptionTimeBuilder_.build(); } to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000008) != 0)) { result.seqNumber_ = seqNumber_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000010) != 0)) { to_bitField0_ |= 0x00000010; } result.type_ = type_; if (((from_bitField0_ & 0x00000020) != 0)) { to_bitField0_ |= 0x00000020; } result.message_ = message_; if (((from_bitField0_ & 0x00000040) != 0)) { to_bitField0_ |= 0x00000040; } result.severity_ = severity_; if (((from_bitField0_ & 0x00000080) != 0)) { to_bitField0_ |= 0x00000080; } result.createdBy_ = createdBy_; result.extra_ = internalGetExtra(); result.extra_.makeImmutable(); result.bitField0_ = to_bitField0_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof org.yamcs.protobuf.Event) { return mergeFrom((org.yamcs.protobuf.Event)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(org.yamcs.protobuf.Event other) { if (other == org.yamcs.protobuf.Event.getDefaultInstance()) return this; if (other.hasSource()) { bitField0_ |= 0x00000001; source_ = other.source_; onChanged(); } if (other.hasGenerationTime()) { mergeGenerationTime(other.getGenerationTime()); } if (other.hasReceptionTime()) { mergeReceptionTime(other.getReceptionTime()); } if (other.hasSeqNumber()) { setSeqNumber(other.getSeqNumber()); } if (other.hasType()) { bitField0_ |= 0x00000010; type_ = other.type_; onChanged(); } if (other.hasMessage()) { bitField0_ |= 0x00000020; message_ = other.message_; onChanged(); } if (other.hasSeverity()) { setSeverity(other.getSeverity()); } if (other.hasCreatedBy()) { bitField0_ |= 0x00000080; createdBy_ = other.createdBy_; onChanged(); } internalGetMutableExtra().mergeFrom( other.internalGetExtra()); this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { org.yamcs.protobuf.Event parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (org.yamcs.protobuf.Event) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object source_ = ""; /** * optional string source = 1; * @return Whether the source field is set. */ public boolean hasSource() { return ((bitField0_ & 0x00000001) != 0); } /** * optional string source = 1; * @return The source. */ public java.lang.String getSource() { java.lang.Object ref = source_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { source_ = s; } return s; } else { return (java.lang.String) ref; } } /** * optional string source = 1; * @return The bytes for source. */ public com.google.protobuf.ByteString getSourceBytes() { java.lang.Object ref = source_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); source_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string source = 1; * @param value The source to set. * @return This builder for chaining. */ public Builder setSource( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; source_ = value; onChanged(); return this; } /** * optional string source = 1; * @return This builder for chaining. */ public Builder clearSource() { bitField0_ = (bitField0_ & ~0x00000001); source_ = getDefaultInstance().getSource(); onChanged(); return this; } /** * optional string source = 1; * @param value The bytes for source to set. * @return This builder for chaining. */ public Builder setSourceBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; source_ = value; onChanged(); return this; } private com.google.protobuf.Timestamp generationTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> generationTimeBuilder_; /** * optional .google.protobuf.Timestamp generationTime = 2; * @return Whether the generationTime field is set. */ public boolean hasGenerationTime() { return ((bitField0_ & 0x00000002) != 0); } /** * optional .google.protobuf.Timestamp generationTime = 2; * @return The generationTime. */ public com.google.protobuf.Timestamp getGenerationTime() { if (generationTimeBuilder_ == null) { return generationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : generationTime_; } else { return generationTimeBuilder_.getMessage(); } } /** * optional .google.protobuf.Timestamp generationTime = 2; */ public Builder setGenerationTime(com.google.protobuf.Timestamp value) { if (generationTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } generationTime_ = value; onChanged(); } else { generationTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000002; return this; } /** * optional .google.protobuf.Timestamp generationTime = 2; */ public Builder setGenerationTime( com.google.protobuf.Timestamp.Builder builderForValue) { if (generationTimeBuilder_ == null) { generationTime_ = builderForValue.build(); onChanged(); } else { generationTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; return this; } /** * optional .google.protobuf.Timestamp generationTime = 2; */ public Builder mergeGenerationTime(com.google.protobuf.Timestamp value) { if (generationTimeBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && generationTime_ != null && generationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { generationTime_ = com.google.protobuf.Timestamp.newBuilder(generationTime_).mergeFrom(value).buildPartial(); } else { generationTime_ = value; } onChanged(); } else { generationTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; return this; } /** * optional .google.protobuf.Timestamp generationTime = 2; */ public Builder clearGenerationTime() { if (generationTimeBuilder_ == null) { generationTime_ = null; onChanged(); } else { generationTimeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); return this; } /** * optional .google.protobuf.Timestamp generationTime = 2; */ public com.google.protobuf.Timestamp.Builder getGenerationTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); return getGenerationTimeFieldBuilder().getBuilder(); } /** * optional .google.protobuf.Timestamp generationTime = 2; */ public com.google.protobuf.TimestampOrBuilder getGenerationTimeOrBuilder() { if (generationTimeBuilder_ != null) { return generationTimeBuilder_.getMessageOrBuilder(); } else { return generationTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : generationTime_; } } /** * optional .google.protobuf.Timestamp generationTime = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getGenerationTimeFieldBuilder() { if (generationTimeBuilder_ == null) { generationTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getGenerationTime(), getParentForChildren(), isClean()); generationTime_ = null; } return generationTimeBuilder_; } private com.google.protobuf.Timestamp receptionTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> receptionTimeBuilder_; /** * optional .google.protobuf.Timestamp receptionTime = 3; * @return Whether the receptionTime field is set. */ public boolean hasReceptionTime() { return ((bitField0_ & 0x00000004) != 0); } /** * optional .google.protobuf.Timestamp receptionTime = 3; * @return The receptionTime. */ public com.google.protobuf.Timestamp getReceptionTime() { if (receptionTimeBuilder_ == null) { return receptionTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : receptionTime_; } else { return receptionTimeBuilder_.getMessage(); } } /** * optional .google.protobuf.Timestamp receptionTime = 3; */ public Builder setReceptionTime(com.google.protobuf.Timestamp value) { if (receptionTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } receptionTime_ = value; onChanged(); } else { receptionTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** * optional .google.protobuf.Timestamp receptionTime = 3; */ public Builder setReceptionTime( com.google.protobuf.Timestamp.Builder builderForValue) { if (receptionTimeBuilder_ == null) { receptionTime_ = builderForValue.build(); onChanged(); } else { receptionTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** * optional .google.protobuf.Timestamp receptionTime = 3; */ public Builder mergeReceptionTime(com.google.protobuf.Timestamp value) { if (receptionTimeBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && receptionTime_ != null && receptionTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { receptionTime_ = com.google.protobuf.Timestamp.newBuilder(receptionTime_).mergeFrom(value).buildPartial(); } else { receptionTime_ = value; } onChanged(); } else { receptionTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** * optional .google.protobuf.Timestamp receptionTime = 3; */ public Builder clearReceptionTime() { if (receptionTimeBuilder_ == null) { receptionTime_ = null; onChanged(); } else { receptionTimeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** * optional .google.protobuf.Timestamp receptionTime = 3; */ public com.google.protobuf.Timestamp.Builder getReceptionTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); return getReceptionTimeFieldBuilder().getBuilder(); } /** * optional .google.protobuf.Timestamp receptionTime = 3; */ public com.google.protobuf.TimestampOrBuilder getReceptionTimeOrBuilder() { if (receptionTimeBuilder_ != null) { return receptionTimeBuilder_.getMessageOrBuilder(); } else { return receptionTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : receptionTime_; } } /** * optional .google.protobuf.Timestamp receptionTime = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getReceptionTimeFieldBuilder() { if (receptionTimeBuilder_ == null) { receptionTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getReceptionTime(), getParentForChildren(), isClean()); receptionTime_ = null; } return receptionTimeBuilder_; } private int seqNumber_ ; /** * optional int32 seqNumber = 4; * @return Whether the seqNumber field is set. */ @java.lang.Override public boolean hasSeqNumber() { return ((bitField0_ & 0x00000008) != 0); } /** * optional int32 seqNumber = 4; * @return The seqNumber. */ @java.lang.Override public int getSeqNumber() { return seqNumber_; } /** * optional int32 seqNumber = 4; * @param value The seqNumber to set. * @return This builder for chaining. */ public Builder setSeqNumber(int value) { bitField0_ |= 0x00000008; seqNumber_ = value; onChanged(); return this; } /** * optional int32 seqNumber = 4; * @return This builder for chaining. */ public Builder clearSeqNumber() { bitField0_ = (bitField0_ & ~0x00000008); seqNumber_ = 0; onChanged(); return this; } private java.lang.Object type_ = ""; /** * optional string type = 5; * @return Whether the type field is set. */ public boolean hasType() { return ((bitField0_ & 0x00000010) != 0); } /** * optional string type = 5; * @return The type. */ public java.lang.String getType() { java.lang.Object ref = type_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { type_ = s; } return s; } else { return (java.lang.String) ref; } } /** * optional string type = 5; * @return The bytes for type. */ public com.google.protobuf.ByteString getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); type_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string type = 5; * @param value The type to set. * @return This builder for chaining. */ public Builder setType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; type_ = value; onChanged(); return this; } /** * optional string type = 5; * @return This builder for chaining. */ public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000010); type_ = getDefaultInstance().getType(); onChanged(); return this; } /** * optional string type = 5; * @param value The bytes for type to set. * @return This builder for chaining. */ public Builder setTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; type_ = value; onChanged(); return this; } private java.lang.Object message_ = ""; /** * optional string message = 6; * @return Whether the message field is set. */ public boolean hasMessage() { return ((bitField0_ & 0x00000020) != 0); } /** * optional string message = 6; * @return The message. */ public java.lang.String getMessage() { java.lang.Object ref = message_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { message_ = s; } return s; } else { return (java.lang.String) ref; } } /** * optional string message = 6; * @return The bytes for message. */ public com.google.protobuf.ByteString getMessageBytes() { java.lang.Object ref = message_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string message = 6; * @param value The message to set. * @return This builder for chaining. */ public Builder setMessage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; message_ = value; onChanged(); return this; } /** * optional string message = 6; * @return This builder for chaining. */ public Builder clearMessage() { bitField0_ = (bitField0_ & ~0x00000020); message_ = getDefaultInstance().getMessage(); onChanged(); return this; } /** * optional string message = 6; * @param value The bytes for message to set. * @return This builder for chaining. */ public Builder setMessageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; message_ = value; onChanged(); return this; } private int severity_ = 0; /** * optional .yamcs.protobuf.events.Event.EventSeverity severity = 7 [default = INFO]; * @return Whether the severity field is set. */ @java.lang.Override public boolean hasSeverity() { return ((bitField0_ & 0x00000040) != 0); } /** * optional .yamcs.protobuf.events.Event.EventSeverity severity = 7 [default = INFO]; * @return The severity. */ @java.lang.Override public org.yamcs.protobuf.Event.EventSeverity getSeverity() { @SuppressWarnings("deprecation") org.yamcs.protobuf.Event.EventSeverity result = org.yamcs.protobuf.Event.EventSeverity.valueOf(severity_); return result == null ? org.yamcs.protobuf.Event.EventSeverity.INFO : result; } /** * optional .yamcs.protobuf.events.Event.EventSeverity severity = 7 [default = INFO]; * @param value The severity to set. * @return This builder for chaining. */ public Builder setSeverity(org.yamcs.protobuf.Event.EventSeverity value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000040; severity_ = value.getNumber(); onChanged(); return this; } /** * optional .yamcs.protobuf.events.Event.EventSeverity severity = 7 [default = INFO]; * @return This builder for chaining. */ public Builder clearSeverity() { bitField0_ = (bitField0_ & ~0x00000040); severity_ = 0; onChanged(); return this; } private java.lang.Object createdBy_ = ""; /** *
     * Set by API when event was posted by a user
     * 
* * optional string createdBy = 10; * @return Whether the createdBy field is set. */ public boolean hasCreatedBy() { return ((bitField0_ & 0x00000080) != 0); } /** *
     * Set by API when event was posted by a user
     * 
* * optional string createdBy = 10; * @return The createdBy. */ public java.lang.String getCreatedBy() { java.lang.Object ref = createdBy_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { createdBy_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     * Set by API when event was posted by a user
     * 
* * optional string createdBy = 10; * @return The bytes for createdBy. */ public com.google.protobuf.ByteString getCreatedByBytes() { java.lang.Object ref = createdBy_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); createdBy_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Set by API when event was posted by a user
     * 
* * optional string createdBy = 10; * @param value The createdBy to set. * @return This builder for chaining. */ public Builder setCreatedBy( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000080; createdBy_ = value; onChanged(); return this; } /** *
     * Set by API when event was posted by a user
     * 
* * optional string createdBy = 10; * @return This builder for chaining. */ public Builder clearCreatedBy() { bitField0_ = (bitField0_ & ~0x00000080); createdBy_ = getDefaultInstance().getCreatedBy(); onChanged(); return this; } /** *
     * Set by API when event was posted by a user
     * 
* * optional string createdBy = 10; * @param value The bytes for createdBy to set. * @return This builder for chaining. */ public Builder setCreatedByBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000080; createdBy_ = value; onChanged(); return this; } private com.google.protobuf.MapField< java.lang.String, java.lang.String> extra_; private com.google.protobuf.MapField internalGetExtra() { if (extra_ == null) { return com.google.protobuf.MapField.emptyMapField( ExtraDefaultEntryHolder.defaultEntry); } return extra_; } private com.google.protobuf.MapField internalGetMutableExtra() { onChanged();; if (extra_ == null) { extra_ = com.google.protobuf.MapField.newMapField( ExtraDefaultEntryHolder.defaultEntry); } if (!extra_.isMutable()) { extra_ = extra_.copy(); } return extra_; } public int getExtraCount() { return internalGetExtra().getMap().size(); } /** *
     * Additional properties
     * 
* * map<string, string> extra = 11; */ @java.lang.Override public boolean containsExtra( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetExtra().getMap().containsKey(key); } /** * Use {@link #getExtraMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getExtra() { return getExtraMap(); } /** *
     * Additional properties
     * 
* * map<string, string> extra = 11; */ @java.lang.Override public java.util.Map getExtraMap() { return internalGetExtra().getMap(); } /** *
     * Additional properties
     * 
* * map<string, string> extra = 11; */ @java.lang.Override public java.lang.String getExtraOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetExtra().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     * Additional properties
     * 
* * map<string, string> extra = 11; */ @java.lang.Override public java.lang.String getExtraOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetExtra().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearExtra() { internalGetMutableExtra().getMutableMap() .clear(); return this; } /** *
     * Additional properties
     * 
* * map<string, string> extra = 11; */ public Builder removeExtra( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableExtra().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableExtra() { return internalGetMutableExtra().getMutableMap(); } /** *
     * Additional properties
     * 
* * map<string, string> extra = 11; */ public Builder putExtra( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableExtra().getMutableMap() .put(key, value); return this; } /** *
     * Additional properties
     * 
* * map<string, string> extra = 11; */ public Builder putAllExtra( java.util.Map values) { internalGetMutableExtra().getMutableMap() .putAll(values); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:yamcs.protobuf.events.Event) } // @@protoc_insertion_point(class_scope:yamcs.protobuf.events.Event) private static final org.yamcs.protobuf.Event DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new org.yamcs.protobuf.Event(); } public static org.yamcs.protobuf.Event getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Event parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Event(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public org.yamcs.protobuf.Event getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy