com.webull.openapi.trade.events.internal.proto.Events Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: events.proto
package com.webull.openapi.trade.events.internal.proto;
public final class Events {
private Events() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code grpc.trade.event.EventType}
*/
public enum EventType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Subscription succeeded
*
*
* SubscribeSuccess = 0;
*/
SubscribeSuccess(0),
/**
*
* Heartbeat information
*
*
* Ping = 1;
*/
Ping(1),
/**
*
* Authentication error
*
*
* AuthError = 2;
*/
AuthError(2),
/**
*
* Connection limit exceeded
*
*
* NumOfConnExceed = 3;
*/
NumOfConnExceed(3),
/**
*
* Subscription expired
*
*
* SubscribeExpired = 4;
*/
SubscribeExpired(4),
UNRECOGNIZED(-1),
;
/**
*
* Subscription succeeded
*
*
* SubscribeSuccess = 0;
*/
public static final int SubscribeSuccess_VALUE = 0;
/**
*
* Heartbeat information
*
*
* Ping = 1;
*/
public static final int Ping_VALUE = 1;
/**
*
* Authentication error
*
*
* AuthError = 2;
*/
public static final int AuthError_VALUE = 2;
/**
*
* Connection limit exceeded
*
*
* NumOfConnExceed = 3;
*/
public static final int NumOfConnExceed_VALUE = 3;
/**
*
* Subscription expired
*
*
* SubscribeExpired = 4;
*/
public static final int SubscribeExpired_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EventType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static EventType forNumber(int value) {
switch (value) {
case 0: return SubscribeSuccess;
case 1: return Ping;
case 2: return AuthError;
case 3: return NumOfConnExceed;
case 4: return SubscribeExpired;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
EventType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public EventType findValueByNumber(int number) {
return EventType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.webull.openapi.trade.events.internal.proto.Events.getDescriptor().getEnumTypes().get(0);
}
private static final EventType[] VALUES = values();
public static EventType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private EventType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.trade.event.EventType)
}
public interface SubscribeRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.trade.event.SubscribeRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* Subscription type
*
*
* uint32 subscribeType = 1;
* @return The subscribeType.
*/
int getSubscribeType();
/**
*
* Timestamp
*
*
* int64 timestamp = 2;
* @return The timestamp.
*/
long getTimestamp();
/**
*
* Content type
*
*
* string contentType = 3;
* @return The contentType.
*/
java.lang.String getContentType();
/**
*
* Content type
*
*
* string contentType = 3;
* @return The bytes for contentType.
*/
com.google.protobuf.ByteString
getContentTypeBytes();
/**
*
* Content
*
*
* string payload = 4;
* @return The payload.
*/
java.lang.String getPayload();
/**
*
* Content
*
*
* string payload = 4;
* @return The bytes for payload.
*/
com.google.protobuf.ByteString
getPayloadBytes();
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @return A list containing the accounts.
*/
java.util.List
getAccountsList();
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @return The count of accounts.
*/
int getAccountsCount();
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param index The index of the element to return.
* @return The accounts at the given index.
*/
java.lang.String getAccounts(int index);
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param index The index of the value to return.
* @return The bytes of the accounts at the given index.
*/
com.google.protobuf.ByteString
getAccountsBytes(int index);
}
/**
* Protobuf type {@code grpc.trade.event.SubscribeRequest}
*/
public static final class SubscribeRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.trade.event.SubscribeRequest)
SubscribeRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use SubscribeRequest.newBuilder() to construct.
private SubscribeRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SubscribeRequest() {
contentType_ = "";
payload_ = "";
accounts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SubscribeRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest.class, com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest.Builder.class);
}
public static final int SUBSCRIBETYPE_FIELD_NUMBER = 1;
private int subscribeType_;
/**
*
* Subscription type
*
*
* uint32 subscribeType = 1;
* @return The subscribeType.
*/
@java.lang.Override
public int getSubscribeType() {
return subscribeType_;
}
public static final int TIMESTAMP_FIELD_NUMBER = 2;
private long timestamp_;
/**
*
* Timestamp
*
*
* int64 timestamp = 2;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
public static final int CONTENTTYPE_FIELD_NUMBER = 3;
private volatile java.lang.Object contentType_;
/**
*
* Content type
*
*
* string contentType = 3;
* @return The contentType.
*/
@java.lang.Override
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
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();
contentType_ = s;
return s;
}
}
/**
*
* Content type
*
*
* string contentType = 3;
* @return The bytes for contentType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PAYLOAD_FIELD_NUMBER = 4;
private volatile java.lang.Object payload_;
/**
*
* Content
*
*
* string payload = 4;
* @return The payload.
*/
@java.lang.Override
public java.lang.String getPayload() {
java.lang.Object ref = payload_;
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();
payload_ = s;
return s;
}
}
/**
*
* Content
*
*
* string payload = 4;
* @return The bytes for payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPayloadBytes() {
java.lang.Object ref = payload_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
payload_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ACCOUNTS_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList accounts_;
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @return A list containing the accounts.
*/
public com.google.protobuf.ProtocolStringList
getAccountsList() {
return accounts_;
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @return The count of accounts.
*/
public int getAccountsCount() {
return accounts_.size();
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param index The index of the element to return.
* @return The accounts at the given index.
*/
public java.lang.String getAccounts(int index) {
return accounts_.get(index);
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param index The index of the value to return.
* @return The bytes of the accounts at the given index.
*/
public com.google.protobuf.ByteString
getAccountsBytes(int index) {
return accounts_.getByteString(index);
}
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 (subscribeType_ != 0) {
output.writeUInt32(1, subscribeType_);
}
if (timestamp_ != 0L) {
output.writeInt64(2, timestamp_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, contentType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payload_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, payload_);
}
for (int i = 0; i < accounts_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, accounts_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (subscribeType_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(1, subscribeType_);
}
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, timestamp_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, contentType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payload_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, payload_);
}
{
int dataSize = 0;
for (int i = 0; i < accounts_.size(); i++) {
dataSize += computeStringSizeNoTag(accounts_.getRaw(i));
}
size += dataSize;
size += 1 * getAccountsList().size();
}
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 com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest)) {
return super.equals(obj);
}
com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest other = (com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest) obj;
if (getSubscribeType()
!= other.getSubscribeType()) return false;
if (getTimestamp()
!= other.getTimestamp()) return false;
if (!getContentType()
.equals(other.getContentType())) return false;
if (!getPayload()
.equals(other.getPayload())) return false;
if (!getAccountsList()
.equals(other.getAccountsList())) return false;
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();
hash = (37 * hash) + SUBSCRIBETYPE_FIELD_NUMBER;
hash = (53 * hash) + getSubscribeType();
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
hash = (37 * hash) + CONTENTTYPE_FIELD_NUMBER;
hash = (53 * hash) + getContentType().hashCode();
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
if (getAccountsCount() > 0) {
hash = (37 * hash) + ACCOUNTS_FIELD_NUMBER;
hash = (53 * hash) + getAccountsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest 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 com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest 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 com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest 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(com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest 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 grpc.trade.event.SubscribeRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.trade.event.SubscribeRequest)
com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest.class, com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest.Builder.class);
}
// Construct using com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
subscribeType_ = 0;
timestamp_ = 0L;
contentType_ = "";
payload_ = "";
accounts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeRequest_descriptor;
}
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest getDefaultInstanceForType() {
return com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest.getDefaultInstance();
}
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest build() {
com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest buildPartial() {
com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest result = new com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest(this);
int from_bitField0_ = bitField0_;
result.subscribeType_ = subscribeType_;
result.timestamp_ = timestamp_;
result.contentType_ = contentType_;
result.payload_ = payload_;
if (((bitField0_ & 0x00000001) != 0)) {
accounts_ = accounts_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.accounts_ = accounts_;
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 com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest) {
return mergeFrom((com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest other) {
if (other == com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest.getDefaultInstance()) return this;
if (other.getSubscribeType() != 0) {
setSubscribeType(other.getSubscribeType());
}
if (other.getTimestamp() != 0L) {
setTimestamp(other.getTimestamp());
}
if (!other.getContentType().isEmpty()) {
contentType_ = other.contentType_;
onChanged();
}
if (!other.getPayload().isEmpty()) {
payload_ = other.payload_;
onChanged();
}
if (!other.accounts_.isEmpty()) {
if (accounts_.isEmpty()) {
accounts_ = other.accounts_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAccountsIsMutable();
accounts_.addAll(other.accounts_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
subscribeType_ = input.readUInt32();
break;
} // case 8
case 16: {
timestamp_ = input.readInt64();
break;
} // case 16
case 26: {
contentType_ = input.readStringRequireUtf8();
break;
} // case 26
case 34: {
payload_ = input.readStringRequireUtf8();
break;
} // case 34
case 42: {
java.lang.String s = input.readStringRequireUtf8();
ensureAccountsIsMutable();
accounts_.add(s);
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int subscribeType_ ;
/**
*
* Subscription type
*
*
* uint32 subscribeType = 1;
* @return The subscribeType.
*/
@java.lang.Override
public int getSubscribeType() {
return subscribeType_;
}
/**
*
* Subscription type
*
*
* uint32 subscribeType = 1;
* @param value The subscribeType to set.
* @return This builder for chaining.
*/
public Builder setSubscribeType(int value) {
subscribeType_ = value;
onChanged();
return this;
}
/**
*
* Subscription type
*
*
* uint32 subscribeType = 1;
* @return This builder for chaining.
*/
public Builder clearSubscribeType() {
subscribeType_ = 0;
onChanged();
return this;
}
private long timestamp_ ;
/**
*
* Timestamp
*
*
* int64 timestamp = 2;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
/**
*
* Timestamp
*
*
* int64 timestamp = 2;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
onChanged();
return this;
}
/**
*
* Timestamp
*
*
* int64 timestamp = 2;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
timestamp_ = 0L;
onChanged();
return this;
}
private java.lang.Object contentType_ = "";
/**
*
* Content type
*
*
* string contentType = 3;
* @return The contentType.
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contentType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Content type
*
*
* string contentType = 3;
* @return The bytes for contentType.
*/
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Content type
*
*
* string contentType = 3;
* @param value The contentType to set.
* @return This builder for chaining.
*/
public Builder setContentType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentType_ = value;
onChanged();
return this;
}
/**
*
* Content type
*
*
* string contentType = 3;
* @return This builder for chaining.
*/
public Builder clearContentType() {
contentType_ = getDefaultInstance().getContentType();
onChanged();
return this;
}
/**
*
* Content type
*
*
* string contentType = 3;
* @param value The bytes for contentType to set.
* @return This builder for chaining.
*/
public Builder setContentTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentType_ = value;
onChanged();
return this;
}
private java.lang.Object payload_ = "";
/**
*
* Content
*
*
* string payload = 4;
* @return The payload.
*/
public java.lang.String getPayload() {
java.lang.Object ref = payload_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
payload_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Content
*
*
* string payload = 4;
* @return The bytes for payload.
*/
public com.google.protobuf.ByteString
getPayloadBytes() {
java.lang.Object ref = payload_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
payload_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Content
*
*
* string payload = 4;
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
*
* Content
*
*
* string payload = 4;
* @return This builder for chaining.
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
/**
*
* Content
*
*
* string payload = 4;
* @param value The bytes for payload to set.
* @return This builder for chaining.
*/
public Builder setPayloadBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
payload_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList accounts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureAccountsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
accounts_ = new com.google.protobuf.LazyStringArrayList(accounts_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @return A list containing the accounts.
*/
public com.google.protobuf.ProtocolStringList
getAccountsList() {
return accounts_.getUnmodifiableView();
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @return The count of accounts.
*/
public int getAccountsCount() {
return accounts_.size();
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param index The index of the element to return.
* @return The accounts at the given index.
*/
public java.lang.String getAccounts(int index) {
return accounts_.get(index);
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param index The index of the value to return.
* @return The bytes of the accounts at the given index.
*/
public com.google.protobuf.ByteString
getAccountsBytes(int index) {
return accounts_.getByteString(index);
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param index The index to set the value at.
* @param value The accounts to set.
* @return This builder for chaining.
*/
public Builder setAccounts(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAccountsIsMutable();
accounts_.set(index, value);
onChanged();
return this;
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param value The accounts to add.
* @return This builder for chaining.
*/
public Builder addAccounts(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAccountsIsMutable();
accounts_.add(value);
onChanged();
return this;
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param values The accounts to add.
* @return This builder for chaining.
*/
public Builder addAllAccounts(
java.lang.Iterable values) {
ensureAccountsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, accounts_);
onChanged();
return this;
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @return This builder for chaining.
*/
public Builder clearAccounts() {
accounts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Account ID
*
*
* repeated string accounts = 5;
* @param value The bytes of the accounts to add.
* @return This builder for chaining.
*/
public Builder addAccountsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureAccountsIsMutable();
accounts_.add(value);
onChanged();
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:grpc.trade.event.SubscribeRequest)
}
// @@protoc_insertion_point(class_scope:grpc.trade.event.SubscribeRequest)
private static final com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest();
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SubscribeRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.SubscribeRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SubscribeResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.trade.event.SubscribeResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @return The enum numeric value on the wire for eventType.
*/
int getEventTypeValue();
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @return The eventType.
*/
com.webull.openapi.trade.events.internal.proto.Events.EventType getEventType();
/**
*
* Subscription type
*
*
* uint32 subscribeType = 2;
* @return The subscribeType.
*/
int getSubscribeType();
/**
*
* Subscription type
*
*
* string contentType = 3;
* @return The contentType.
*/
java.lang.String getContentType();
/**
*
* Subscription type
*
*
* string contentType = 3;
* @return The bytes for contentType.
*/
com.google.protobuf.ByteString
getContentTypeBytes();
/**
*
* Content
*
*
* string payload = 4;
* @return The payload.
*/
java.lang.String getPayload();
/**
*
* Content
*
*
* string payload = 4;
* @return The bytes for payload.
*/
com.google.protobuf.ByteString
getPayloadBytes();
/**
*
* Request id
*
*
* string requestId = 5;
* @return The requestId.
*/
java.lang.String getRequestId();
/**
*
* Request id
*
*
* string requestId = 5;
* @return The bytes for requestId.
*/
com.google.protobuf.ByteString
getRequestIdBytes();
/**
*
* Timestamp
*
*
* int64 timestamp = 6;
* @return The timestamp.
*/
long getTimestamp();
}
/**
* Protobuf type {@code grpc.trade.event.SubscribeResponse}
*/
public static final class SubscribeResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.trade.event.SubscribeResponse)
SubscribeResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use SubscribeResponse.newBuilder() to construct.
private SubscribeResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SubscribeResponse() {
eventType_ = 0;
contentType_ = "";
payload_ = "";
requestId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SubscribeResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse.class, com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse.Builder.class);
}
public static final int EVENTTYPE_FIELD_NUMBER = 1;
private int eventType_;
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @return The enum numeric value on the wire for eventType.
*/
@java.lang.Override public int getEventTypeValue() {
return eventType_;
}
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @return The eventType.
*/
@java.lang.Override public com.webull.openapi.trade.events.internal.proto.Events.EventType getEventType() {
@SuppressWarnings("deprecation")
com.webull.openapi.trade.events.internal.proto.Events.EventType result = com.webull.openapi.trade.events.internal.proto.Events.EventType.valueOf(eventType_);
return result == null ? com.webull.openapi.trade.events.internal.proto.Events.EventType.UNRECOGNIZED : result;
}
public static final int SUBSCRIBETYPE_FIELD_NUMBER = 2;
private int subscribeType_;
/**
*
* Subscription type
*
*
* uint32 subscribeType = 2;
* @return The subscribeType.
*/
@java.lang.Override
public int getSubscribeType() {
return subscribeType_;
}
public static final int CONTENTTYPE_FIELD_NUMBER = 3;
private volatile java.lang.Object contentType_;
/**
*
* Subscription type
*
*
* string contentType = 3;
* @return The contentType.
*/
@java.lang.Override
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
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();
contentType_ = s;
return s;
}
}
/**
*
* Subscription type
*
*
* string contentType = 3;
* @return The bytes for contentType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PAYLOAD_FIELD_NUMBER = 4;
private volatile java.lang.Object payload_;
/**
*
* Content
*
*
* string payload = 4;
* @return The payload.
*/
@java.lang.Override
public java.lang.String getPayload() {
java.lang.Object ref = payload_;
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();
payload_ = s;
return s;
}
}
/**
*
* Content
*
*
* string payload = 4;
* @return The bytes for payload.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPayloadBytes() {
java.lang.Object ref = payload_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
payload_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REQUESTID_FIELD_NUMBER = 5;
private volatile java.lang.Object requestId_;
/**
*
* Request id
*
*
* string requestId = 5;
* @return The requestId.
*/
@java.lang.Override
public java.lang.String getRequestId() {
java.lang.Object ref = requestId_;
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();
requestId_ = s;
return s;
}
}
/**
*
* Request id
*
*
* string requestId = 5;
* @return The bytes for requestId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRequestIdBytes() {
java.lang.Object ref = requestId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
requestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TIMESTAMP_FIELD_NUMBER = 6;
private long timestamp_;
/**
*
* Timestamp
*
*
* int64 timestamp = 6;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
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 (eventType_ != com.webull.openapi.trade.events.internal.proto.Events.EventType.SubscribeSuccess.getNumber()) {
output.writeEnum(1, eventType_);
}
if (subscribeType_ != 0) {
output.writeUInt32(2, subscribeType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, contentType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payload_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, payload_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, requestId_);
}
if (timestamp_ != 0L) {
output.writeInt64(6, timestamp_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (eventType_ != com.webull.openapi.trade.events.internal.proto.Events.EventType.SubscribeSuccess.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, eventType_);
}
if (subscribeType_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, subscribeType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, contentType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(payload_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, payload_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, requestId_);
}
if (timestamp_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, timestamp_);
}
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 com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse)) {
return super.equals(obj);
}
com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse other = (com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse) obj;
if (eventType_ != other.eventType_) return false;
if (getSubscribeType()
!= other.getSubscribeType()) return false;
if (!getContentType()
.equals(other.getContentType())) return false;
if (!getPayload()
.equals(other.getPayload())) return false;
if (!getRequestId()
.equals(other.getRequestId())) return false;
if (getTimestamp()
!= other.getTimestamp()) return false;
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();
hash = (37 * hash) + EVENTTYPE_FIELD_NUMBER;
hash = (53 * hash) + eventType_;
hash = (37 * hash) + SUBSCRIBETYPE_FIELD_NUMBER;
hash = (53 * hash) + getSubscribeType();
hash = (37 * hash) + CONTENTTYPE_FIELD_NUMBER;
hash = (53 * hash) + getContentType().hashCode();
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
hash = (37 * hash) + REQUESTID_FIELD_NUMBER;
hash = (53 * hash) + getRequestId().hashCode();
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestamp());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse 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 com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse 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 com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse 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(com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse 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 grpc.trade.event.SubscribeResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.trade.event.SubscribeResponse)
com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse.class, com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse.Builder.class);
}
// Construct using com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
eventType_ = 0;
subscribeType_ = 0;
contentType_ = "";
payload_ = "";
requestId_ = "";
timestamp_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.webull.openapi.trade.events.internal.proto.Events.internal_static_grpc_trade_event_SubscribeResponse_descriptor;
}
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse getDefaultInstanceForType() {
return com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse.getDefaultInstance();
}
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse build() {
com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse buildPartial() {
com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse result = new com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse(this);
result.eventType_ = eventType_;
result.subscribeType_ = subscribeType_;
result.contentType_ = contentType_;
result.payload_ = payload_;
result.requestId_ = requestId_;
result.timestamp_ = timestamp_;
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 com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse) {
return mergeFrom((com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse other) {
if (other == com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse.getDefaultInstance()) return this;
if (other.eventType_ != 0) {
setEventTypeValue(other.getEventTypeValue());
}
if (other.getSubscribeType() != 0) {
setSubscribeType(other.getSubscribeType());
}
if (!other.getContentType().isEmpty()) {
contentType_ = other.contentType_;
onChanged();
}
if (!other.getPayload().isEmpty()) {
payload_ = other.payload_;
onChanged();
}
if (!other.getRequestId().isEmpty()) {
requestId_ = other.requestId_;
onChanged();
}
if (other.getTimestamp() != 0L) {
setTimestamp(other.getTimestamp());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
eventType_ = input.readEnum();
break;
} // case 8
case 16: {
subscribeType_ = input.readUInt32();
break;
} // case 16
case 26: {
contentType_ = input.readStringRequireUtf8();
break;
} // case 26
case 34: {
payload_ = input.readStringRequireUtf8();
break;
} // case 34
case 42: {
requestId_ = input.readStringRequireUtf8();
break;
} // case 42
case 48: {
timestamp_ = input.readInt64();
break;
} // case 48
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int eventType_ = 0;
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @return The enum numeric value on the wire for eventType.
*/
@java.lang.Override public int getEventTypeValue() {
return eventType_;
}
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @param value The enum numeric value on the wire for eventType to set.
* @return This builder for chaining.
*/
public Builder setEventTypeValue(int value) {
eventType_ = value;
onChanged();
return this;
}
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @return The eventType.
*/
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.EventType getEventType() {
@SuppressWarnings("deprecation")
com.webull.openapi.trade.events.internal.proto.Events.EventType result = com.webull.openapi.trade.events.internal.proto.Events.EventType.valueOf(eventType_);
return result == null ? com.webull.openapi.trade.events.internal.proto.Events.EventType.UNRECOGNIZED : result;
}
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @param value The eventType to set.
* @return This builder for chaining.
*/
public Builder setEventType(com.webull.openapi.trade.events.internal.proto.Events.EventType value) {
if (value == null) {
throw new NullPointerException();
}
eventType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Event type
*
*
* .grpc.trade.event.EventType eventType = 1;
* @return This builder for chaining.
*/
public Builder clearEventType() {
eventType_ = 0;
onChanged();
return this;
}
private int subscribeType_ ;
/**
*
* Subscription type
*
*
* uint32 subscribeType = 2;
* @return The subscribeType.
*/
@java.lang.Override
public int getSubscribeType() {
return subscribeType_;
}
/**
*
* Subscription type
*
*
* uint32 subscribeType = 2;
* @param value The subscribeType to set.
* @return This builder for chaining.
*/
public Builder setSubscribeType(int value) {
subscribeType_ = value;
onChanged();
return this;
}
/**
*
* Subscription type
*
*
* uint32 subscribeType = 2;
* @return This builder for chaining.
*/
public Builder clearSubscribeType() {
subscribeType_ = 0;
onChanged();
return this;
}
private java.lang.Object contentType_ = "";
/**
*
* Subscription type
*
*
* string contentType = 3;
* @return The contentType.
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contentType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Subscription type
*
*
* string contentType = 3;
* @return The bytes for contentType.
*/
public com.google.protobuf.ByteString
getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Subscription type
*
*
* string contentType = 3;
* @param value The contentType to set.
* @return This builder for chaining.
*/
public Builder setContentType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentType_ = value;
onChanged();
return this;
}
/**
*
* Subscription type
*
*
* string contentType = 3;
* @return This builder for chaining.
*/
public Builder clearContentType() {
contentType_ = getDefaultInstance().getContentType();
onChanged();
return this;
}
/**
*
* Subscription type
*
*
* string contentType = 3;
* @param value The bytes for contentType to set.
* @return This builder for chaining.
*/
public Builder setContentTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentType_ = value;
onChanged();
return this;
}
private java.lang.Object payload_ = "";
/**
*
* Content
*
*
* string payload = 4;
* @return The payload.
*/
public java.lang.String getPayload() {
java.lang.Object ref = payload_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
payload_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Content
*
*
* string payload = 4;
* @return The bytes for payload.
*/
public com.google.protobuf.ByteString
getPayloadBytes() {
java.lang.Object ref = payload_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
payload_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Content
*
*
* string payload = 4;
* @param value The payload to set.
* @return This builder for chaining.
*/
public Builder setPayload(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
payload_ = value;
onChanged();
return this;
}
/**
*
* Content
*
*
* string payload = 4;
* @return This builder for chaining.
*/
public Builder clearPayload() {
payload_ = getDefaultInstance().getPayload();
onChanged();
return this;
}
/**
*
* Content
*
*
* string payload = 4;
* @param value The bytes for payload to set.
* @return This builder for chaining.
*/
public Builder setPayloadBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
payload_ = value;
onChanged();
return this;
}
private java.lang.Object requestId_ = "";
/**
*
* Request id
*
*
* string requestId = 5;
* @return The requestId.
*/
public java.lang.String getRequestId() {
java.lang.Object ref = requestId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
requestId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Request id
*
*
* string requestId = 5;
* @return The bytes for requestId.
*/
public com.google.protobuf.ByteString
getRequestIdBytes() {
java.lang.Object ref = requestId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
requestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Request id
*
*
* string requestId = 5;
* @param value The requestId to set.
* @return This builder for chaining.
*/
public Builder setRequestId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
requestId_ = value;
onChanged();
return this;
}
/**
*
* Request id
*
*
* string requestId = 5;
* @return This builder for chaining.
*/
public Builder clearRequestId() {
requestId_ = getDefaultInstance().getRequestId();
onChanged();
return this;
}
/**
*
* Request id
*
*
* string requestId = 5;
* @param value The bytes for requestId to set.
* @return This builder for chaining.
*/
public Builder setRequestIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
requestId_ = value;
onChanged();
return this;
}
private long timestamp_ ;
/**
*
* Timestamp
*
*
* int64 timestamp = 6;
* @return The timestamp.
*/
@java.lang.Override
public long getTimestamp() {
return timestamp_;
}
/**
*
* Timestamp
*
*
* int64 timestamp = 6;
* @param value The timestamp to set.
* @return This builder for chaining.
*/
public Builder setTimestamp(long value) {
timestamp_ = value;
onChanged();
return this;
}
/**
*
* Timestamp
*
*
* int64 timestamp = 6;
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
timestamp_ = 0L;
onChanged();
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:grpc.trade.event.SubscribeResponse)
}
// @@protoc_insertion_point(class_scope:grpc.trade.event.SubscribeResponse)
private static final com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse();
}
public static com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SubscribeResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.webull.openapi.trade.events.internal.proto.Events.SubscribeResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_trade_event_SubscribeRequest_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_trade_event_SubscribeRequest_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_trade_event_SubscribeResponse_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_grpc_trade_event_SubscribeResponse_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\014events.proto\022\020grpc.trade.event\"t\n\020Subs" +
"cribeRequest\022\025\n\rsubscribeType\030\001 \001(\r\022\021\n\tt" +
"imestamp\030\002 \001(\003\022\023\n\013contentType\030\003 \001(\t\022\017\n\007p" +
"ayload\030\004 \001(\t\022\020\n\010accounts\030\005 \003(\t\"\246\001\n\021Subsc" +
"ribeResponse\022.\n\teventType\030\001 \001(\0162\033.grpc.t" +
"rade.event.EventType\022\025\n\rsubscribeType\030\002 " +
"\001(\r\022\023\n\013contentType\030\003 \001(\t\022\017\n\007payload\030\004 \001(" +
"\t\022\021\n\trequestId\030\005 \001(\t\022\021\n\ttimestamp\030\006 \001(\003*" +
"e\n\tEventType\022\024\n\020SubscribeSuccess\020\000\022\010\n\004Pi" +
"ng\020\001\022\r\n\tAuthError\020\002\022\023\n\017NumOfConnExceed\020\003" +
"\022\024\n\020SubscribeExpired\020\0042h\n\014EventService\022X" +
"\n\tSubscribe\022\".grpc.trade.event.Subscribe" +
"Request\032#.grpc.trade.event.SubscribeResp" +
"onse\"\0000\001B0\n.com.webull.openapi.trade.eve" +
"nts.internal.protob\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
});
internal_static_grpc_trade_event_SubscribeRequest_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_grpc_trade_event_SubscribeRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_trade_event_SubscribeRequest_descriptor,
new java.lang.String[] { "SubscribeType", "Timestamp", "ContentType", "Payload", "Accounts", });
internal_static_grpc_trade_event_SubscribeResponse_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_grpc_trade_event_SubscribeResponse_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_grpc_trade_event_SubscribeResponse_descriptor,
new java.lang.String[] { "EventType", "SubscribeType", "ContentType", "Payload", "RequestId", "Timestamp", });
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy