diff --git a/clients/java/mxgateway-client/src/main/java/com/dohertylan/mxgateway/client/MxGatewayActiveAlarmsSubscription.java b/clients/java/mxgateway-client/src/main/java/com/dohertylan/mxgateway/client/MxGatewayAlarmFeedSubscription.java similarity index 61% rename from clients/java/mxgateway-client/src/main/java/com/dohertylan/mxgateway/client/MxGatewayActiveAlarmsSubscription.java rename to clients/java/mxgateway-client/src/main/java/com/dohertylan/mxgateway/client/MxGatewayAlarmFeedSubscription.java index 7a2c832..b7e4ab7 100644 --- a/clients/java/mxgateway-client/src/main/java/com/dohertylan/mxgateway/client/MxGatewayActiveAlarmsSubscription.java +++ b/clients/java/mxgateway-client/src/main/java/com/dohertylan/mxgateway/client/MxGatewayAlarmFeedSubscription.java @@ -5,33 +5,33 @@ import io.grpc.stub.ClientResponseObserver; import io.grpc.stub.StreamObserver; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; -import mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot; -import mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest; +import mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage; +import mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest; /** - * Cancellable handle returned by {@code queryActiveAlarms}. + * Cancellable handle returned by {@code streamAlarms}. * *
Wraps a caller-supplied {@link StreamObserver} and exposes a
* {@link #cancel()} entry point that aborts the underlying gRPC call. The
* subscription also implements {@link AutoCloseable} so it can participate in
* try-with-resources blocks.
*/
-public final class MxGatewayActiveAlarmsSubscription implements AutoCloseable {
- private final AtomicReference Served by the gateway's always-on alarm monitor — no worker session is
+ * opened — so any number of clients may attach.
+ *
+ * @param request the {@code StreamAlarmsRequest}, optionally scoped by
* alarm-reference prefix
- * @param observer caller-supplied observer that receives snapshots and completion
+ * @param observer caller-supplied observer that receives feed messages and completion
* @return a cancellable subscription handle
*/
- public MxGatewayActiveAlarmsSubscription queryActiveAlarms(
- QueryActiveAlarmsRequest request, StreamObserver
+ * Session-less central alarm feed. The stream opens with the current
+ * active-alarm snapshot (one `active_alarm` per alarm), then a single
+ * `snapshot_complete`, then a `transition` for every subsequent change.
+ * Served by the gateway's always-on alarm monitor; any number of clients
+ * fan out from the single monitor without opening a worker session.
+ *
*/
- default void queryActiveAlarms(mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest request,
- io.grpc.stub.StreamObserver
+ * Session-less central alarm feed. The stream opens with the current
+ * active-alarm snapshot (one `active_alarm` per alarm), then a single
+ * `snapshot_complete`, then a `transition` for every subsequent change.
+ * Served by the gateway's always-on alarm monitor; any number of clients
+ * fan out from the single monitor without opening a worker session.
+ *
*/
- public void queryActiveAlarms(mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest request,
- io.grpc.stub.StreamObserver
+ * Session-less central alarm feed. The stream opens with the current
+ * active-alarm snapshot (one `active_alarm` per alarm), then a single
+ * `snapshot_complete`, then a `transition` for every subsequent change.
+ * Served by the gateway's always-on alarm monitor; any number of clients
+ * fan out from the single monitor without opening a worker session.
+ *
*/
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918")
- public io.grpc.stub.BlockingClientCall, mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot>
- queryActiveAlarms(mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest request) {
+ public io.grpc.stub.BlockingClientCall, mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage>
+ streamAlarms(mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest request) {
return io.grpc.stub.ClientCalls.blockingV2ServerStreamingCall(
- getChannel(), getQueryActiveAlarmsMethod(), getCallOptions(), request);
+ getChannel(), getStreamAlarmsMethod(), getCallOptions(), request);
}
}
@@ -514,11 +535,18 @@ public final class MxAccessGatewayGrpc {
}
/**
+ *
+ * Session-less central alarm feed. The stream opens with the current
+ * active-alarm snapshot (one `active_alarm` per alarm), then a single
+ * `snapshot_complete`, then a `transition` for every subsequent change.
+ * Served by the gateway's always-on alarm monitor; any number of clients
+ * fan out from the single monitor without opening a worker session.
+ *
*/
- public java.util.Iteratorstring session_id = 1;
- * @return The sessionId.
- */
- java.lang.String getSessionId();
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- com.google.protobuf.ByteString
- getSessionIdBytes();
-
/**
* string client_correlation_id = 2;
* @return The clientCorrelationId.
@@ -78355,7 +78343,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
super(builder);
}
private AcknowledgeAlarmRequest() {
- sessionId_ = "";
clientCorrelationId_ = "";
alarmFullReference_ = "";
comment_ = "";
@@ -78375,45 +78362,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest.class, mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest.Builder.class);
}
- public static final int SESSION_ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object sessionId_ = "";
- /**
- * string session_id = 1;
- * @return The sessionId.
- */
- @java.lang.Override
- public java.lang.String getSessionId() {
- java.lang.Object ref = sessionId_;
- 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();
- sessionId_ = s;
- return s;
- }
- }
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getSessionIdBytes() {
- java.lang.Object ref = sessionId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- sessionId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
public static final int CLIENT_CORRELATION_ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object clientCorrelationId_ = "";
@@ -78610,9 +78558,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 1, sessionId_);
- }
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientCorrelationId_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, clientCorrelationId_);
}
@@ -78634,9 +78579,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (size != -1) return size;
size = 0;
- if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sessionId_);
- }
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientCorrelationId_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clientCorrelationId_);
}
@@ -78664,8 +78606,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest other = (mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest) obj;
- if (!getSessionId()
- .equals(other.getSessionId())) return false;
if (!getClientCorrelationId()
.equals(other.getClientCorrelationId())) return false;
if (!getAlarmFullReference()
@@ -78685,8 +78625,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + SESSION_ID_FIELD_NUMBER;
- hash = (53 * hash) + getSessionId().hashCode();
hash = (37 * hash) + CLIENT_CORRELATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getClientCorrelationId().hashCode();
hash = (37 * hash) + ALARM_FULL_REFERENCE_FIELD_NUMBER;
@@ -78826,7 +78764,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
public Builder clear() {
super.clear();
bitField0_ = 0;
- sessionId_ = "";
clientCorrelationId_ = "";
alarmFullReference_ = "";
comment_ = "";
@@ -78865,18 +78802,15 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
private void buildPartial0(mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
- result.sessionId_ = sessionId_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
result.clientCorrelationId_ = clientCorrelationId_;
}
- if (((from_bitField0_ & 0x00000004) != 0)) {
+ if (((from_bitField0_ & 0x00000002) != 0)) {
result.alarmFullReference_ = alarmFullReference_;
}
- if (((from_bitField0_ & 0x00000008) != 0)) {
+ if (((from_bitField0_ & 0x00000004) != 0)) {
result.comment_ = comment_;
}
- if (((from_bitField0_ & 0x00000010) != 0)) {
+ if (((from_bitField0_ & 0x00000008) != 0)) {
result.operatorUser_ = operatorUser_;
}
}
@@ -78893,29 +78827,24 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
public Builder mergeFrom(mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest other) {
if (other == mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmRequest.getDefaultInstance()) return this;
- if (!other.getSessionId().isEmpty()) {
- sessionId_ = other.sessionId_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
if (!other.getClientCorrelationId().isEmpty()) {
clientCorrelationId_ = other.clientCorrelationId_;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getAlarmFullReference().isEmpty()) {
alarmFullReference_ = other.alarmFullReference_;
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getComment().isEmpty()) {
comment_ = other.comment_;
- bitField0_ |= 0x00000008;
+ bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getOperatorUser().isEmpty()) {
operatorUser_ = other.operatorUser_;
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
@@ -78944,29 +78873,24 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
case 0:
done = true;
break;
- case 10: {
- sessionId_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
case 18: {
clientCorrelationId_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
break;
} // case 18
case 26: {
alarmFullReference_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
break;
} // case 26
case 34: {
comment_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000008;
+ bitField0_ |= 0x00000004;
break;
} // case 34
case 42: {
operatorUser_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
break;
} // case 42
default: {
@@ -78986,78 +78910,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
private int bitField0_;
- private java.lang.Object sessionId_ = "";
- /**
- * string session_id = 1;
- * @return The sessionId.
- */
- public java.lang.String getSessionId() {
- java.lang.Object ref = sessionId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- sessionId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- public com.google.protobuf.ByteString
- getSessionIdBytes() {
- java.lang.Object ref = sessionId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- sessionId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string session_id = 1;
- * @param value The sessionId to set.
- * @return This builder for chaining.
- */
- public Builder setSessionId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- sessionId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- * string session_id = 1;
- * @return This builder for chaining.
- */
- public Builder clearSessionId() {
- sessionId_ = getDefaultInstance().getSessionId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * string session_id = 1;
- * @param value The bytes for sessionId to set.
- * @return This builder for chaining.
- */
- public Builder setSessionIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- sessionId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
private java.lang.Object clientCorrelationId_ = "";
/**
* string client_correlation_id = 2;
@@ -79101,7 +78953,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
clientCorrelationId_ = value;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -79111,7 +78963,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
public Builder clearClientCorrelationId() {
clientCorrelationId_ = getDefaultInstance().getClientCorrelationId();
- bitField0_ = (bitField0_ & ~0x00000002);
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -79125,7 +78977,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
clientCorrelationId_ = value;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -79185,7 +79037,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
alarmFullReference_ = value;
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -79199,7 +79051,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
public Builder clearAlarmFullReference() {
alarmFullReference_ = getDefaultInstance().getAlarmFullReference();
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@@ -79217,7 +79069,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
alarmFullReference_ = value;
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -79277,7 +79129,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
comment_ = value;
- bitField0_ |= 0x00000008;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -79291,7 +79143,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
public Builder clearComment() {
comment_ = getDefaultInstance().getComment();
- bitField0_ = (bitField0_ & ~0x00000008);
+ bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
@@ -79309,7 +79161,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
comment_ = value;
- bitField0_ |= 0x00000008;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -79372,7 +79224,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
operatorUser_ = value;
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -79387,7 +79239,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
public Builder clearOperatorUser() {
operatorUser_ = getDefaultInstance().getOperatorUser();
- bitField0_ = (bitField0_ & ~0x00000010);
+ bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
@@ -79406,7 +79258,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
operatorUser_ = value;
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -79466,18 +79318,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
// @@protoc_insertion_point(interface_extends:mxaccess_gateway.v1.AcknowledgeAlarmReply)
com.google.protobuf.MessageOrBuilder {
- /**
- * string session_id = 1;
- * @return The sessionId.
- */
- java.lang.String getSessionId();
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- com.google.protobuf.ByteString
- getSessionIdBytes();
-
/**
* string correlation_id = 2;
* @return The correlationId.
@@ -79607,7 +79447,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
super(builder);
}
private AcknowledgeAlarmReply() {
- sessionId_ = "";
correlationId_ = "";
diagnosticMessage_ = "";
}
@@ -79626,45 +79465,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
private int bitField0_;
- public static final int SESSION_ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object sessionId_ = "";
- /**
- * string session_id = 1;
- * @return The sessionId.
- */
- @java.lang.Override
- public java.lang.String getSessionId() {
- java.lang.Object ref = sessionId_;
- 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();
- sessionId_ = s;
- return s;
- }
- }
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getSessionIdBytes() {
- java.lang.Object ref = sessionId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- sessionId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
public static final int CORRELATION_ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object correlationId_ = "";
@@ -79870,9 +79670,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 1, sessionId_);
- }
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(correlationId_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, correlationId_);
}
@@ -79897,9 +79694,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (size != -1) return size;
size = 0;
- if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sessionId_);
- }
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(correlationId_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, correlationId_);
}
@@ -79933,8 +79727,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmReply other = (mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmReply) obj;
- if (!getSessionId()
- .equals(other.getSessionId())) return false;
if (!getCorrelationId()
.equals(other.getCorrelationId())) return false;
if (hasProtocolStatus() != other.hasProtocolStatus()) return false;
@@ -79965,8 +79757,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + SESSION_ID_FIELD_NUMBER;
- hash = (53 * hash) + getSessionId().hashCode();
hash = (37 * hash) + CORRELATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getCorrelationId().hashCode();
if (hasProtocolStatus()) {
@@ -80121,7 +79911,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
public Builder clear() {
super.clear();
bitField0_ = 0;
- sessionId_ = "";
correlationId_ = "";
protocolStatus_ = null;
if (protocolStatusBuilder_ != null) {
@@ -80169,29 +79958,26 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
private void buildPartial0(mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmReply result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
- result.sessionId_ = sessionId_;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
result.correlationId_ = correlationId_;
}
int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000004) != 0)) {
+ if (((from_bitField0_ & 0x00000002) != 0)) {
result.protocolStatus_ = protocolStatusBuilder_ == null
? protocolStatus_
: protocolStatusBuilder_.build();
to_bitField0_ |= 0x00000001;
}
- if (((from_bitField0_ & 0x00000008) != 0)) {
+ if (((from_bitField0_ & 0x00000004) != 0)) {
result.hresult_ = hresult_;
to_bitField0_ |= 0x00000002;
}
- if (((from_bitField0_ & 0x00000010) != 0)) {
+ if (((from_bitField0_ & 0x00000008) != 0)) {
result.status_ = statusBuilder_ == null
? status_
: statusBuilder_.build();
to_bitField0_ |= 0x00000004;
}
- if (((from_bitField0_ & 0x00000020) != 0)) {
+ if (((from_bitField0_ & 0x00000010) != 0)) {
result.diagnosticMessage_ = diagnosticMessage_;
}
result.bitField0_ |= to_bitField0_;
@@ -80209,14 +79995,9 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
public Builder mergeFrom(mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmReply other) {
if (other == mxaccess_gateway.v1.MxaccessGateway.AcknowledgeAlarmReply.getDefaultInstance()) return this;
- if (!other.getSessionId().isEmpty()) {
- sessionId_ = other.sessionId_;
- bitField0_ |= 0x00000001;
- onChanged();
- }
if (!other.getCorrelationId().isEmpty()) {
correlationId_ = other.correlationId_;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasProtocolStatus()) {
@@ -80230,7 +80011,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
if (!other.getDiagnosticMessage().isEmpty()) {
diagnosticMessage_ = other.diagnosticMessage_;
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000010;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
@@ -80259,38 +80040,33 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
case 0:
done = true;
break;
- case 10: {
- sessionId_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000001;
- break;
- } // case 10
case 18: {
correlationId_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
break;
} // case 18
case 26: {
input.readMessage(
internalGetProtocolStatusFieldBuilder().getBuilder(),
extensionRegistry);
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
break;
} // case 26
case 32: {
hresult_ = input.readInt32();
- bitField0_ |= 0x00000008;
+ bitField0_ |= 0x00000004;
break;
} // case 32
case 42: {
input.readMessage(
internalGetStatusFieldBuilder().getBuilder(),
extensionRegistry);
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
break;
} // case 42
case 50: {
diagnosticMessage_ = input.readStringRequireUtf8();
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000010;
break;
} // case 50
default: {
@@ -80310,78 +80086,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
private int bitField0_;
- private java.lang.Object sessionId_ = "";
- /**
- * string session_id = 1;
- * @return The sessionId.
- */
- public java.lang.String getSessionId() {
- java.lang.Object ref = sessionId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- sessionId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- public com.google.protobuf.ByteString
- getSessionIdBytes() {
- java.lang.Object ref = sessionId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- sessionId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string session_id = 1;
- * @param value The sessionId to set.
- * @return This builder for chaining.
- */
- public Builder setSessionId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- sessionId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- * string session_id = 1;
- * @return This builder for chaining.
- */
- public Builder clearSessionId() {
- sessionId_ = getDefaultInstance().getSessionId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * string session_id = 1;
- * @param value The bytes for sessionId to set.
- * @return This builder for chaining.
- */
- public Builder setSessionIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- sessionId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
private java.lang.Object correlationId_ = "";
/**
* string correlation_id = 2;
@@ -80425,7 +80129,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
correlationId_ = value;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -80435,7 +80139,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
public Builder clearCorrelationId() {
correlationId_ = getDefaultInstance().getCorrelationId();
- bitField0_ = (bitField0_ & ~0x00000002);
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -80449,7 +80153,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
correlationId_ = value;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -80462,7 +80166,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* @return Whether the protocolStatus field is set.
*/
public boolean hasProtocolStatus() {
- return ((bitField0_ & 0x00000004) != 0);
+ return ((bitField0_ & 0x00000002) != 0);
}
/**
* .mxaccess_gateway.v1.ProtocolStatus protocol_status = 3;
@@ -80487,7 +80191,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
} else {
protocolStatusBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -80501,7 +80205,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
} else {
protocolStatusBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -80510,7 +80214,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
public Builder mergeProtocolStatus(mxaccess_gateway.v1.MxaccessGateway.ProtocolStatus value) {
if (protocolStatusBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0) &&
+ if (((bitField0_ & 0x00000002) != 0) &&
protocolStatus_ != null &&
protocolStatus_ != mxaccess_gateway.v1.MxaccessGateway.ProtocolStatus.getDefaultInstance()) {
getProtocolStatusBuilder().mergeFrom(value);
@@ -80521,7 +80225,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
protocolStatusBuilder_.mergeFrom(value);
}
if (protocolStatus_ != null) {
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
}
return this;
@@ -80530,7 +80234,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* .mxaccess_gateway.v1.ProtocolStatus protocol_status = 3;
*/
public Builder clearProtocolStatus() {
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000002);
protocolStatus_ = null;
if (protocolStatusBuilder_ != null) {
protocolStatusBuilder_.dispose();
@@ -80543,7 +80247,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* .mxaccess_gateway.v1.ProtocolStatus protocol_status = 3;
*/
public mxaccess_gateway.v1.MxaccessGateway.ProtocolStatus.Builder getProtocolStatusBuilder() {
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
return internalGetProtocolStatusFieldBuilder().getBuilder();
}
@@ -80591,7 +80295,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
@java.lang.Override
public boolean hasHresult() {
- return ((bitField0_ & 0x00000008) != 0);
+ return ((bitField0_ & 0x00000004) != 0);
}
/**
*
@@ -80627,7 +80331,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
public Builder setHresult(int value) {
hresult_ = value;
- bitField0_ |= 0x00000008;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -80645,7 +80349,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* @return This builder for chaining.
*/
public Builder clearHresult() {
- bitField0_ = (bitField0_ & ~0x00000008);
+ bitField0_ = (bitField0_ & ~0x00000004);
hresult_ = 0;
onChanged();
return this;
@@ -80667,7 +80371,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* @return Whether the status field is set.
*/
public boolean hasStatus() {
- return ((bitField0_ & 0x00000010) != 0);
+ return ((bitField0_ & 0x00000008) != 0);
}
/**
*
@@ -80708,7 +80412,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
} else {
statusBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -80730,7 +80434,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
} else {
statusBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -80747,7 +80451,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
public Builder mergeStatus(mxaccess_gateway.v1.MxaccessGateway.MxStatusProxy value) {
if (statusBuilder_ == null) {
- if (((bitField0_ & 0x00000010) != 0) &&
+ if (((bitField0_ & 0x00000008) != 0) &&
status_ != null &&
status_ != mxaccess_gateway.v1.MxaccessGateway.MxStatusProxy.getDefaultInstance()) {
getStatusBuilder().mergeFrom(value);
@@ -80758,7 +80462,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
statusBuilder_.mergeFrom(value);
}
if (status_ != null) {
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
onChanged();
}
return this;
@@ -80775,7 +80479,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* .mxaccess_gateway.v1.MxStatusProxy status = 5;
*/
public Builder clearStatus() {
- bitField0_ = (bitField0_ & ~0x00000010);
+ bitField0_ = (bitField0_ & ~0x00000008);
status_ = null;
if (statusBuilder_ != null) {
statusBuilder_.dispose();
@@ -80796,7 +80500,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
* .mxaccess_gateway.v1.MxStatusProxy status = 5;
*/
public mxaccess_gateway.v1.MxaccessGateway.MxStatusProxy.Builder getStatusBuilder() {
- bitField0_ |= 0x00000010;
+ bitField0_ |= 0x00000008;
onChanged();
return internalGetStatusFieldBuilder().getBuilder();
}
@@ -80887,7 +80591,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
diagnosticMessage_ = value;
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -80897,7 +80601,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
*/
public Builder clearDiagnosticMessage() {
diagnosticMessage_ = getDefaultInstance().getDiagnosticMessage();
- bitField0_ = (bitField0_ & ~0x00000020);
+ bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
@@ -80911,7 +80615,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
diagnosticMessage_ = value;
- bitField0_ |= 0x00000020;
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -80967,29 +80671,17 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
- public interface QueryActiveAlarmsRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:mxaccess_gateway.v1.QueryActiveAlarmsRequest)
+ public interface StreamAlarmsRequestOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:mxaccess_gateway.v1.StreamAlarmsRequest)
com.google.protobuf.MessageOrBuilder {
/**
- * string session_id = 1;
- * @return The sessionId.
- */
- java.lang.String getSessionId();
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- com.google.protobuf.ByteString
- getSessionIdBytes();
-
- /**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @return The clientCorrelationId.
*/
java.lang.String getClientCorrelationId();
/**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @return The bytes for clientCorrelationId.
*/
com.google.protobuf.ByteString
@@ -80997,33 +80689,37 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @return The alarmFilterPrefix.
*/
java.lang.String getAlarmFilterPrefix();
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @return The bytes for alarmFilterPrefix.
*/
com.google.protobuf.ByteString
getAlarmFilterPrefixBytes();
}
/**
- * Protobuf type {@code mxaccess_gateway.v1.QueryActiveAlarmsRequest}
+ *
+ * Request to attach to the gateway's central alarm feed (StreamAlarms).
+ *
+ *
+ * Protobuf type {@code mxaccess_gateway.v1.StreamAlarmsRequest}
*/
- public static final class QueryActiveAlarmsRequest extends
+ public static final class StreamAlarmsRequest extends
com.google.protobuf.GeneratedMessage implements
- // @@protoc_insertion_point(message_implements:mxaccess_gateway.v1.QueryActiveAlarmsRequest)
- QueryActiveAlarmsRequestOrBuilder {
+ // @@protoc_insertion_point(message_implements:mxaccess_gateway.v1.StreamAlarmsRequest)
+ StreamAlarmsRequestOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
@@ -81032,75 +80728,35 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
/* minor= */ 33,
/* patch= */ 1,
/* suffix= */ "",
- "QueryActiveAlarmsRequest");
+ "StreamAlarmsRequest");
}
- // Use QueryActiveAlarmsRequest.newBuilder() to construct.
- private QueryActiveAlarmsRequest(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ // Use StreamAlarmsRequest.newBuilder() to construct.
+ private StreamAlarmsRequest(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
- private QueryActiveAlarmsRequest() {
- sessionId_ = "";
+ private StreamAlarmsRequest() {
clientCorrelationId_ = "";
alarmFilterPrefix_ = "";
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return mxaccess_gateway.v1.MxaccessGateway.internal_static_mxaccess_gateway_v1_QueryActiveAlarmsRequest_descriptor;
+ return mxaccess_gateway.v1.MxaccessGateway.internal_static_mxaccess_gateway_v1_StreamAlarmsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
- return mxaccess_gateway.v1.MxaccessGateway.internal_static_mxaccess_gateway_v1_QueryActiveAlarmsRequest_fieldAccessorTable
+ return mxaccess_gateway.v1.MxaccessGateway.internal_static_mxaccess_gateway_v1_StreamAlarmsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
- mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest.class, mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest.Builder.class);
+ mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest.class, mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest.Builder.class);
}
- public static final int SESSION_ID_FIELD_NUMBER = 1;
- @SuppressWarnings("serial")
- private volatile java.lang.Object sessionId_ = "";
- /**
- * string session_id = 1;
- * @return The sessionId.
- */
- @java.lang.Override
- public java.lang.String getSessionId() {
- java.lang.Object ref = sessionId_;
- 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();
- sessionId_ = s;
- return s;
- }
- }
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString
- getSessionIdBytes() {
- java.lang.Object ref = sessionId_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- sessionId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int CLIENT_CORRELATION_ID_FIELD_NUMBER = 2;
+ public static final int CLIENT_CORRELATION_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object clientCorrelationId_ = "";
/**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @return The clientCorrelationId.
*/
@java.lang.Override
@@ -81117,7 +80773,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
}
/**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @return The bytes for clientCorrelationId.
*/
@java.lang.Override
@@ -81135,16 +80791,16 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
}
- public static final int ALARM_FILTER_PREFIX_FIELD_NUMBER = 3;
+ public static final int ALARM_FILTER_PREFIX_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object alarmFilterPrefix_ = "";
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @return The alarmFilterPrefix.
*/
@java.lang.Override
@@ -81162,11 +80818,11 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @return The bytes for alarmFilterPrefix.
*/
@java.lang.Override
@@ -81198,14 +80854,11 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 1, sessionId_);
- }
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientCorrelationId_)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 2, clientCorrelationId_);
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, clientCorrelationId_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(alarmFilterPrefix_)) {
- com.google.protobuf.GeneratedMessage.writeString(output, 3, alarmFilterPrefix_);
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, alarmFilterPrefix_);
}
getUnknownFields().writeTo(output);
}
@@ -81216,14 +80869,11 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (size != -1) return size;
size = 0;
- if (!com.google.protobuf.GeneratedMessage.isStringEmpty(sessionId_)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(1, sessionId_);
- }
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(clientCorrelationId_)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(2, clientCorrelationId_);
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, clientCorrelationId_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(alarmFilterPrefix_)) {
- size += com.google.protobuf.GeneratedMessage.computeStringSize(3, alarmFilterPrefix_);
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, alarmFilterPrefix_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
@@ -81235,13 +80885,11 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (obj == this) {
return true;
}
- if (!(obj instanceof mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest)) {
+ if (!(obj instanceof mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest)) {
return super.equals(obj);
}
- mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest other = (mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest) obj;
+ mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest other = (mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest) obj;
- if (!getSessionId()
- .equals(other.getSessionId())) return false;
if (!getClientCorrelationId()
.equals(other.getClientCorrelationId())) return false;
if (!getAlarmFilterPrefix()
@@ -81257,8 +80905,6 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + SESSION_ID_FIELD_NUMBER;
- hash = (53 * hash) + getSessionId().hashCode();
hash = (37 * hash) + CLIENT_CORRELATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getClientCorrelationId().hashCode();
hash = (37 * hash) + ALARM_FILTER_PREFIX_FIELD_NUMBER;
@@ -81268,44 +80914,44 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
return hash;
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(byte[] data)
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(java.io.InputStream input)
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -81313,26 +80959,26 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
.parseWithIOException(PARSER, input, extensionRegistry);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseDelimitedFrom(java.io.InputStream input)
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseDelimitedFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest parseFrom(
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
@@ -81345,7 +80991,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
- public static Builder newBuilder(mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest prototype) {
+ public static Builder newBuilder(mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
@@ -81361,26 +81007,30 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
return builder;
}
/**
- * Protobuf type {@code mxaccess_gateway.v1.QueryActiveAlarmsRequest}
+ *
+ * Request to attach to the gateway's central alarm feed (StreamAlarms).
+ *
+ *
+ * Protobuf type {@code mxaccess_gateway.v1.StreamAlarmsRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builderstring session_id = 1;
- * @return The sessionId.
- */
- public java.lang.String getSessionId() {
- java.lang.Object ref = sessionId_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- sessionId_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * string session_id = 1;
- * @return The bytes for sessionId.
- */
- public com.google.protobuf.ByteString
- getSessionIdBytes() {
- java.lang.Object ref = sessionId_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- sessionId_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * string session_id = 1;
- * @param value The sessionId to set.
- * @return This builder for chaining.
- */
- public Builder setSessionId(
- java.lang.String value) {
- if (value == null) { throw new NullPointerException(); }
- sessionId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
- /**
- * string session_id = 1;
- * @return This builder for chaining.
- */
- public Builder clearSessionId() {
- sessionId_ = getDefaultInstance().getSessionId();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- /**
- * string session_id = 1;
- * @param value The bytes for sessionId to set.
- * @return This builder for chaining.
- */
- public Builder setSessionIdBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) { throw new NullPointerException(); }
- checkByteStringIsUtf8(value);
- sessionId_ = value;
- bitField0_ |= 0x00000001;
- onChanged();
- return this;
- }
-
private java.lang.Object clientCorrelationId_ = "";
/**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @return The clientCorrelationId.
*/
public java.lang.String getClientCorrelationId() {
@@ -81616,7 +81180,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
}
/**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @return The bytes for clientCorrelationId.
*/
public com.google.protobuf.ByteString
@@ -81633,7 +81197,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
}
/**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @param value The clientCorrelationId to set.
* @return This builder for chaining.
*/
@@ -81641,22 +81205,22 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
clientCorrelationId_ = value;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @return This builder for chaining.
*/
public Builder clearClientCorrelationId() {
clientCorrelationId_ = getDefaultInstance().getClientCorrelationId();
- bitField0_ = (bitField0_ & ~0x00000002);
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
- * string client_correlation_id = 2;
+ * string client_correlation_id = 1;
* @param value The bytes for clientCorrelationId to set.
* @return This builder for chaining.
*/
@@ -81665,7 +81229,7 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
clientCorrelationId_ = value;
- bitField0_ |= 0x00000002;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -81673,11 +81237,11 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
private java.lang.Object alarmFilterPrefix_ = "";
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @return The alarmFilterPrefix.
*/
public java.lang.String getAlarmFilterPrefix() {
@@ -81694,11 +81258,11 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @return The bytes for alarmFilterPrefix.
*/
public com.google.protobuf.ByteString
@@ -81716,11 +81280,11 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
}
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @param value The alarmFilterPrefix to set.
* @return This builder for chaining.
*/
@@ -81728,32 +81292,32 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
alarmFilterPrefix_ = value;
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @return This builder for chaining.
*/
public Builder clearAlarmFilterPrefix() {
alarmFilterPrefix_ = getDefaultInstance().getAlarmFilterPrefix();
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
- * Optional alarm-reference prefix used to scope a partial ConditionRefresh
- * (e.g. equipment sub-tree). Empty means full refresh.
+ * Optional alarm-reference prefix scoping the feed to an equipment
+ * sub-tree. Empty streams every active alarm.
*
*
- * string alarm_filter_prefix = 3;
+ * string alarm_filter_prefix = 2;
* @param value The bytes for alarmFilterPrefix to set.
* @return This builder for chaining.
*/
@@ -81762,28 +81326,28 @@ public final class MxaccessGateway extends com.google.protobuf.GeneratedFile {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
alarmFilterPrefix_ = value;
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
- // @@protoc_insertion_point(builder_scope:mxaccess_gateway.v1.QueryActiveAlarmsRequest)
+ // @@protoc_insertion_point(builder_scope:mxaccess_gateway.v1.StreamAlarmsRequest)
}
- // @@protoc_insertion_point(class_scope:mxaccess_gateway.v1.QueryActiveAlarmsRequest)
- private static final mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest DEFAULT_INSTANCE;
+ // @@protoc_insertion_point(class_scope:mxaccess_gateway.v1.StreamAlarmsRequest)
+ private static final mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest DEFAULT_INSTANCE;
static {
- DEFAULT_INSTANCE = new mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest();
+ DEFAULT_INSTANCE = new mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest();
}
- public static mxaccess_gateway.v1.MxaccessGateway.QueryActiveAlarmsRequest getDefaultInstance() {
+ public static mxaccess_gateway.v1.MxaccessGateway.StreamAlarmsRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
- private static final com.google.protobuf.Parser
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ * @return Whether the activeAlarm field is set.
+ */
+ boolean hasActiveAlarm();
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ * @return The activeAlarm.
+ */
+ mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot getActiveAlarm();
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshotOrBuilder getActiveAlarmOrBuilder();
+
+ /**
+ *
+ * Sentinel: the initial snapshot is fully delivered and `transition`
+ * messages follow. Always true when present.
+ *
+ *
+ * bool snapshot_complete = 2;
+ * @return Whether the snapshotComplete field is set.
+ */
+ boolean hasSnapshotComplete();
+ /**
+ *
+ * Sentinel: the initial snapshot is fully delivered and `transition`
+ * messages follow. Always true when present.
+ *
+ *
+ * bool snapshot_complete = 2;
+ * @return The snapshotComplete.
+ */
+ boolean getSnapshotComplete();
+
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ * @return Whether the transition field is set.
+ */
+ boolean hasTransition();
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ * @return The transition.
+ */
+ mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent getTransition();
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEventOrBuilder getTransitionOrBuilder();
+
+ mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage.PayloadCase getPayloadCase();
+ }
+ /**
+ *
+ * One message on the StreamAlarms feed. The stream opens with one
+ * `active_alarm` per currently-active alarm, then a single
+ * `snapshot_complete`, then a `transition` for every subsequent change.
+ *
+ *
+ * Protobuf type {@code mxaccess_gateway.v1.AlarmFeedMessage}
+ */
+ public static final class AlarmFeedMessage extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:mxaccess_gateway.v1.AlarmFeedMessage)
+ AlarmFeedMessageOrBuilder {
+ private static final long serialVersionUID = 0L;
+ static {
+ com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
+ com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
+ /* major= */ 4,
+ /* minor= */ 33,
+ /* patch= */ 1,
+ /* suffix= */ "",
+ "AlarmFeedMessage");
+ }
+ // Use AlarmFeedMessage.newBuilder() to construct.
+ private AlarmFeedMessage(com.google.protobuf.GeneratedMessage.Builder> builder) {
+ super(builder);
+ }
+ private AlarmFeedMessage() {
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return mxaccess_gateway.v1.MxaccessGateway.internal_static_mxaccess_gateway_v1_AlarmFeedMessage_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return mxaccess_gateway.v1.MxaccessGateway.internal_static_mxaccess_gateway_v1_AlarmFeedMessage_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage.class, mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage.Builder.class);
+ }
+
+ private int payloadCase_ = 0;
+ @SuppressWarnings("serial")
+ private java.lang.Object payload_;
+ public enum PayloadCase
+ implements com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ ACTIVE_ALARM(1),
+ SNAPSHOT_COMPLETE(2),
+ TRANSITION(3),
+ PAYLOAD_NOT_SET(0);
+ private final int value;
+ private PayloadCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static PayloadCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static PayloadCase forNumber(int value) {
+ switch (value) {
+ case 1: return ACTIVE_ALARM;
+ case 2: return SNAPSHOT_COMPLETE;
+ case 3: return TRANSITION;
+ case 0: return PAYLOAD_NOT_SET;
+ default: return null;
+ }
+ }
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public PayloadCase
+ getPayloadCase() {
+ return PayloadCase.forNumber(
+ payloadCase_);
+ }
+
+ public static final int ACTIVE_ALARM_FIELD_NUMBER = 1;
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ * @return Whether the activeAlarm field is set.
+ */
+ @java.lang.Override
+ public boolean hasActiveAlarm() {
+ return payloadCase_ == 1;
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ * @return The activeAlarm.
+ */
+ @java.lang.Override
+ public mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot getActiveAlarm() {
+ if (payloadCase_ == 1) {
+ return (mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot) payload_;
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.getDefaultInstance();
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ @java.lang.Override
+ public mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshotOrBuilder getActiveAlarmOrBuilder() {
+ if (payloadCase_ == 1) {
+ return (mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot) payload_;
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.getDefaultInstance();
+ }
+
+ public static final int SNAPSHOT_COMPLETE_FIELD_NUMBER = 2;
+ /**
+ *
+ * Sentinel: the initial snapshot is fully delivered and `transition`
+ * messages follow. Always true when present.
+ *
+ *
+ * bool snapshot_complete = 2;
+ * @return Whether the snapshotComplete field is set.
+ */
+ @java.lang.Override
+ public boolean hasSnapshotComplete() {
+ return payloadCase_ == 2;
+ }
+ /**
+ *
+ * Sentinel: the initial snapshot is fully delivered and `transition`
+ * messages follow. Always true when present.
+ *
+ *
+ * bool snapshot_complete = 2;
+ * @return The snapshotComplete.
+ */
+ @java.lang.Override
+ public boolean getSnapshotComplete() {
+ if (payloadCase_ == 2) {
+ return (java.lang.Boolean) payload_;
+ }
+ return false;
+ }
+
+ public static final int TRANSITION_FIELD_NUMBER = 3;
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ * @return Whether the transition field is set.
+ */
+ @java.lang.Override
+ public boolean hasTransition() {
+ return payloadCase_ == 3;
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ * @return The transition.
+ */
+ @java.lang.Override
+ public mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent getTransition() {
+ if (payloadCase_ == 3) {
+ return (mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent) payload_;
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.getDefaultInstance();
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ @java.lang.Override
+ public mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEventOrBuilder getTransitionOrBuilder() {
+ if (payloadCase_ == 3) {
+ return (mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent) payload_;
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.getDefaultInstance();
+ }
+
+ 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 (payloadCase_ == 1) {
+ output.writeMessage(1, (mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot) payload_);
+ }
+ if (payloadCase_ == 2) {
+ output.writeBool(
+ 2, (boolean)((java.lang.Boolean) payload_));
+ }
+ if (payloadCase_ == 3) {
+ output.writeMessage(3, (mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent) payload_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (payloadCase_ == 1) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, (mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot) payload_);
+ }
+ if (payloadCase_ == 2) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(
+ 2, (boolean)((java.lang.Boolean) payload_));
+ }
+ if (payloadCase_ == 3) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, (mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent) payload_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage)) {
+ return super.equals(obj);
+ }
+ mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage other = (mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage) obj;
+
+ if (!getPayloadCase().equals(other.getPayloadCase())) return false;
+ switch (payloadCase_) {
+ case 1:
+ if (!getActiveAlarm()
+ .equals(other.getActiveAlarm())) return false;
+ break;
+ case 2:
+ if (getSnapshotComplete()
+ != other.getSnapshotComplete()) return false;
+ break;
+ case 3:
+ if (!getTransition()
+ .equals(other.getTransition())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ switch (payloadCase_) {
+ case 1:
+ hash = (37 * hash) + ACTIVE_ALARM_FIELD_NUMBER;
+ hash = (53 * hash) + getActiveAlarm().hashCode();
+ break;
+ case 2:
+ hash = (37 * hash) + SNAPSHOT_COMPLETE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getSnapshotComplete());
+ break;
+ case 3:
+ hash = (37 * hash) + TRANSITION_FIELD_NUMBER;
+ hash = (53 * hash) + getTransition().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input);
+ }
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessage
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage 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.GeneratedMessage.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * One message on the StreamAlarms feed. The stream opens with one
+ * `active_alarm` per currently-active alarm, then a single
+ * `snapshot_complete`, then a `transition` for every subsequent change.
+ *
+ *
+ * Protobuf type {@code mxaccess_gateway.v1.AlarmFeedMessage}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ * @return Whether the activeAlarm field is set.
+ */
+ @java.lang.Override
+ public boolean hasActiveAlarm() {
+ return payloadCase_ == 1;
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ * @return The activeAlarm.
+ */
+ @java.lang.Override
+ public mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot getActiveAlarm() {
+ if (activeAlarmBuilder_ == null) {
+ if (payloadCase_ == 1) {
+ return (mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot) payload_;
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.getDefaultInstance();
+ } else {
+ if (payloadCase_ == 1) {
+ return activeAlarmBuilder_.getMessage();
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ public Builder setActiveAlarm(mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot value) {
+ if (activeAlarmBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ payload_ = value;
+ onChanged();
+ } else {
+ activeAlarmBuilder_.setMessage(value);
+ }
+ payloadCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ public Builder setActiveAlarm(
+ mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.Builder builderForValue) {
+ if (activeAlarmBuilder_ == null) {
+ payload_ = builderForValue.build();
+ onChanged();
+ } else {
+ activeAlarmBuilder_.setMessage(builderForValue.build());
+ }
+ payloadCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ public Builder mergeActiveAlarm(mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot value) {
+ if (activeAlarmBuilder_ == null) {
+ if (payloadCase_ == 1 &&
+ payload_ != mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.getDefaultInstance()) {
+ payload_ = mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.newBuilder((mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot) payload_)
+ .mergeFrom(value).buildPartial();
+ } else {
+ payload_ = value;
+ }
+ onChanged();
+ } else {
+ if (payloadCase_ == 1) {
+ activeAlarmBuilder_.mergeFrom(value);
+ } else {
+ activeAlarmBuilder_.setMessage(value);
+ }
+ }
+ payloadCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ public Builder clearActiveAlarm() {
+ if (activeAlarmBuilder_ == null) {
+ if (payloadCase_ == 1) {
+ payloadCase_ = 0;
+ payload_ = null;
+ onChanged();
+ }
+ } else {
+ if (payloadCase_ == 1) {
+ payloadCase_ = 0;
+ payload_ = null;
+ }
+ activeAlarmBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ public mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.Builder getActiveAlarmBuilder() {
+ return internalGetActiveAlarmFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ @java.lang.Override
+ public mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshotOrBuilder getActiveAlarmOrBuilder() {
+ if ((payloadCase_ == 1) && (activeAlarmBuilder_ != null)) {
+ return activeAlarmBuilder_.getMessageOrBuilder();
+ } else {
+ if (payloadCase_ == 1) {
+ return (mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot) payload_;
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ * Part of the initial active-alarm snapshot (ConditionRefresh).
+ *
+ *
+ * .mxaccess_gateway.v1.ActiveAlarmSnapshot active_alarm = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot, mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.Builder, mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshotOrBuilder>
+ internalGetActiveAlarmFieldBuilder() {
+ if (activeAlarmBuilder_ == null) {
+ if (!(payloadCase_ == 1)) {
+ payload_ = mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.getDefaultInstance();
+ }
+ activeAlarmBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot, mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot.Builder, mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshotOrBuilder>(
+ (mxaccess_gateway.v1.MxaccessGateway.ActiveAlarmSnapshot) payload_,
+ getParentForChildren(),
+ isClean());
+ payload_ = null;
+ }
+ payloadCase_ = 1;
+ onChanged();
+ return activeAlarmBuilder_;
+ }
+
+ /**
+ *
+ * Sentinel: the initial snapshot is fully delivered and `transition`
+ * messages follow. Always true when present.
+ *
+ *
+ * bool snapshot_complete = 2;
+ * @return Whether the snapshotComplete field is set.
+ */
+ public boolean hasSnapshotComplete() {
+ return payloadCase_ == 2;
+ }
+ /**
+ *
+ * Sentinel: the initial snapshot is fully delivered and `transition`
+ * messages follow. Always true when present.
+ *
+ *
+ * bool snapshot_complete = 2;
+ * @return The snapshotComplete.
+ */
+ public boolean getSnapshotComplete() {
+ if (payloadCase_ == 2) {
+ return (java.lang.Boolean) payload_;
+ }
+ return false;
+ }
+ /**
+ *
+ * Sentinel: the initial snapshot is fully delivered and `transition`
+ * messages follow. Always true when present.
+ *
+ *
+ * bool snapshot_complete = 2;
+ * @param value The snapshotComplete to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSnapshotComplete(boolean value) {
+
+ payloadCase_ = 2;
+ payload_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sentinel: the initial snapshot is fully delivered and `transition`
+ * messages follow. Always true when present.
+ *
+ *
+ * bool snapshot_complete = 2;
+ * @return This builder for chaining.
+ */
+ public Builder clearSnapshotComplete() {
+ if (payloadCase_ == 2) {
+ payloadCase_ = 0;
+ payload_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ private com.google.protobuf.SingleFieldBuilder<
+ mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent, mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.Builder, mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEventOrBuilder> transitionBuilder_;
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ * @return Whether the transition field is set.
+ */
+ @java.lang.Override
+ public boolean hasTransition() {
+ return payloadCase_ == 3;
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ * @return The transition.
+ */
+ @java.lang.Override
+ public mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent getTransition() {
+ if (transitionBuilder_ == null) {
+ if (payloadCase_ == 3) {
+ return (mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent) payload_;
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.getDefaultInstance();
+ } else {
+ if (payloadCase_ == 3) {
+ return transitionBuilder_.getMessage();
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ public Builder setTransition(mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent value) {
+ if (transitionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ payload_ = value;
+ onChanged();
+ } else {
+ transitionBuilder_.setMessage(value);
+ }
+ payloadCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ public Builder setTransition(
+ mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.Builder builderForValue) {
+ if (transitionBuilder_ == null) {
+ payload_ = builderForValue.build();
+ onChanged();
+ } else {
+ transitionBuilder_.setMessage(builderForValue.build());
+ }
+ payloadCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ public Builder mergeTransition(mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent value) {
+ if (transitionBuilder_ == null) {
+ if (payloadCase_ == 3 &&
+ payload_ != mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.getDefaultInstance()) {
+ payload_ = mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.newBuilder((mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent) payload_)
+ .mergeFrom(value).buildPartial();
+ } else {
+ payload_ = value;
+ }
+ onChanged();
+ } else {
+ if (payloadCase_ == 3) {
+ transitionBuilder_.mergeFrom(value);
+ } else {
+ transitionBuilder_.setMessage(value);
+ }
+ }
+ payloadCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ public Builder clearTransition() {
+ if (transitionBuilder_ == null) {
+ if (payloadCase_ == 3) {
+ payloadCase_ = 0;
+ payload_ = null;
+ onChanged();
+ }
+ } else {
+ if (payloadCase_ == 3) {
+ payloadCase_ = 0;
+ payload_ = null;
+ }
+ transitionBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ public mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.Builder getTransitionBuilder() {
+ return internalGetTransitionFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ @java.lang.Override
+ public mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEventOrBuilder getTransitionOrBuilder() {
+ if ((payloadCase_ == 3) && (transitionBuilder_ != null)) {
+ return transitionBuilder_.getMessageOrBuilder();
+ } else {
+ if (payloadCase_ == 3) {
+ return (mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent) payload_;
+ }
+ return mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ * A live alarm state change (raise / acknowledge / clear).
+ *
+ *
+ * .mxaccess_gateway.v1.OnAlarmTransitionEvent transition = 3;
+ */
+ private com.google.protobuf.SingleFieldBuilder<
+ mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent, mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.Builder, mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEventOrBuilder>
+ internalGetTransitionFieldBuilder() {
+ if (transitionBuilder_ == null) {
+ if (!(payloadCase_ == 3)) {
+ payload_ = mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.getDefaultInstance();
+ }
+ transitionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+ mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent, mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent.Builder, mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEventOrBuilder>(
+ (mxaccess_gateway.v1.MxaccessGateway.OnAlarmTransitionEvent) payload_,
+ getParentForChildren(),
+ isClean());
+ payload_ = null;
+ }
+ payloadCase_ = 3;
+ onChanged();
+ return transitionBuilder_;
+ }
+
+ // @@protoc_insertion_point(builder_scope:mxaccess_gateway.v1.AlarmFeedMessage)
+ }
+
+ // @@protoc_insertion_point(class_scope:mxaccess_gateway.v1.AlarmFeedMessage)
+ private static final mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage();
+ }
+
+ public static mxaccess_gateway.v1.MxaccessGateway.AlarmFeedMessage getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser