org.openfeed.InstrumentRequest Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: openfeed_api.proto
// Protobuf Java Version: 4.28.3
package org.openfeed;
/**
*
* / Instrument Definition(s), will stream InstrumentDefinition(s)
*
*
* Protobuf type {@code org.openfeed.InstrumentRequest}
*/
public final class InstrumentRequest extends
com.google.protobuf.GeneratedMessage implements
// @@protoc_insertion_point(message_implements:org.openfeed.InstrumentRequest)
InstrumentRequestOrBuilder {
private static final long serialVersionUID = 0L;
static {
com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
/* major= */ 4,
/* minor= */ 28,
/* patch= */ 3,
/* suffix= */ "",
InstrumentRequest.class.getName());
}
// Use InstrumentRequest.newBuilder() to construct.
private InstrumentRequest(com.google.protobuf.GeneratedMessage.Builder> builder) {
super(builder);
}
private InstrumentRequest() {
token_ = "";
instrumentType_ = emptyIntList();
spreadType_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_InstrumentRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_InstrumentRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.openfeed.InstrumentRequest.class, org.openfeed.InstrumentRequest.Builder.class);
}
private int requestCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object request_;
public enum RequestCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SYMBOL(10),
MARKETID(11),
EXCHANGE(12),
CHANNELID(13),
REQUEST_NOT_SET(0);
private final int value;
private RequestCase(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 RequestCase valueOf(int value) {
return forNumber(value);
}
public static RequestCase forNumber(int value) {
switch (value) {
case 10: return SYMBOL;
case 11: return MARKETID;
case 12: return EXCHANGE;
case 13: return CHANNELID;
case 0: return REQUEST_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public RequestCase
getRequestCase() {
return RequestCase.forNumber(
requestCase_);
}
public static final int CORRELATIONID_FIELD_NUMBER = 1;
private long correlationId_ = 0L;
/**
* sint64 correlationId = 1;
* @return The correlationId.
*/
@java.lang.Override
public long getCorrelationId() {
return correlationId_;
}
public static final int TOKEN_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object token_ = "";
/**
* string token = 2;
* @return The token.
*/
@java.lang.Override
public java.lang.String getToken() {
java.lang.Object ref = token_;
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();
token_ = s;
return s;
}
}
/**
* string token = 2;
* @return The bytes for token.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INSTRUMENTTYPE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.IntList instrumentType_;
private static final com.google.protobuf.Internal.IntListAdapter.IntConverter<
org.openfeed.InstrumentDefinition.InstrumentType> instrumentType_converter_ =
new com.google.protobuf.Internal.IntListAdapter.IntConverter<
org.openfeed.InstrumentDefinition.InstrumentType>() {
public org.openfeed.InstrumentDefinition.InstrumentType convert(int from) {
org.openfeed.InstrumentDefinition.InstrumentType result = org.openfeed.InstrumentDefinition.InstrumentType.forNumber(from);
return result == null ? org.openfeed.InstrumentDefinition.InstrumentType.UNRECOGNIZED : result;
}
};
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @return A list containing the instrumentType.
*/
@java.lang.Override
public java.util.List getInstrumentTypeList() {
return new com.google.protobuf.Internal.IntListAdapter<
org.openfeed.InstrumentDefinition.InstrumentType>(instrumentType_, instrumentType_converter_);
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @return The count of instrumentType.
*/
@java.lang.Override
public int getInstrumentTypeCount() {
return instrumentType_.size();
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param index The index of the element to return.
* @return The instrumentType at the given index.
*/
@java.lang.Override
public org.openfeed.InstrumentDefinition.InstrumentType getInstrumentType(int index) {
return instrumentType_converter_.convert(instrumentType_.getInt(index));
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @return A list containing the enum numeric values on the wire for instrumentType.
*/
@java.lang.Override
public java.util.List
getInstrumentTypeValueList() {
return instrumentType_;
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of instrumentType at the given index.
*/
@java.lang.Override
public int getInstrumentTypeValue(int index) {
return instrumentType_.getInt(index);
}
private int instrumentTypeMemoizedSerializedSize;
public static final int SPREADTYPE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList spreadType_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @return A list containing the spreadType.
*/
public com.google.protobuf.ProtocolStringList
getSpreadTypeList() {
return spreadType_;
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @return The count of spreadType.
*/
public int getSpreadTypeCount() {
return spreadType_.size();
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @param index The index of the element to return.
* @return The spreadType at the given index.
*/
public java.lang.String getSpreadType(int index) {
return spreadType_.get(index);
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @param index The index of the value to return.
* @return The bytes of the spreadType at the given index.
*/
public com.google.protobuf.ByteString
getSpreadTypeBytes(int index) {
return spreadType_.getByteString(index);
}
public static final int VERSION_FIELD_NUMBER = 5;
private int version_ = 0;
/**
*
* / If version >= 1 then will send InstrumentDefinition in the InstrumentResponse
*
*
* sint32 version = 5;
* @return The version.
*/
@java.lang.Override
public int getVersion() {
return version_;
}
public static final int SYMBOL_FIELD_NUMBER = 10;
/**
* string symbol = 10;
* @return Whether the symbol field is set.
*/
public boolean hasSymbol() {
return requestCase_ == 10;
}
/**
* string symbol = 10;
* @return The symbol.
*/
public java.lang.String getSymbol() {
java.lang.Object ref = "";
if (requestCase_ == 10) {
ref = request_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (requestCase_ == 10) {
request_ = s;
}
return s;
}
}
/**
* string symbol = 10;
* @return The bytes for symbol.
*/
public com.google.protobuf.ByteString
getSymbolBytes() {
java.lang.Object ref = "";
if (requestCase_ == 10) {
ref = request_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (requestCase_ == 10) {
request_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MARKETID_FIELD_NUMBER = 11;
/**
* sint64 marketId = 11;
* @return Whether the marketId field is set.
*/
@java.lang.Override
public boolean hasMarketId() {
return requestCase_ == 11;
}
/**
* sint64 marketId = 11;
* @return The marketId.
*/
@java.lang.Override
public long getMarketId() {
if (requestCase_ == 11) {
return (java.lang.Long) request_;
}
return 0L;
}
public static final int EXCHANGE_FIELD_NUMBER = 12;
/**
* string exchange = 12;
* @return Whether the exchange field is set.
*/
public boolean hasExchange() {
return requestCase_ == 12;
}
/**
* string exchange = 12;
* @return The exchange.
*/
public java.lang.String getExchange() {
java.lang.Object ref = "";
if (requestCase_ == 12) {
ref = request_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (requestCase_ == 12) {
request_ = s;
}
return s;
}
}
/**
* string exchange = 12;
* @return The bytes for exchange.
*/
public com.google.protobuf.ByteString
getExchangeBytes() {
java.lang.Object ref = "";
if (requestCase_ == 12) {
ref = request_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (requestCase_ == 12) {
request_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CHANNELID_FIELD_NUMBER = 13;
/**
* sint32 channelId = 13;
* @return Whether the channelId field is set.
*/
@java.lang.Override
public boolean hasChannelId() {
return requestCase_ == 13;
}
/**
* sint32 channelId = 13;
* @return The channelId.
*/
@java.lang.Override
public int getChannelId() {
if (requestCase_ == 13) {
return (java.lang.Integer) request_;
}
return 0;
}
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 {
getSerializedSize();
if (correlationId_ != 0L) {
output.writeSInt64(1, correlationId_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
com.google.protobuf.GeneratedMessage.writeString(output, 2, token_);
}
if (getInstrumentTypeList().size() > 0) {
output.writeUInt32NoTag(26);
output.writeUInt32NoTag(instrumentTypeMemoizedSerializedSize);
}
for (int i = 0; i < instrumentType_.size(); i++) {
output.writeEnumNoTag(instrumentType_.getInt(i));
}
for (int i = 0; i < spreadType_.size(); i++) {
com.google.protobuf.GeneratedMessage.writeString(output, 4, spreadType_.getRaw(i));
}
if (version_ != 0) {
output.writeSInt32(5, version_);
}
if (requestCase_ == 10) {
com.google.protobuf.GeneratedMessage.writeString(output, 10, request_);
}
if (requestCase_ == 11) {
output.writeSInt64(
11, (long)((java.lang.Long) request_));
}
if (requestCase_ == 12) {
com.google.protobuf.GeneratedMessage.writeString(output, 12, request_);
}
if (requestCase_ == 13) {
output.writeSInt32(
13, (int)((java.lang.Integer) request_));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (correlationId_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeSInt64Size(1, correlationId_);
}
if (!com.google.protobuf.GeneratedMessage.isStringEmpty(token_)) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(2, token_);
}
{
int dataSize = 0;
for (int i = 0; i < instrumentType_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(instrumentType_.getInt(i));
}
size += dataSize;
if (!getInstrumentTypeList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}instrumentTypeMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < spreadType_.size(); i++) {
dataSize += computeStringSizeNoTag(spreadType_.getRaw(i));
}
size += dataSize;
size += 1 * getSpreadTypeList().size();
}
if (version_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeSInt32Size(5, version_);
}
if (requestCase_ == 10) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(10, request_);
}
if (requestCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeSInt64Size(
11, (long)((java.lang.Long) request_));
}
if (requestCase_ == 12) {
size += com.google.protobuf.GeneratedMessage.computeStringSize(12, request_);
}
if (requestCase_ == 13) {
size += com.google.protobuf.CodedOutputStream
.computeSInt32Size(
13, (int)((java.lang.Integer) request_));
}
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 org.openfeed.InstrumentRequest)) {
return super.equals(obj);
}
org.openfeed.InstrumentRequest other = (org.openfeed.InstrumentRequest) obj;
if (getCorrelationId()
!= other.getCorrelationId()) return false;
if (!getToken()
.equals(other.getToken())) return false;
if (!instrumentType_.equals(other.instrumentType_)) return false;
if (!getSpreadTypeList()
.equals(other.getSpreadTypeList())) return false;
if (getVersion()
!= other.getVersion()) return false;
if (!getRequestCase().equals(other.getRequestCase())) return false;
switch (requestCase_) {
case 10:
if (!getSymbol()
.equals(other.getSymbol())) return false;
break;
case 11:
if (getMarketId()
!= other.getMarketId()) return false;
break;
case 12:
if (!getExchange()
.equals(other.getExchange())) return false;
break;
case 13:
if (getChannelId()
!= other.getChannelId()) 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();
hash = (37 * hash) + CORRELATIONID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCorrelationId());
hash = (37 * hash) + TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getToken().hashCode();
if (getInstrumentTypeCount() > 0) {
hash = (37 * hash) + INSTRUMENTTYPE_FIELD_NUMBER;
hash = (53 * hash) + instrumentType_.hashCode();
}
if (getSpreadTypeCount() > 0) {
hash = (37 * hash) + SPREADTYPE_FIELD_NUMBER;
hash = (53 * hash) + getSpreadTypeList().hashCode();
}
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion();
switch (requestCase_) {
case 10:
hash = (37 * hash) + SYMBOL_FIELD_NUMBER;
hash = (53 * hash) + getSymbol().hashCode();
break;
case 11:
hash = (37 * hash) + MARKETID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMarketId());
break;
case 12:
hash = (37 * hash) + EXCHANGE_FIELD_NUMBER;
hash = (53 * hash) + getExchange().hashCode();
break;
case 13:
hash = (37 * hash) + CHANNELID_FIELD_NUMBER;
hash = (53 * hash) + getChannelId();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.openfeed.InstrumentRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.openfeed.InstrumentRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.openfeed.InstrumentRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.openfeed.InstrumentRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.openfeed.InstrumentRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.openfeed.InstrumentRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.openfeed.InstrumentRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.openfeed.InstrumentRequest 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 org.openfeed.InstrumentRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
}
public static org.openfeed.InstrumentRequest 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 org.openfeed.InstrumentRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
}
public static org.openfeed.InstrumentRequest 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(org.openfeed.InstrumentRequest 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;
}
/**
*
* / Instrument Definition(s), will stream InstrumentDefinition(s)
*
*
* Protobuf type {@code org.openfeed.InstrumentRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder implements
// @@protoc_insertion_point(builder_implements:org.openfeed.InstrumentRequest)
org.openfeed.InstrumentRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_InstrumentRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_InstrumentRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.openfeed.InstrumentRequest.class, org.openfeed.InstrumentRequest.Builder.class);
}
// Construct using org.openfeed.InstrumentRequest.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessage.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
correlationId_ = 0L;
token_ = "";
instrumentType_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000004);
spreadType_ =
com.google.protobuf.LazyStringArrayList.emptyList();
version_ = 0;
requestCase_ = 0;
request_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.openfeed.OpenfeedApi.internal_static_org_openfeed_InstrumentRequest_descriptor;
}
@java.lang.Override
public org.openfeed.InstrumentRequest getDefaultInstanceForType() {
return org.openfeed.InstrumentRequest.getDefaultInstance();
}
@java.lang.Override
public org.openfeed.InstrumentRequest build() {
org.openfeed.InstrumentRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.openfeed.InstrumentRequest buildPartial() {
org.openfeed.InstrumentRequest result = new org.openfeed.InstrumentRequest(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.openfeed.InstrumentRequest result) {
if (((bitField0_ & 0x00000004) != 0)) {
instrumentType_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.instrumentType_ = instrumentType_;
}
private void buildPartial0(org.openfeed.InstrumentRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.correlationId_ = correlationId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.token_ = token_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
spreadType_.makeImmutable();
result.spreadType_ = spreadType_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.version_ = version_;
}
}
private void buildPartialOneofs(org.openfeed.InstrumentRequest result) {
result.requestCase_ = requestCase_;
result.request_ = this.request_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.openfeed.InstrumentRequest) {
return mergeFrom((org.openfeed.InstrumentRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.openfeed.InstrumentRequest other) {
if (other == org.openfeed.InstrumentRequest.getDefaultInstance()) return this;
if (other.getCorrelationId() != 0L) {
setCorrelationId(other.getCorrelationId());
}
if (!other.getToken().isEmpty()) {
token_ = other.token_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.instrumentType_.isEmpty()) {
if (instrumentType_.isEmpty()) {
instrumentType_ = other.instrumentType_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureInstrumentTypeIsMutable();
instrumentType_.addAll(other.instrumentType_);
}
onChanged();
}
if (!other.spreadType_.isEmpty()) {
if (spreadType_.isEmpty()) {
spreadType_ = other.spreadType_;
bitField0_ |= 0x00000008;
} else {
ensureSpreadTypeIsMutable();
spreadType_.addAll(other.spreadType_);
}
onChanged();
}
if (other.getVersion() != 0) {
setVersion(other.getVersion());
}
switch (other.getRequestCase()) {
case SYMBOL: {
requestCase_ = 10;
request_ = other.request_;
onChanged();
break;
}
case MARKETID: {
setMarketId(other.getMarketId());
break;
}
case EXCHANGE: {
requestCase_ = 12;
request_ = other.request_;
onChanged();
break;
}
case CHANNELID: {
setChannelId(other.getChannelId());
break;
}
case REQUEST_NOT_SET: {
break;
}
}
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: {
correlationId_ = input.readSInt64();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
token_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
int tmpRaw = input.readEnum();
ensureInstrumentTypeIsMutable();
instrumentType_.addInt(tmpRaw);
break;
} // case 24
case 26: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureInstrumentTypeIsMutable();
instrumentType_.addInt(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 26
case 34: {
java.lang.String s = input.readStringRequireUtf8();
ensureSpreadTypeIsMutable();
spreadType_.add(s);
break;
} // case 34
case 40: {
version_ = input.readSInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 82: {
java.lang.String s = input.readStringRequireUtf8();
requestCase_ = 10;
request_ = s;
break;
} // case 82
case 88: {
request_ = input.readSInt64();
requestCase_ = 11;
break;
} // case 88
case 98: {
java.lang.String s = input.readStringRequireUtf8();
requestCase_ = 12;
request_ = s;
break;
} // case 98
case 104: {
request_ = input.readSInt32();
requestCase_ = 13;
break;
} // case 104
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 requestCase_ = 0;
private java.lang.Object request_;
public RequestCase
getRequestCase() {
return RequestCase.forNumber(
requestCase_);
}
public Builder clearRequest() {
requestCase_ = 0;
request_ = null;
onChanged();
return this;
}
private int bitField0_;
private long correlationId_ ;
/**
* sint64 correlationId = 1;
* @return The correlationId.
*/
@java.lang.Override
public long getCorrelationId() {
return correlationId_;
}
/**
* sint64 correlationId = 1;
* @param value The correlationId to set.
* @return This builder for chaining.
*/
public Builder setCorrelationId(long value) {
correlationId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* sint64 correlationId = 1;
* @return This builder for chaining.
*/
public Builder clearCorrelationId() {
bitField0_ = (bitField0_ & ~0x00000001);
correlationId_ = 0L;
onChanged();
return this;
}
private java.lang.Object token_ = "";
/**
* string token = 2;
* @return The token.
*/
public java.lang.String getToken() {
java.lang.Object ref = token_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
token_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string token = 2;
* @return The bytes for token.
*/
public com.google.protobuf.ByteString
getTokenBytes() {
java.lang.Object ref = token_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
token_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string token = 2;
* @param value The token to set.
* @return This builder for chaining.
*/
public Builder setToken(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
token_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* string token = 2;
* @return This builder for chaining.
*/
public Builder clearToken() {
token_ = getDefaultInstance().getToken();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* string token = 2;
* @param value The bytes for token to set.
* @return This builder for chaining.
*/
public Builder setTokenBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
token_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.Internal.IntList instrumentType_ =
emptyIntList();
private void ensureInstrumentTypeIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
instrumentType_ = makeMutableCopy(instrumentType_);
bitField0_ |= 0x00000004;
}
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @return A list containing the instrumentType.
*/
public java.util.List getInstrumentTypeList() {
return new com.google.protobuf.Internal.IntListAdapter<
org.openfeed.InstrumentDefinition.InstrumentType>(instrumentType_, instrumentType_converter_);
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @return The count of instrumentType.
*/
public int getInstrumentTypeCount() {
return instrumentType_.size();
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param index The index of the element to return.
* @return The instrumentType at the given index.
*/
public org.openfeed.InstrumentDefinition.InstrumentType getInstrumentType(int index) {
return instrumentType_converter_.convert(instrumentType_.getInt(index));
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param index The index to set the value at.
* @param value The instrumentType to set.
* @return This builder for chaining.
*/
public Builder setInstrumentType(
int index, org.openfeed.InstrumentDefinition.InstrumentType value) {
if (value == null) {
throw new NullPointerException();
}
ensureInstrumentTypeIsMutable();
instrumentType_.setInt(index, value.getNumber());
onChanged();
return this;
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param value The instrumentType to add.
* @return This builder for chaining.
*/
public Builder addInstrumentType(org.openfeed.InstrumentDefinition.InstrumentType value) {
if (value == null) {
throw new NullPointerException();
}
ensureInstrumentTypeIsMutable();
instrumentType_.addInt(value.getNumber());
onChanged();
return this;
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param values The instrumentType to add.
* @return This builder for chaining.
*/
public Builder addAllInstrumentType(
java.lang.Iterable extends org.openfeed.InstrumentDefinition.InstrumentType> values) {
ensureInstrumentTypeIsMutable();
for (org.openfeed.InstrumentDefinition.InstrumentType value : values) {
instrumentType_.addInt(value.getNumber());
}
onChanged();
return this;
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @return This builder for chaining.
*/
public Builder clearInstrumentType() {
instrumentType_ = emptyIntList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @return A list containing the enum numeric values on the wire for instrumentType.
*/
public java.util.List
getInstrumentTypeValueList() {
return java.util.Collections.unmodifiableList(instrumentType_);
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of instrumentType at the given index.
*/
public int getInstrumentTypeValue(int index) {
return instrumentType_.getInt(index);
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for instrumentType to set.
* @return This builder for chaining.
*/
public Builder setInstrumentTypeValue(
int index, int value) {
ensureInstrumentTypeIsMutable();
instrumentType_.setInt(index, value);
onChanged();
return this;
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param value The enum numeric value on the wire for instrumentType to add.
* @return This builder for chaining.
*/
public Builder addInstrumentTypeValue(int value) {
ensureInstrumentTypeIsMutable();
instrumentType_.addInt(value);
onChanged();
return this;
}
/**
*
* / Filter on these instrument types
*
*
* repeated .org.openfeed.InstrumentDefinition.InstrumentType instrumentType = 3;
* @param values The enum numeric values on the wire for instrumentType to add.
* @return This builder for chaining.
*/
public Builder addAllInstrumentTypeValue(
java.lang.Iterable values) {
ensureInstrumentTypeIsMutable();
for (int value : values) {
instrumentType_.addInt(value);
}
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList spreadType_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureSpreadTypeIsMutable() {
if (!spreadType_.isModifiable()) {
spreadType_ = new com.google.protobuf.LazyStringArrayList(spreadType_);
}
bitField0_ |= 0x00000008;
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @return A list containing the spreadType.
*/
public com.google.protobuf.ProtocolStringList
getSpreadTypeList() {
spreadType_.makeImmutable();
return spreadType_;
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @return The count of spreadType.
*/
public int getSpreadTypeCount() {
return spreadType_.size();
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @param index The index of the element to return.
* @return The spreadType at the given index.
*/
public java.lang.String getSpreadType(int index) {
return spreadType_.get(index);
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @param index The index of the value to return.
* @return The bytes of the spreadType at the given index.
*/
public com.google.protobuf.ByteString
getSpreadTypeBytes(int index) {
return spreadType_.getByteString(index);
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @param index The index to set the value at.
* @param value The spreadType to set.
* @return This builder for chaining.
*/
public Builder setSpreadType(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureSpreadTypeIsMutable();
spreadType_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @param value The spreadType to add.
* @return This builder for chaining.
*/
public Builder addSpreadType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureSpreadTypeIsMutable();
spreadType_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @param values The spreadType to add.
* @return This builder for chaining.
*/
public Builder addAllSpreadType(
java.lang.Iterable values) {
ensureSpreadTypeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, spreadType_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @return This builder for chaining.
*/
public Builder clearSpreadType() {
spreadType_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);;
onChanged();
return this;
}
/**
*
* / Filter on these spread types
*
*
* repeated string spreadType = 4;
* @param value The bytes of the spreadType to add.
* @return This builder for chaining.
*/
public Builder addSpreadTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureSpreadTypeIsMutable();
spreadType_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private int version_ ;
/**
*
* / If version >= 1 then will send InstrumentDefinition in the InstrumentResponse
*
*
* sint32 version = 5;
* @return The version.
*/
@java.lang.Override
public int getVersion() {
return version_;
}
/**
*
* / If version >= 1 then will send InstrumentDefinition in the InstrumentResponse
*
*
* sint32 version = 5;
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(int value) {
version_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* / If version >= 1 then will send InstrumentDefinition in the InstrumentResponse
*
*
* sint32 version = 5;
* @return This builder for chaining.
*/
public Builder clearVersion() {
bitField0_ = (bitField0_ & ~0x00000010);
version_ = 0;
onChanged();
return this;
}
/**
* string symbol = 10;
* @return Whether the symbol field is set.
*/
@java.lang.Override
public boolean hasSymbol() {
return requestCase_ == 10;
}
/**
* string symbol = 10;
* @return The symbol.
*/
@java.lang.Override
public java.lang.String getSymbol() {
java.lang.Object ref = "";
if (requestCase_ == 10) {
ref = request_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (requestCase_ == 10) {
request_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string symbol = 10;
* @return The bytes for symbol.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSymbolBytes() {
java.lang.Object ref = "";
if (requestCase_ == 10) {
ref = request_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (requestCase_ == 10) {
request_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string symbol = 10;
* @param value The symbol to set.
* @return This builder for chaining.
*/
public Builder setSymbol(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
requestCase_ = 10;
request_ = value;
onChanged();
return this;
}
/**
* string symbol = 10;
* @return This builder for chaining.
*/
public Builder clearSymbol() {
if (requestCase_ == 10) {
requestCase_ = 0;
request_ = null;
onChanged();
}
return this;
}
/**
* string symbol = 10;
* @param value The bytes for symbol to set.
* @return This builder for chaining.
*/
public Builder setSymbolBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
requestCase_ = 10;
request_ = value;
onChanged();
return this;
}
/**
* sint64 marketId = 11;
* @return Whether the marketId field is set.
*/
public boolean hasMarketId() {
return requestCase_ == 11;
}
/**
* sint64 marketId = 11;
* @return The marketId.
*/
public long getMarketId() {
if (requestCase_ == 11) {
return (java.lang.Long) request_;
}
return 0L;
}
/**
* sint64 marketId = 11;
* @param value The marketId to set.
* @return This builder for chaining.
*/
public Builder setMarketId(long value) {
requestCase_ = 11;
request_ = value;
onChanged();
return this;
}
/**
* sint64 marketId = 11;
* @return This builder for chaining.
*/
public Builder clearMarketId() {
if (requestCase_ == 11) {
requestCase_ = 0;
request_ = null;
onChanged();
}
return this;
}
/**
* string exchange = 12;
* @return Whether the exchange field is set.
*/
@java.lang.Override
public boolean hasExchange() {
return requestCase_ == 12;
}
/**
* string exchange = 12;
* @return The exchange.
*/
@java.lang.Override
public java.lang.String getExchange() {
java.lang.Object ref = "";
if (requestCase_ == 12) {
ref = request_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (requestCase_ == 12) {
request_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string exchange = 12;
* @return The bytes for exchange.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getExchangeBytes() {
java.lang.Object ref = "";
if (requestCase_ == 12) {
ref = request_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (requestCase_ == 12) {
request_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string exchange = 12;
* @param value The exchange to set.
* @return This builder for chaining.
*/
public Builder setExchange(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
requestCase_ = 12;
request_ = value;
onChanged();
return this;
}
/**
* string exchange = 12;
* @return This builder for chaining.
*/
public Builder clearExchange() {
if (requestCase_ == 12) {
requestCase_ = 0;
request_ = null;
onChanged();
}
return this;
}
/**
* string exchange = 12;
* @param value The bytes for exchange to set.
* @return This builder for chaining.
*/
public Builder setExchangeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
requestCase_ = 12;
request_ = value;
onChanged();
return this;
}
/**
* sint32 channelId = 13;
* @return Whether the channelId field is set.
*/
public boolean hasChannelId() {
return requestCase_ == 13;
}
/**
* sint32 channelId = 13;
* @return The channelId.
*/
public int getChannelId() {
if (requestCase_ == 13) {
return (java.lang.Integer) request_;
}
return 0;
}
/**
* sint32 channelId = 13;
* @param value The channelId to set.
* @return This builder for chaining.
*/
public Builder setChannelId(int value) {
requestCase_ = 13;
request_ = value;
onChanged();
return this;
}
/**
* sint32 channelId = 13;
* @return This builder for chaining.
*/
public Builder clearChannelId() {
if (requestCase_ == 13) {
requestCase_ = 0;
request_ = null;
onChanged();
}
return this;
}
// @@protoc_insertion_point(builder_scope:org.openfeed.InstrumentRequest)
}
// @@protoc_insertion_point(class_scope:org.openfeed.InstrumentRequest)
private static final org.openfeed.InstrumentRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.openfeed.InstrumentRequest();
}
public static org.openfeed.InstrumentRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InstrumentRequest 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 org.openfeed.InstrumentRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy