ru.tinkoff.piapi.contract.v1.Signal Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: signals.proto
package ru.tinkoff.piapi.contract.v1;
/**
* Protobuf type {@code tinkoff.public.invest.api.contract.v1.Signal}
*/
public final class Signal extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.Signal)
SignalOrBuilder {
private static final long serialVersionUID = 0L;
// Use Signal.newBuilder() to construct.
private Signal(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Signal() {
signalId_ = "";
strategyId_ = "";
instrumentUid_ = "";
direction_ = "";
info_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Signal();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Signals.internal_static_tinkoff_public_invest_api_contract_v1_Signal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Signals.internal_static_tinkoff_public_invest_api_contract_v1_Signal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.Signal.class, ru.tinkoff.piapi.contract.v1.Signal.Builder.class);
}
public static final int SIGNAL_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object signalId_ = "";
/**
*
* идентификатор сигнала
*
*
* string signal_id = 1;
* @return The signalId.
*/
@java.lang.Override
public java.lang.String getSignalId() {
java.lang.Object ref = signalId_;
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();
signalId_ = s;
return s;
}
}
/**
*
* идентификатор сигнала
*
*
* string signal_id = 1;
* @return The bytes for signalId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSignalIdBytes() {
java.lang.Object ref = signalId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
signalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STRATEGY_ID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object strategyId_ = "";
/**
*
* Идентификатор стратегии
*
*
* string strategy_id = 2;
* @return The strategyId.
*/
@java.lang.Override
public java.lang.String getStrategyId() {
java.lang.Object ref = strategyId_;
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();
strategyId_ = s;
return s;
}
}
/**
*
* Идентификатор стратегии
*
*
* string strategy_id = 2;
* @return The bytes for strategyId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getStrategyIdBytes() {
java.lang.Object ref = strategyId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
strategyId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INSTRUMENT_UID_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object instrumentUid_ = "";
/**
*
* Идентификатор бумаги
*
*
* string instrument_uid = 3;
* @return The instrumentUid.
*/
@java.lang.Override
public java.lang.String getInstrumentUid() {
java.lang.Object ref = instrumentUid_;
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();
instrumentUid_ = s;
return s;
}
}
/**
*
* Идентификатор бумаги
*
*
* string instrument_uid = 3;
* @return The bytes for instrumentUid.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getInstrumentUidBytes() {
java.lang.Object ref = instrumentUid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instrumentUid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATE_DT_FIELD_NUMBER = 4;
private com.google.protobuf.Timestamp createDt_;
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
* @return Whether the createDt field is set.
*/
@java.lang.Override
public boolean hasCreateDt() {
return createDt_ != null;
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
* @return The createDt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreateDt() {
return createDt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createDt_;
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreateDtOrBuilder() {
return createDt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createDt_;
}
public static final int LIFETIME_FIELD_NUMBER = 5;
private long lifetime_ = 0L;
/**
*
* Срок действия сигнала, секунд
*
*
* int64 lifetime = 5;
* @return The lifetime.
*/
@java.lang.Override
public long getLifetime() {
return lifetime_;
}
public static final int DIRECTION_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object direction_ = "";
/**
*
* "buy" / "sell"
*
*
* string direction = 6;
* @return The direction.
*/
@java.lang.Override
public java.lang.String getDirection() {
java.lang.Object ref = direction_;
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();
direction_ = s;
return s;
}
}
/**
*
* "buy" / "sell"
*
*
* string direction = 6;
* @return The bytes for direction.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDirectionBytes() {
java.lang.Object ref = direction_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
direction_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRICE_FIELD_NUMBER = 7;
private float price_ = 0F;
/**
*
* Цена бумаги на момент формирования сигнала
*
*
* float price = 7;
* @return The price.
*/
@java.lang.Override
public float getPrice() {
return price_;
}
public static final int PROFIT_FIELD_NUMBER = 8;
private float profit_ = 0F;
/**
*
* Расчетная прибыль сигнала
*
*
* float profit = 8;
* @return The profit.
*/
@java.lang.Override
public float getProfit() {
return profit_;
}
public static final int INFO_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private volatile java.lang.Object info_ = "";
/**
*
* Произвольная информация о сигнале
*
*
* string info = 9;
* @return The info.
*/
@java.lang.Override
public java.lang.String getInfo() {
java.lang.Object ref = info_;
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();
info_ = s;
return s;
}
}
/**
*
* Произвольная информация о сигнале
*
*
* string info = 9;
* @return The bytes for info.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getInfoBytes() {
java.lang.Object ref = info_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
info_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signalId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, signalId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(strategyId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, strategyId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instrumentUid_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instrumentUid_);
}
if (createDt_ != null) {
output.writeMessage(4, getCreateDt());
}
if (lifetime_ != 0L) {
output.writeInt64(5, lifetime_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, direction_);
}
if (java.lang.Float.floatToRawIntBits(price_) != 0) {
output.writeFloat(7, price_);
}
if (java.lang.Float.floatToRawIntBits(profit_) != 0) {
output.writeFloat(8, profit_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(info_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, info_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(signalId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, signalId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(strategyId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, strategyId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instrumentUid_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instrumentUid_);
}
if (createDt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getCreateDt());
}
if (lifetime_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, lifetime_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(direction_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, direction_);
}
if (java.lang.Float.floatToRawIntBits(price_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(7, price_);
}
if (java.lang.Float.floatToRawIntBits(profit_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(8, profit_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(info_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, info_);
}
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 ru.tinkoff.piapi.contract.v1.Signal)) {
return super.equals(obj);
}
ru.tinkoff.piapi.contract.v1.Signal other = (ru.tinkoff.piapi.contract.v1.Signal) obj;
if (!getSignalId()
.equals(other.getSignalId())) return false;
if (!getStrategyId()
.equals(other.getStrategyId())) return false;
if (!getInstrumentUid()
.equals(other.getInstrumentUid())) return false;
if (hasCreateDt() != other.hasCreateDt()) return false;
if (hasCreateDt()) {
if (!getCreateDt()
.equals(other.getCreateDt())) return false;
}
if (getLifetime()
!= other.getLifetime()) return false;
if (!getDirection()
.equals(other.getDirection())) return false;
if (java.lang.Float.floatToIntBits(getPrice())
!= java.lang.Float.floatToIntBits(
other.getPrice())) return false;
if (java.lang.Float.floatToIntBits(getProfit())
!= java.lang.Float.floatToIntBits(
other.getProfit())) return false;
if (!getInfo()
.equals(other.getInfo())) 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) + SIGNAL_ID_FIELD_NUMBER;
hash = (53 * hash) + getSignalId().hashCode();
hash = (37 * hash) + STRATEGY_ID_FIELD_NUMBER;
hash = (53 * hash) + getStrategyId().hashCode();
hash = (37 * hash) + INSTRUMENT_UID_FIELD_NUMBER;
hash = (53 * hash) + getInstrumentUid().hashCode();
if (hasCreateDt()) {
hash = (37 * hash) + CREATE_DT_FIELD_NUMBER;
hash = (53 * hash) + getCreateDt().hashCode();
}
hash = (37 * hash) + LIFETIME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getLifetime());
hash = (37 * hash) + DIRECTION_FIELD_NUMBER;
hash = (53 * hash) + getDirection().hashCode();
hash = (37 * hash) + PRICE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getPrice());
hash = (37 * hash) + PROFIT_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getProfit());
hash = (37 * hash) + INFO_FIELD_NUMBER;
hash = (53 * hash) + getInfo().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static ru.tinkoff.piapi.contract.v1.Signal parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.Signal parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.Signal parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.Signal parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.Signal parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.Signal parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.Signal parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.Signal 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 ru.tinkoff.piapi.contract.v1.Signal parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.Signal 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 ru.tinkoff.piapi.contract.v1.Signal parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.Signal 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(ru.tinkoff.piapi.contract.v1.Signal 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 tinkoff.public.invest.api.contract.v1.Signal}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.Signal)
ru.tinkoff.piapi.contract.v1.SignalOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Signals.internal_static_tinkoff_public_invest_api_contract_v1_Signal_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Signals.internal_static_tinkoff_public_invest_api_contract_v1_Signal_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.Signal.class, ru.tinkoff.piapi.contract.v1.Signal.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.Signal.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
signalId_ = "";
strategyId_ = "";
instrumentUid_ = "";
createDt_ = null;
if (createDtBuilder_ != null) {
createDtBuilder_.dispose();
createDtBuilder_ = null;
}
lifetime_ = 0L;
direction_ = "";
price_ = 0F;
profit_ = 0F;
info_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ru.tinkoff.piapi.contract.v1.Signals.internal_static_tinkoff_public_invest_api_contract_v1_Signal_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Signal getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.Signal.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Signal build() {
ru.tinkoff.piapi.contract.v1.Signal result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Signal buildPartial() {
ru.tinkoff.piapi.contract.v1.Signal result = new ru.tinkoff.piapi.contract.v1.Signal(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.Signal result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.signalId_ = signalId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.strategyId_ = strategyId_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.instrumentUid_ = instrumentUid_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.createDt_ = createDtBuilder_ == null
? createDt_
: createDtBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.lifetime_ = lifetime_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.direction_ = direction_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.price_ = price_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.profit_ = profit_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.info_ = info_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.Signal) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.Signal)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.Signal other) {
if (other == ru.tinkoff.piapi.contract.v1.Signal.getDefaultInstance()) return this;
if (!other.getSignalId().isEmpty()) {
signalId_ = other.signalId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getStrategyId().isEmpty()) {
strategyId_ = other.strategyId_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getInstrumentUid().isEmpty()) {
instrumentUid_ = other.instrumentUid_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasCreateDt()) {
mergeCreateDt(other.getCreateDt());
}
if (other.getLifetime() != 0L) {
setLifetime(other.getLifetime());
}
if (!other.getDirection().isEmpty()) {
direction_ = other.direction_;
bitField0_ |= 0x00000020;
onChanged();
}
if (other.getPrice() != 0F) {
setPrice(other.getPrice());
}
if (other.getProfit() != 0F) {
setProfit(other.getProfit());
}
if (!other.getInfo().isEmpty()) {
info_ = other.info_;
bitField0_ |= 0x00000100;
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 10: {
signalId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
strategyId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
instrumentUid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getCreateDtFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
lifetime_ = input.readInt64();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50: {
direction_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 50
case 61: {
price_ = input.readFloat();
bitField0_ |= 0x00000040;
break;
} // case 61
case 69: {
profit_ = input.readFloat();
bitField0_ |= 0x00000080;
break;
} // case 69
case 74: {
info_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 74
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 java.lang.Object signalId_ = "";
/**
*
* идентификатор сигнала
*
*
* string signal_id = 1;
* @return The signalId.
*/
public java.lang.String getSignalId() {
java.lang.Object ref = signalId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
signalId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* идентификатор сигнала
*
*
* string signal_id = 1;
* @return The bytes for signalId.
*/
public com.google.protobuf.ByteString
getSignalIdBytes() {
java.lang.Object ref = signalId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
signalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* идентификатор сигнала
*
*
* string signal_id = 1;
* @param value The signalId to set.
* @return This builder for chaining.
*/
public Builder setSignalId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
signalId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* идентификатор сигнала
*
*
* string signal_id = 1;
* @return This builder for chaining.
*/
public Builder clearSignalId() {
signalId_ = getDefaultInstance().getSignalId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* идентификатор сигнала
*
*
* string signal_id = 1;
* @param value The bytes for signalId to set.
* @return This builder for chaining.
*/
public Builder setSignalIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
signalId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object strategyId_ = "";
/**
*
* Идентификатор стратегии
*
*
* string strategy_id = 2;
* @return The strategyId.
*/
public java.lang.String getStrategyId() {
java.lang.Object ref = strategyId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
strategyId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Идентификатор стратегии
*
*
* string strategy_id = 2;
* @return The bytes for strategyId.
*/
public com.google.protobuf.ByteString
getStrategyIdBytes() {
java.lang.Object ref = strategyId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
strategyId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Идентификатор стратегии
*
*
* string strategy_id = 2;
* @param value The strategyId to set.
* @return This builder for chaining.
*/
public Builder setStrategyId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
strategyId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Идентификатор стратегии
*
*
* string strategy_id = 2;
* @return This builder for chaining.
*/
public Builder clearStrategyId() {
strategyId_ = getDefaultInstance().getStrategyId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Идентификатор стратегии
*
*
* string strategy_id = 2;
* @param value The bytes for strategyId to set.
* @return This builder for chaining.
*/
public Builder setStrategyIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
strategyId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object instrumentUid_ = "";
/**
*
* Идентификатор бумаги
*
*
* string instrument_uid = 3;
* @return The instrumentUid.
*/
public java.lang.String getInstrumentUid() {
java.lang.Object ref = instrumentUid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
instrumentUid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Идентификатор бумаги
*
*
* string instrument_uid = 3;
* @return The bytes for instrumentUid.
*/
public com.google.protobuf.ByteString
getInstrumentUidBytes() {
java.lang.Object ref = instrumentUid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instrumentUid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Идентификатор бумаги
*
*
* string instrument_uid = 3;
* @param value The instrumentUid to set.
* @return This builder for chaining.
*/
public Builder setInstrumentUid(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
instrumentUid_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Идентификатор бумаги
*
*
* string instrument_uid = 3;
* @return This builder for chaining.
*/
public Builder clearInstrumentUid() {
instrumentUid_ = getDefaultInstance().getInstrumentUid();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Идентификатор бумаги
*
*
* string instrument_uid = 3;
* @param value The bytes for instrumentUid to set.
* @return This builder for chaining.
*/
public Builder setInstrumentUidBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
instrumentUid_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createDt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createDtBuilder_;
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
* @return Whether the createDt field is set.
*/
public boolean hasCreateDt() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
* @return The createDt.
*/
public com.google.protobuf.Timestamp getCreateDt() {
if (createDtBuilder_ == null) {
return createDt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createDt_;
} else {
return createDtBuilder_.getMessage();
}
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
*/
public Builder setCreateDt(com.google.protobuf.Timestamp value) {
if (createDtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createDt_ = value;
} else {
createDtBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
*/
public Builder setCreateDt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createDtBuilder_ == null) {
createDt_ = builderForValue.build();
} else {
createDtBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
*/
public Builder mergeCreateDt(com.google.protobuf.Timestamp value) {
if (createDtBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
createDt_ != null &&
createDt_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCreateDtBuilder().mergeFrom(value);
} else {
createDt_ = value;
}
} else {
createDtBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
*/
public Builder clearCreateDt() {
bitField0_ = (bitField0_ & ~0x00000008);
createDt_ = null;
if (createDtBuilder_ != null) {
createDtBuilder_.dispose();
createDtBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
*/
public com.google.protobuf.Timestamp.Builder getCreateDtBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getCreateDtFieldBuilder().getBuilder();
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
*/
public com.google.protobuf.TimestampOrBuilder getCreateDtOrBuilder() {
if (createDtBuilder_ != null) {
return createDtBuilder_.getMessageOrBuilder();
} else {
return createDt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createDt_;
}
}
/**
*
* Датавремя создания сигнала в часовом поясе UTC.
*
*
* .google.protobuf.Timestamp create_dt = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreateDtFieldBuilder() {
if (createDtBuilder_ == null) {
createDtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreateDt(),
getParentForChildren(),
isClean());
createDt_ = null;
}
return createDtBuilder_;
}
private long lifetime_ ;
/**
*
* Срок действия сигнала, секунд
*
*
* int64 lifetime = 5;
* @return The lifetime.
*/
@java.lang.Override
public long getLifetime() {
return lifetime_;
}
/**
*
* Срок действия сигнала, секунд
*
*
* int64 lifetime = 5;
* @param value The lifetime to set.
* @return This builder for chaining.
*/
public Builder setLifetime(long value) {
lifetime_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Срок действия сигнала, секунд
*
*
* int64 lifetime = 5;
* @return This builder for chaining.
*/
public Builder clearLifetime() {
bitField0_ = (bitField0_ & ~0x00000010);
lifetime_ = 0L;
onChanged();
return this;
}
private java.lang.Object direction_ = "";
/**
*
* "buy" / "sell"
*
*
* string direction = 6;
* @return The direction.
*/
public java.lang.String getDirection() {
java.lang.Object ref = direction_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
direction_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* "buy" / "sell"
*
*
* string direction = 6;
* @return The bytes for direction.
*/
public com.google.protobuf.ByteString
getDirectionBytes() {
java.lang.Object ref = direction_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
direction_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* "buy" / "sell"
*
*
* string direction = 6;
* @param value The direction to set.
* @return This builder for chaining.
*/
public Builder setDirection(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
direction_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* "buy" / "sell"
*
*
* string direction = 6;
* @return This builder for chaining.
*/
public Builder clearDirection() {
direction_ = getDefaultInstance().getDirection();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
* "buy" / "sell"
*
*
* string direction = 6;
* @param value The bytes for direction to set.
* @return This builder for chaining.
*/
public Builder setDirectionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
direction_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private float price_ ;
/**
*
* Цена бумаги на момент формирования сигнала
*
*
* float price = 7;
* @return The price.
*/
@java.lang.Override
public float getPrice() {
return price_;
}
/**
*
* Цена бумаги на момент формирования сигнала
*
*
* float price = 7;
* @param value The price to set.
* @return This builder for chaining.
*/
public Builder setPrice(float value) {
price_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Цена бумаги на момент формирования сигнала
*
*
* float price = 7;
* @return This builder for chaining.
*/
public Builder clearPrice() {
bitField0_ = (bitField0_ & ~0x00000040);
price_ = 0F;
onChanged();
return this;
}
private float profit_ ;
/**
*
* Расчетная прибыль сигнала
*
*
* float profit = 8;
* @return The profit.
*/
@java.lang.Override
public float getProfit() {
return profit_;
}
/**
*
* Расчетная прибыль сигнала
*
*
* float profit = 8;
* @param value The profit to set.
* @return This builder for chaining.
*/
public Builder setProfit(float value) {
profit_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Расчетная прибыль сигнала
*
*
* float profit = 8;
* @return This builder for chaining.
*/
public Builder clearProfit() {
bitField0_ = (bitField0_ & ~0x00000080);
profit_ = 0F;
onChanged();
return this;
}
private java.lang.Object info_ = "";
/**
*
* Произвольная информация о сигнале
*
*
* string info = 9;
* @return The info.
*/
public java.lang.String getInfo() {
java.lang.Object ref = info_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
info_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Произвольная информация о сигнале
*
*
* string info = 9;
* @return The bytes for info.
*/
public com.google.protobuf.ByteString
getInfoBytes() {
java.lang.Object ref = info_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
info_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Произвольная информация о сигнале
*
*
* string info = 9;
* @param value The info to set.
* @return This builder for chaining.
*/
public Builder setInfo(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
info_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* Произвольная информация о сигнале
*
*
* string info = 9;
* @return This builder for chaining.
*/
public Builder clearInfo() {
info_ = getDefaultInstance().getInfo();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
* Произвольная информация о сигнале
*
*
* string info = 9;
* @param value The bytes for info to set.
* @return This builder for chaining.
*/
public Builder setInfoBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
info_ = value;
bitField0_ |= 0x00000100;
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:tinkoff.public.invest.api.contract.v1.Signal)
}
// @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.Signal)
private static final ru.tinkoff.piapi.contract.v1.Signal DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.Signal();
}
public static ru.tinkoff.piapi.contract.v1.Signal getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Signal 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 ru.tinkoff.piapi.contract.v1.Signal getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}