
org.yamcs.protobuf.CreateEventRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yamcs-api Show documentation
Show all versions of yamcs-api Show documentation
Used by external clients to communicate with Yamcs
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yamcs/protobuf/events/events_service.proto
package org.yamcs.protobuf;
/**
* Protobuf type {@code yamcs.protobuf.events.CreateEventRequest}
*/
public final class CreateEventRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yamcs.protobuf.events.CreateEventRequest)
CreateEventRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CreateEventRequest.newBuilder() to construct.
private CreateEventRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CreateEventRequest() {
instance_ = "";
type_ = "";
message_ = "";
severity_ = "";
source_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CreateEventRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CreateEventRequest(
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;
instance_ = bs;
break;
}
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
type_ = bs;
break;
}
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000004;
message_ = bs;
break;
}
case 34: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000008;
severity_ = bs;
break;
}
case 42: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) != 0)) {
subBuilder = time_.toBuilder();
}
time_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(time_);
time_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
case 50: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000020;
source_ = bs;
break;
}
case 56: {
bitField0_ |= 0x00000040;
sequenceNumber_ = input.readInt32();
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000080) != 0)) {
extra_ = com.google.protobuf.MapField.newMapField(
ExtraDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000080;
}
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.EventsServiceProto.internal_static_yamcs_protobuf_events_CreateEventRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 8:
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.EventsServiceProto.internal_static_yamcs_protobuf_events_CreateEventRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.yamcs.protobuf.CreateEventRequest.class, org.yamcs.protobuf.CreateEventRequest.Builder.class);
}
private int bitField0_;
public static final int INSTANCE_FIELD_NUMBER = 1;
private volatile java.lang.Object instance_;
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @return Whether the instance field is set.
*/
@java.lang.Override
public boolean hasInstance() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @return The instance.
*/
@java.lang.Override
public java.lang.String getInstance() {
java.lang.Object ref = instance_;
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()) {
instance_ = s;
}
return s;
}
}
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @return The bytes for instance.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getInstanceBytes() {
java.lang.Object ref = instance_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instance_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 2;
private volatile java.lang.Object type_;
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @return Whether the type field is set.
*/
@java.lang.Override
public boolean hasType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @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;
}
}
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @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 = 3;
private volatile java.lang.Object message_;
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @return Whether the message field is set.
*/
@java.lang.Override
public boolean hasMessage() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @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;
}
}
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @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 = 4;
private volatile java.lang.Object severity_;
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @return Whether the severity field is set.
*/
@java.lang.Override
public boolean hasSeverity() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @return The severity.
*/
@java.lang.Override
public java.lang.String getSeverity() {
java.lang.Object ref = severity_;
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()) {
severity_ = s;
}
return s;
}
}
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @return The bytes for severity.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSeverityBytes() {
java.lang.Object ref = severity_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
severity_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TIME_FIELD_NUMBER = 5;
private com.google.protobuf.Timestamp time_;
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
* @return Whether the time field is set.
*/
@java.lang.Override
public boolean hasTime() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
* @return The time.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getTime() {
return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_;
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() {
return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_;
}
public static final int SOURCE_FIELD_NUMBER = 6;
private volatile java.lang.Object source_;
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @return Whether the source field is set.
*/
@java.lang.Override
public boolean hasSource() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @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;
}
}
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @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 SEQUENCENUMBER_FIELD_NUMBER = 7;
private int sequenceNumber_;
/**
*
* Sequence number of this event. This is primarily used to determine unicity of
* events coming from the same source. If not set Yamcs will automatically
* assign a sequential number as if every submitted event is unique.
*
*
* optional int32 sequenceNumber = 7;
* @return Whether the sequenceNumber field is set.
*/
@java.lang.Override
public boolean hasSequenceNumber() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Sequence number of this event. This is primarily used to determine unicity of
* events coming from the same source. If not set Yamcs will automatically
* assign a sequential number as if every submitted event is unique.
*
*
* optional int32 sequenceNumber = 7;
* @return The sequenceNumber.
*/
@java.lang.Override
public int getSequenceNumber() {
return sequenceNumber_;
}
public static final int EXTRA_FIELD_NUMBER = 8;
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.EventsServiceProto.internal_static_yamcs_protobuf_events_CreateEventRequest_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 = 8;
*/
@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 = 8;
*/
@java.lang.Override
public java.util.Map getExtraMap() {
return internalGetExtra().getMap();
}
/**
*
* Additional properties
*
*
* map<string, string> extra = 8;
*/
@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 = 8;
*/
@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, instance_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, severity_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(5, getTime());
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, source_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeInt32(7, sequenceNumber_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetExtra(),
ExtraDefaultEntryHolder.defaultEntry,
8);
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, instance_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, severity_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getTime());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, source_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(7, sequenceNumber_);
}
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(8, 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.CreateEventRequest)) {
return super.equals(obj);
}
org.yamcs.protobuf.CreateEventRequest other = (org.yamcs.protobuf.CreateEventRequest) obj;
if (hasInstance() != other.hasInstance()) return false;
if (hasInstance()) {
if (!getInstance()
.equals(other.getInstance())) 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 (!getSeverity()
.equals(other.getSeverity())) return false;
}
if (hasTime() != other.hasTime()) return false;
if (hasTime()) {
if (!getTime()
.equals(other.getTime())) return false;
}
if (hasSource() != other.hasSource()) return false;
if (hasSource()) {
if (!getSource()
.equals(other.getSource())) return false;
}
if (hasSequenceNumber() != other.hasSequenceNumber()) return false;
if (hasSequenceNumber()) {
if (getSequenceNumber()
!= other.getSequenceNumber()) 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 (hasInstance()) {
hash = (37 * hash) + INSTANCE_FIELD_NUMBER;
hash = (53 * hash) + getInstance().hashCode();
}
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) + getSeverity().hashCode();
}
if (hasTime()) {
hash = (37 * hash) + TIME_FIELD_NUMBER;
hash = (53 * hash) + getTime().hashCode();
}
if (hasSource()) {
hash = (37 * hash) + SOURCE_FIELD_NUMBER;
hash = (53 * hash) + getSource().hashCode();
}
if (hasSequenceNumber()) {
hash = (37 * hash) + SEQUENCENUMBER_FIELD_NUMBER;
hash = (53 * hash) + getSequenceNumber();
}
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.CreateEventRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.CreateEventRequest 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.CreateEventRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.CreateEventRequest 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.CreateEventRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.yamcs.protobuf.CreateEventRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.yamcs.protobuf.CreateEventRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.CreateEventRequest 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.CreateEventRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.CreateEventRequest 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.CreateEventRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.yamcs.protobuf.CreateEventRequest 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.CreateEventRequest 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.CreateEventRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yamcs.protobuf.events.CreateEventRequest)
org.yamcs.protobuf.CreateEventRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.yamcs.protobuf.EventsServiceProto.internal_static_yamcs_protobuf_events_CreateEventRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 8:
return internalGetExtra();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 8:
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.EventsServiceProto.internal_static_yamcs_protobuf_events_CreateEventRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.yamcs.protobuf.CreateEventRequest.class, org.yamcs.protobuf.CreateEventRequest.Builder.class);
}
// Construct using org.yamcs.protobuf.CreateEventRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
instance_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
type_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
message_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
severity_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
if (timeBuilder_ == null) {
time_ = null;
} else {
timeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
source_ = "";
bitField0_ = (bitField0_ & ~0x00000020);
sequenceNumber_ = 0;
bitField0_ = (bitField0_ & ~0x00000040);
internalGetMutableExtra().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.yamcs.protobuf.EventsServiceProto.internal_static_yamcs_protobuf_events_CreateEventRequest_descriptor;
}
@java.lang.Override
public org.yamcs.protobuf.CreateEventRequest getDefaultInstanceForType() {
return org.yamcs.protobuf.CreateEventRequest.getDefaultInstance();
}
@java.lang.Override
public org.yamcs.protobuf.CreateEventRequest build() {
org.yamcs.protobuf.CreateEventRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.yamcs.protobuf.CreateEventRequest buildPartial() {
org.yamcs.protobuf.CreateEventRequest result = new org.yamcs.protobuf.CreateEventRequest(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
to_bitField0_ |= 0x00000001;
}
result.instance_ = instance_;
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.type_ = type_;
if (((from_bitField0_ & 0x00000004) != 0)) {
to_bitField0_ |= 0x00000004;
}
result.message_ = message_;
if (((from_bitField0_ & 0x00000008) != 0)) {
to_bitField0_ |= 0x00000008;
}
result.severity_ = severity_;
if (((from_bitField0_ & 0x00000010) != 0)) {
if (timeBuilder_ == null) {
result.time_ = time_;
} else {
result.time_ = timeBuilder_.build();
}
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
to_bitField0_ |= 0x00000020;
}
result.source_ = source_;
if (((from_bitField0_ & 0x00000040) != 0)) {
result.sequenceNumber_ = sequenceNumber_;
to_bitField0_ |= 0x00000040;
}
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.CreateEventRequest) {
return mergeFrom((org.yamcs.protobuf.CreateEventRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.yamcs.protobuf.CreateEventRequest other) {
if (other == org.yamcs.protobuf.CreateEventRequest.getDefaultInstance()) return this;
if (other.hasInstance()) {
bitField0_ |= 0x00000001;
instance_ = other.instance_;
onChanged();
}
if (other.hasType()) {
bitField0_ |= 0x00000002;
type_ = other.type_;
onChanged();
}
if (other.hasMessage()) {
bitField0_ |= 0x00000004;
message_ = other.message_;
onChanged();
}
if (other.hasSeverity()) {
bitField0_ |= 0x00000008;
severity_ = other.severity_;
onChanged();
}
if (other.hasTime()) {
mergeTime(other.getTime());
}
if (other.hasSource()) {
bitField0_ |= 0x00000020;
source_ = other.source_;
onChanged();
}
if (other.hasSequenceNumber()) {
setSequenceNumber(other.getSequenceNumber());
}
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.CreateEventRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.yamcs.protobuf.CreateEventRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object instance_ = "";
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @return Whether the instance field is set.
*/
public boolean hasInstance() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @return The instance.
*/
public java.lang.String getInstance() {
java.lang.Object ref = instance_;
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()) {
instance_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @return The bytes for instance.
*/
public com.google.protobuf.ByteString
getInstanceBytes() {
java.lang.Object ref = instance_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instance_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @param value The instance to set.
* @return This builder for chaining.
*/
public Builder setInstance(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
instance_ = value;
onChanged();
return this;
}
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @return This builder for chaining.
*/
public Builder clearInstance() {
bitField0_ = (bitField0_ & ~0x00000001);
instance_ = getDefaultInstance().getInstance();
onChanged();
return this;
}
/**
*
* Yamcs instance name
*
*
* optional string instance = 1;
* @param value The bytes for instance to set.
* @return This builder for chaining.
*/
public Builder setInstanceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
instance_ = value;
onChanged();
return this;
}
private java.lang.Object type_ = "";
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @return Whether the type field is set.
*/
public boolean hasType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @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;
}
}
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @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;
}
}
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @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_ |= 0x00000002;
type_ = value;
onChanged();
return this;
}
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = getDefaultInstance().getType();
onChanged();
return this;
}
/**
*
* Description of the type of the event. Useful for quick classification or filtering.
*
*
* optional string type = 2;
* @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_ |= 0x00000002;
type_ = value;
onChanged();
return this;
}
private java.lang.Object message_ = "";
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @return Whether the message field is set.
*/
public boolean hasMessage() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @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;
}
}
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @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;
}
}
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @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_ |= 0x00000004;
message_ = value;
onChanged();
return this;
}
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @return This builder for chaining.
*/
public Builder clearMessage() {
bitField0_ = (bitField0_ & ~0x00000004);
message_ = getDefaultInstance().getMessage();
onChanged();
return this;
}
/**
*
* **Required.** Event message.
*
*
* optional string message = 3;
* @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_ |= 0x00000004;
message_ = value;
onChanged();
return this;
}
private java.lang.Object severity_ = "";
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @return Whether the severity field is set.
*/
public boolean hasSeverity() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @return The severity.
*/
public java.lang.String getSeverity() {
java.lang.Object ref = severity_;
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()) {
severity_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @return The bytes for severity.
*/
public com.google.protobuf.ByteString
getSeverityBytes() {
java.lang.Object ref = severity_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
severity_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @param value The severity to set.
* @return This builder for chaining.
*/
public Builder setSeverity(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
severity_ = value;
onChanged();
return this;
}
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @return This builder for chaining.
*/
public Builder clearSeverity() {
bitField0_ = (bitField0_ & ~0x00000008);
severity_ = getDefaultInstance().getSeverity();
onChanged();
return this;
}
/**
*
* The severity level of the event. One of ``info``, ``watch``, ``warning``,
* ``distress``, ``critical`` or ``severe``. Default is ``info``
*
*
* optional string severity = 4;
* @param value The bytes for severity to set.
* @return This builder for chaining.
*/
public Builder setSeverityBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
severity_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp time_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeBuilder_;
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
* @return Whether the time field is set.
*/
public boolean hasTime() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
* @return The time.
*/
public com.google.protobuf.Timestamp getTime() {
if (timeBuilder_ == null) {
return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_;
} else {
return timeBuilder_.getMessage();
}
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
*/
public Builder setTime(com.google.protobuf.Timestamp value) {
if (timeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
time_ = value;
onChanged();
} else {
timeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
*/
public Builder setTime(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (timeBuilder_ == null) {
time_ = builderForValue.build();
onChanged();
} else {
timeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
*/
public Builder mergeTime(com.google.protobuf.Timestamp value) {
if (timeBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
time_ != null &&
time_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
time_ =
com.google.protobuf.Timestamp.newBuilder(time_).mergeFrom(value).buildPartial();
} else {
time_ = value;
}
onChanged();
} else {
timeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
*/
public Builder clearTime() {
if (timeBuilder_ == null) {
time_ = null;
onChanged();
} else {
timeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
*/
public com.google.protobuf.Timestamp.Builder getTimeBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getTimeFieldBuilder().getBuilder();
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
*/
public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() {
if (timeBuilder_ != null) {
return timeBuilder_.getMessageOrBuilder();
} else {
return time_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : time_;
}
}
/**
*
* Time associated with the event.
* If unspecified, this will default to the current mission time.
*
*
* optional .google.protobuf.Timestamp time = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getTimeFieldBuilder() {
if (timeBuilder_ == null) {
timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getTime(),
getParentForChildren(),
isClean());
time_ = null;
}
return timeBuilder_;
}
private java.lang.Object source_ = "";
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @return Whether the source field is set.
*/
public boolean hasSource() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @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;
}
}
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @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;
}
}
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @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_ |= 0x00000020;
source_ = value;
onChanged();
return this;
}
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @return This builder for chaining.
*/
public Builder clearSource() {
bitField0_ = (bitField0_ & ~0x00000020);
source_ = getDefaultInstance().getSource();
onChanged();
return this;
}
/**
*
* Source of the event. Useful for grouping events in the archive. Default is
* ``User``.
*
*
* optional string source = 6;
* @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_ |= 0x00000020;
source_ = value;
onChanged();
return this;
}
private int sequenceNumber_ ;
/**
*
* Sequence number of this event. This is primarily used to determine unicity of
* events coming from the same source. If not set Yamcs will automatically
* assign a sequential number as if every submitted event is unique.
*
*
* optional int32 sequenceNumber = 7;
* @return Whether the sequenceNumber field is set.
*/
@java.lang.Override
public boolean hasSequenceNumber() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Sequence number of this event. This is primarily used to determine unicity of
* events coming from the same source. If not set Yamcs will automatically
* assign a sequential number as if every submitted event is unique.
*
*
* optional int32 sequenceNumber = 7;
* @return The sequenceNumber.
*/
@java.lang.Override
public int getSequenceNumber() {
return sequenceNumber_;
}
/**
*
* Sequence number of this event. This is primarily used to determine unicity of
* events coming from the same source. If not set Yamcs will automatically
* assign a sequential number as if every submitted event is unique.
*
*
* optional int32 sequenceNumber = 7;
* @param value The sequenceNumber to set.
* @return This builder for chaining.
*/
public Builder setSequenceNumber(int value) {
bitField0_ |= 0x00000040;
sequenceNumber_ = value;
onChanged();
return this;
}
/**
*
* Sequence number of this event. This is primarily used to determine unicity of
* events coming from the same source. If not set Yamcs will automatically
* assign a sequential number as if every submitted event is unique.
*
*
* optional int32 sequenceNumber = 7;
* @return This builder for chaining.
*/
public Builder clearSequenceNumber() {
bitField0_ = (bitField0_ & ~0x00000040);
sequenceNumber_ = 0;
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 = 8;
*/
@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 = 8;
*/
@java.lang.Override
public java.util.Map getExtraMap() {
return internalGetExtra().getMap();
}
/**
*
* Additional properties
*
*
* map<string, string> extra = 8;
*/
@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 = 8;
*/
@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 = 8;
*/
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 = 8;
*/
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 = 8;
*/
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.CreateEventRequest)
}
// @@protoc_insertion_point(class_scope:yamcs.protobuf.events.CreateEventRequest)
private static final org.yamcs.protobuf.CreateEventRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.yamcs.protobuf.CreateEventRequest();
}
public static org.yamcs.protobuf.CreateEventRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CreateEventRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CreateEventRequest(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.CreateEventRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy