implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.VirtualPortfolioPosition)
ru.tinkoff.piapi.contract.v1.VirtualPortfolioPositionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_VirtualPortfolioPosition_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_VirtualPortfolioPosition_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition.class, ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
positionUid_ = "";
instrumentUid_ = "";
figi_ = "";
instrumentType_ = "";
quantity_ = null;
if (quantityBuilder_ != null) {
quantityBuilder_.dispose();
quantityBuilder_ = null;
}
averagePositionPrice_ = null;
if (averagePositionPriceBuilder_ != null) {
averagePositionPriceBuilder_.dispose();
averagePositionPriceBuilder_ = null;
}
expectedYield_ = null;
if (expectedYieldBuilder_ != null) {
expectedYieldBuilder_.dispose();
expectedYieldBuilder_ = null;
}
expectedYieldFifo_ = null;
if (expectedYieldFifoBuilder_ != null) {
expectedYieldFifoBuilder_.dispose();
expectedYieldFifoBuilder_ = null;
}
expireDate_ = null;
if (expireDateBuilder_ != null) {
expireDateBuilder_.dispose();
expireDateBuilder_ = null;
}
currentPrice_ = null;
if (currentPriceBuilder_ != null) {
currentPriceBuilder_.dispose();
currentPriceBuilder_ = null;
}
averagePositionPriceFifo_ = null;
if (averagePositionPriceFifoBuilder_ != null) {
averagePositionPriceFifoBuilder_.dispose();
averagePositionPriceFifoBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_VirtualPortfolioPosition_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition build() {
ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition buildPartial() {
ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition result = new ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.positionUid_ = positionUid_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.instrumentUid_ = instrumentUid_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.figi_ = figi_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.instrumentType_ = instrumentType_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.quantity_ = quantityBuilder_ == null
? quantity_
: quantityBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.averagePositionPrice_ = averagePositionPriceBuilder_ == null
? averagePositionPrice_
: averagePositionPriceBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.expectedYield_ = expectedYieldBuilder_ == null
? expectedYield_
: expectedYieldBuilder_.build();
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.expectedYieldFifo_ = expectedYieldFifoBuilder_ == null
? expectedYieldFifo_
: expectedYieldFifoBuilder_.build();
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.expireDate_ = expireDateBuilder_ == null
? expireDate_
: expireDateBuilder_.build();
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.currentPrice_ = currentPriceBuilder_ == null
? currentPrice_
: currentPriceBuilder_.build();
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.averagePositionPriceFifo_ = averagePositionPriceFifoBuilder_ == null
? averagePositionPriceFifo_
: averagePositionPriceFifoBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition other) {
if (other == ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition.getDefaultInstance()) return this;
if (!other.getPositionUid().isEmpty()) {
positionUid_ = other.positionUid_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getInstrumentUid().isEmpty()) {
instrumentUid_ = other.instrumentUid_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getFigi().isEmpty()) {
figi_ = other.figi_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getInstrumentType().isEmpty()) {
instrumentType_ = other.instrumentType_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasQuantity()) {
mergeQuantity(other.getQuantity());
}
if (other.hasAveragePositionPrice()) {
mergeAveragePositionPrice(other.getAveragePositionPrice());
}
if (other.hasExpectedYield()) {
mergeExpectedYield(other.getExpectedYield());
}
if (other.hasExpectedYieldFifo()) {
mergeExpectedYieldFifo(other.getExpectedYieldFifo());
}
if (other.hasExpireDate()) {
mergeExpireDate(other.getExpireDate());
}
if (other.hasCurrentPrice()) {
mergeCurrentPrice(other.getCurrentPrice());
}
if (other.hasAveragePositionPriceFifo()) {
mergeAveragePositionPriceFifo(other.getAveragePositionPriceFifo());
}
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: {
positionUid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
instrumentUid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
figi_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
instrumentType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
input.readMessage(
getQuantityFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
input.readMessage(
getAveragePositionPriceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
input.readMessage(
getExpectedYieldFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 66: {
input.readMessage(
getExpectedYieldFifoFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
case 74: {
input.readMessage(
getExpireDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 74
case 82: {
input.readMessage(
getCurrentPriceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 82
case 90: {
input.readMessage(
getAveragePositionPriceFifoFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000400;
break;
} // case 90
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 positionUid_ = "";
/**
*
*position_uid-идентификатора инструмента
*
*
* string position_uid = 1;
* @return The positionUid.
*/
public java.lang.String getPositionUid() {
java.lang.Object ref = positionUid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
positionUid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*position_uid-идентификатора инструмента
*
*
* string position_uid = 1;
* @return The bytes for positionUid.
*/
public com.google.protobuf.ByteString
getPositionUidBytes() {
java.lang.Object ref = positionUid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
positionUid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*position_uid-идентификатора инструмента
*
*
* string position_uid = 1;
* @param value The positionUid to set.
* @return This builder for chaining.
*/
public Builder setPositionUid(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
positionUid_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*position_uid-идентификатора инструмента
*
*
* string position_uid = 1;
* @return This builder for chaining.
*/
public Builder clearPositionUid() {
positionUid_ = getDefaultInstance().getPositionUid();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*position_uid-идентификатора инструмента
*
*
* string position_uid = 1;
* @param value The bytes for positionUid to set.
* @return This builder for chaining.
*/
public Builder setPositionUidBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
positionUid_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object instrumentUid_ = "";
/**
*
*instrument_uid-идентификатора инструмента
*
*
* string instrument_uid = 2;
* @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;
}
}
/**
*
*instrument_uid-идентификатора инструмента
*
*
* string instrument_uid = 2;
* @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;
}
}
/**
*
*instrument_uid-идентификатора инструмента
*
*
* string instrument_uid = 2;
* @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_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*instrument_uid-идентификатора инструмента
*
*
* string instrument_uid = 2;
* @return This builder for chaining.
*/
public Builder clearInstrumentUid() {
instrumentUid_ = getDefaultInstance().getInstrumentUid();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*instrument_uid-идентификатора инструмента
*
*
* string instrument_uid = 2;
* @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_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object figi_ = "";
/**
*
*Figi-идентификатора инструмента.
*
*
* string figi = 3;
* @return The figi.
*/
public java.lang.String getFigi() {
java.lang.Object ref = figi_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
figi_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Figi-идентификатора инструмента.
*
*
* string figi = 3;
* @return The bytes for figi.
*/
public com.google.protobuf.ByteString
getFigiBytes() {
java.lang.Object ref = figi_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
figi_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Figi-идентификатора инструмента.
*
*
* string figi = 3;
* @param value The figi to set.
* @return This builder for chaining.
*/
public Builder setFigi(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
figi_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*Figi-идентификатора инструмента.
*
*
* string figi = 3;
* @return This builder for chaining.
*/
public Builder clearFigi() {
figi_ = getDefaultInstance().getFigi();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*Figi-идентификатора инструмента.
*
*
* string figi = 3;
* @param value The bytes for figi to set.
* @return This builder for chaining.
*/
public Builder setFigiBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
figi_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object instrumentType_ = "";
/**
*
*Тип инструмента.
*
*
* string instrument_type = 4;
* @return The instrumentType.
*/
public java.lang.String getInstrumentType() {
java.lang.Object ref = instrumentType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
instrumentType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Тип инструмента.
*
*
* string instrument_type = 4;
* @return The bytes for instrumentType.
*/
public com.google.protobuf.ByteString
getInstrumentTypeBytes() {
java.lang.Object ref = instrumentType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
instrumentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Тип инструмента.
*
*
* string instrument_type = 4;
* @param value The instrumentType to set.
* @return This builder for chaining.
*/
public Builder setInstrumentType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
instrumentType_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*Тип инструмента.
*
*
* string instrument_type = 4;
* @return This builder for chaining.
*/
public Builder clearInstrumentType() {
instrumentType_ = getDefaultInstance().getInstrumentType();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*Тип инструмента.
*
*
* string instrument_type = 4;
* @param value The bytes for instrumentType to set.
* @return This builder for chaining.
*/
public Builder setInstrumentTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
instrumentType_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private ru.tinkoff.piapi.contract.v1.Quotation quantity_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder> quantityBuilder_;
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
* @return Whether the quantity field is set.
*/
public boolean hasQuantity() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
* @return The quantity.
*/
public ru.tinkoff.piapi.contract.v1.Quotation getQuantity() {
if (quantityBuilder_ == null) {
return quantity_ == null ? ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance() : quantity_;
} else {
return quantityBuilder_.getMessage();
}
}
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
*/
public Builder setQuantity(ru.tinkoff.piapi.contract.v1.Quotation value) {
if (quantityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
quantity_ = value;
} else {
quantityBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
*/
public Builder setQuantity(
ru.tinkoff.piapi.contract.v1.Quotation.Builder builderForValue) {
if (quantityBuilder_ == null) {
quantity_ = builderForValue.build();
} else {
quantityBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
*/
public Builder mergeQuantity(ru.tinkoff.piapi.contract.v1.Quotation value) {
if (quantityBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
quantity_ != null &&
quantity_ != ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance()) {
getQuantityBuilder().mergeFrom(value);
} else {
quantity_ = value;
}
} else {
quantityBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
*/
public Builder clearQuantity() {
bitField0_ = (bitField0_ & ~0x00000010);
quantity_ = null;
if (quantityBuilder_ != null) {
quantityBuilder_.dispose();
quantityBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
*/
public ru.tinkoff.piapi.contract.v1.Quotation.Builder getQuantityBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getQuantityFieldBuilder().getBuilder();
}
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
*/
public ru.tinkoff.piapi.contract.v1.QuotationOrBuilder getQuantityOrBuilder() {
if (quantityBuilder_ != null) {
return quantityBuilder_.getMessageOrBuilder();
} else {
return quantity_ == null ?
ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance() : quantity_;
}
}
/**
*
*Количество инструмента в портфеле в штуках.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation quantity = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder>
getQuantityFieldBuilder() {
if (quantityBuilder_ == null) {
quantityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder>(
getQuantity(),
getParentForChildren(),
isClean());
quantity_ = null;
}
return quantityBuilder_;
}
private ru.tinkoff.piapi.contract.v1.MoneyValue averagePositionPrice_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder> averagePositionPriceBuilder_;
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
* @return Whether the averagePositionPrice field is set.
*/
public boolean hasAveragePositionPrice() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
* @return The averagePositionPrice.
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue getAveragePositionPrice() {
if (averagePositionPriceBuilder_ == null) {
return averagePositionPrice_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : averagePositionPrice_;
} else {
return averagePositionPriceBuilder_.getMessage();
}
}
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
*/
public Builder setAveragePositionPrice(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (averagePositionPriceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
averagePositionPrice_ = value;
} else {
averagePositionPriceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
*/
public Builder setAveragePositionPrice(
ru.tinkoff.piapi.contract.v1.MoneyValue.Builder builderForValue) {
if (averagePositionPriceBuilder_ == null) {
averagePositionPrice_ = builderForValue.build();
} else {
averagePositionPriceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
*/
public Builder mergeAveragePositionPrice(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (averagePositionPriceBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
averagePositionPrice_ != null &&
averagePositionPrice_ != ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance()) {
getAveragePositionPriceBuilder().mergeFrom(value);
} else {
averagePositionPrice_ = value;
}
} else {
averagePositionPriceBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
*/
public Builder clearAveragePositionPrice() {
bitField0_ = (bitField0_ & ~0x00000020);
averagePositionPrice_ = null;
if (averagePositionPriceBuilder_ != null) {
averagePositionPriceBuilder_.dispose();
averagePositionPriceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue.Builder getAveragePositionPriceBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getAveragePositionPriceFieldBuilder().getBuilder();
}
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder getAveragePositionPriceOrBuilder() {
if (averagePositionPriceBuilder_ != null) {
return averagePositionPriceBuilder_.getMessageOrBuilder();
} else {
return averagePositionPrice_ == null ?
ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : averagePositionPrice_;
}
}
/**
*
*Средневзвешенная цена позиции. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>
getAveragePositionPriceFieldBuilder() {
if (averagePositionPriceBuilder_ == null) {
averagePositionPriceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>(
getAveragePositionPrice(),
getParentForChildren(),
isClean());
averagePositionPrice_ = null;
}
return averagePositionPriceBuilder_;
}
private ru.tinkoff.piapi.contract.v1.Quotation expectedYield_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder> expectedYieldBuilder_;
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
* @return Whether the expectedYield field is set.
*/
public boolean hasExpectedYield() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
* @return The expectedYield.
*/
public ru.tinkoff.piapi.contract.v1.Quotation getExpectedYield() {
if (expectedYieldBuilder_ == null) {
return expectedYield_ == null ? ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance() : expectedYield_;
} else {
return expectedYieldBuilder_.getMessage();
}
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
*/
public Builder setExpectedYield(ru.tinkoff.piapi.contract.v1.Quotation value) {
if (expectedYieldBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expectedYield_ = value;
} else {
expectedYieldBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
*/
public Builder setExpectedYield(
ru.tinkoff.piapi.contract.v1.Quotation.Builder builderForValue) {
if (expectedYieldBuilder_ == null) {
expectedYield_ = builderForValue.build();
} else {
expectedYieldBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
*/
public Builder mergeExpectedYield(ru.tinkoff.piapi.contract.v1.Quotation value) {
if (expectedYieldBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
expectedYield_ != null &&
expectedYield_ != ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance()) {
getExpectedYieldBuilder().mergeFrom(value);
} else {
expectedYield_ = value;
}
} else {
expectedYieldBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
*/
public Builder clearExpectedYield() {
bitField0_ = (bitField0_ & ~0x00000040);
expectedYield_ = null;
if (expectedYieldBuilder_ != null) {
expectedYieldBuilder_.dispose();
expectedYieldBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
*/
public ru.tinkoff.piapi.contract.v1.Quotation.Builder getExpectedYieldBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getExpectedYieldFieldBuilder().getBuilder();
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
*/
public ru.tinkoff.piapi.contract.v1.QuotationOrBuilder getExpectedYieldOrBuilder() {
if (expectedYieldBuilder_ != null) {
return expectedYieldBuilder_.getMessageOrBuilder();
} else {
return expectedYield_ == null ?
ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance() : expectedYield_;
}
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder>
getExpectedYieldFieldBuilder() {
if (expectedYieldBuilder_ == null) {
expectedYieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder>(
getExpectedYield(),
getParentForChildren(),
isClean());
expectedYield_ = null;
}
return expectedYieldBuilder_;
}
private ru.tinkoff.piapi.contract.v1.Quotation expectedYieldFifo_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder> expectedYieldFifoBuilder_;
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
* @return Whether the expectedYieldFifo field is set.
*/
public boolean hasExpectedYieldFifo() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
* @return The expectedYieldFifo.
*/
public ru.tinkoff.piapi.contract.v1.Quotation getExpectedYieldFifo() {
if (expectedYieldFifoBuilder_ == null) {
return expectedYieldFifo_ == null ? ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance() : expectedYieldFifo_;
} else {
return expectedYieldFifoBuilder_.getMessage();
}
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
*/
public Builder setExpectedYieldFifo(ru.tinkoff.piapi.contract.v1.Quotation value) {
if (expectedYieldFifoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expectedYieldFifo_ = value;
} else {
expectedYieldFifoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
*/
public Builder setExpectedYieldFifo(
ru.tinkoff.piapi.contract.v1.Quotation.Builder builderForValue) {
if (expectedYieldFifoBuilder_ == null) {
expectedYieldFifo_ = builderForValue.build();
} else {
expectedYieldFifoBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
*/
public Builder mergeExpectedYieldFifo(ru.tinkoff.piapi.contract.v1.Quotation value) {
if (expectedYieldFifoBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
expectedYieldFifo_ != null &&
expectedYieldFifo_ != ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance()) {
getExpectedYieldFifoBuilder().mergeFrom(value);
} else {
expectedYieldFifo_ = value;
}
} else {
expectedYieldFifoBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
*/
public Builder clearExpectedYieldFifo() {
bitField0_ = (bitField0_ & ~0x00000080);
expectedYieldFifo_ = null;
if (expectedYieldFifoBuilder_ != null) {
expectedYieldFifoBuilder_.dispose();
expectedYieldFifoBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
*/
public ru.tinkoff.piapi.contract.v1.Quotation.Builder getExpectedYieldFifoBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getExpectedYieldFifoFieldBuilder().getBuilder();
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
*/
public ru.tinkoff.piapi.contract.v1.QuotationOrBuilder getExpectedYieldFifoOrBuilder() {
if (expectedYieldFifoBuilder_ != null) {
return expectedYieldFifoBuilder_.getMessageOrBuilder();
} else {
return expectedYieldFifo_ == null ?
ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance() : expectedYieldFifo_;
}
}
/**
*
*Текущая рассчитанная доходность позиции.
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation expected_yield_fifo = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder>
getExpectedYieldFifoFieldBuilder() {
if (expectedYieldFifoBuilder_ == null) {
expectedYieldFifoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.Quotation, ru.tinkoff.piapi.contract.v1.Quotation.Builder, ru.tinkoff.piapi.contract.v1.QuotationOrBuilder>(
getExpectedYieldFifo(),
getParentForChildren(),
isClean());
expectedYieldFifo_ = null;
}
return expectedYieldFifoBuilder_;
}
private com.google.protobuf.Timestamp expireDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> expireDateBuilder_;
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
* @return Whether the expireDate field is set.
*/
public boolean hasExpireDate() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
* @return The expireDate.
*/
public com.google.protobuf.Timestamp getExpireDate() {
if (expireDateBuilder_ == null) {
return expireDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : expireDate_;
} else {
return expireDateBuilder_.getMessage();
}
}
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
*/
public Builder setExpireDate(com.google.protobuf.Timestamp value) {
if (expireDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
expireDate_ = value;
} else {
expireDateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
*/
public Builder setExpireDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (expireDateBuilder_ == null) {
expireDate_ = builderForValue.build();
} else {
expireDateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
*/
public Builder mergeExpireDate(com.google.protobuf.Timestamp value) {
if (expireDateBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0) &&
expireDate_ != null &&
expireDate_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getExpireDateBuilder().mergeFrom(value);
} else {
expireDate_ = value;
}
} else {
expireDateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
*/
public Builder clearExpireDate() {
bitField0_ = (bitField0_ & ~0x00000100);
expireDate_ = null;
if (expireDateBuilder_ != null) {
expireDateBuilder_.dispose();
expireDateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
*/
public com.google.protobuf.Timestamp.Builder getExpireDateBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getExpireDateFieldBuilder().getBuilder();
}
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
*/
public com.google.protobuf.TimestampOrBuilder getExpireDateOrBuilder() {
if (expireDateBuilder_ != null) {
return expireDateBuilder_.getMessageOrBuilder();
} else {
return expireDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : expireDate_;
}
}
/**
*
*Дата до которой нужно продать виртуальные бумаги, после этой даты виртуальная позиция "сгорит"
*
*
* .google.protobuf.Timestamp expire_date = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getExpireDateFieldBuilder() {
if (expireDateBuilder_ == null) {
expireDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getExpireDate(),
getParentForChildren(),
isClean());
expireDate_ = null;
}
return expireDateBuilder_;
}
private ru.tinkoff.piapi.contract.v1.MoneyValue currentPrice_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder> currentPriceBuilder_;
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
* @return Whether the currentPrice field is set.
*/
public boolean hasCurrentPrice() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
* @return The currentPrice.
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue getCurrentPrice() {
if (currentPriceBuilder_ == null) {
return currentPrice_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : currentPrice_;
} else {
return currentPriceBuilder_.getMessage();
}
}
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
*/
public Builder setCurrentPrice(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (currentPriceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
currentPrice_ = value;
} else {
currentPriceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
*/
public Builder setCurrentPrice(
ru.tinkoff.piapi.contract.v1.MoneyValue.Builder builderForValue) {
if (currentPriceBuilder_ == null) {
currentPrice_ = builderForValue.build();
} else {
currentPriceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
*/
public Builder mergeCurrentPrice(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (currentPriceBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0) &&
currentPrice_ != null &&
currentPrice_ != ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance()) {
getCurrentPriceBuilder().mergeFrom(value);
} else {
currentPrice_ = value;
}
} else {
currentPriceBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
*/
public Builder clearCurrentPrice() {
bitField0_ = (bitField0_ & ~0x00000200);
currentPrice_ = null;
if (currentPriceBuilder_ != null) {
currentPriceBuilder_.dispose();
currentPriceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue.Builder getCurrentPriceBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getCurrentPriceFieldBuilder().getBuilder();
}
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder getCurrentPriceOrBuilder() {
if (currentPriceBuilder_ != null) {
return currentPriceBuilder_.getMessageOrBuilder();
} else {
return currentPrice_ == null ?
ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : currentPrice_;
}
}
/**
*
*Текущая цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue current_price = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>
getCurrentPriceFieldBuilder() {
if (currentPriceBuilder_ == null) {
currentPriceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>(
getCurrentPrice(),
getParentForChildren(),
isClean());
currentPrice_ = null;
}
return currentPriceBuilder_;
}
private ru.tinkoff.piapi.contract.v1.MoneyValue averagePositionPriceFifo_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder> averagePositionPriceFifoBuilder_;
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
* @return Whether the averagePositionPriceFifo field is set.
*/
public boolean hasAveragePositionPriceFifo() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
* @return The averagePositionPriceFifo.
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue getAveragePositionPriceFifo() {
if (averagePositionPriceFifoBuilder_ == null) {
return averagePositionPriceFifo_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : averagePositionPriceFifo_;
} else {
return averagePositionPriceFifoBuilder_.getMessage();
}
}
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
*/
public Builder setAveragePositionPriceFifo(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (averagePositionPriceFifoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
averagePositionPriceFifo_ = value;
} else {
averagePositionPriceFifoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
*/
public Builder setAveragePositionPriceFifo(
ru.tinkoff.piapi.contract.v1.MoneyValue.Builder builderForValue) {
if (averagePositionPriceFifoBuilder_ == null) {
averagePositionPriceFifo_ = builderForValue.build();
} else {
averagePositionPriceFifoBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
*/
public Builder mergeAveragePositionPriceFifo(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (averagePositionPriceFifoBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0) &&
averagePositionPriceFifo_ != null &&
averagePositionPriceFifo_ != ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance()) {
getAveragePositionPriceFifoBuilder().mergeFrom(value);
} else {
averagePositionPriceFifo_ = value;
}
} else {
averagePositionPriceFifoBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
*/
public Builder clearAveragePositionPriceFifo() {
bitField0_ = (bitField0_ & ~0x00000400);
averagePositionPriceFifo_ = null;
if (averagePositionPriceFifoBuilder_ != null) {
averagePositionPriceFifoBuilder_.dispose();
averagePositionPriceFifoBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue.Builder getAveragePositionPriceFifoBuilder() {
bitField0_ |= 0x00000400;
onChanged();
return getAveragePositionPriceFifoFieldBuilder().getBuilder();
}
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder getAveragePositionPriceFifoOrBuilder() {
if (averagePositionPriceFifoBuilder_ != null) {
return averagePositionPriceFifoBuilder_.getMessageOrBuilder();
} else {
return averagePositionPriceFifo_ == null ?
ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : averagePositionPriceFifo_;
}
}
/**
*
*Средняя цена позиции по методу FIFO. **Возможна задержка до секунды для пересчёта**.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue average_position_price_fifo = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>
getAveragePositionPriceFifoFieldBuilder() {
if (averagePositionPriceFifoBuilder_ == null) {
averagePositionPriceFifoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>(
getAveragePositionPriceFifo(),
getParentForChildren(),
isClean());
averagePositionPriceFifo_ = null;
}
return averagePositionPriceFifoBuilder_;
}
@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.VirtualPortfolioPosition)
}
// @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.VirtualPortfolioPosition)
private static final ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition();
}
public static ru.tinkoff.piapi.contract.v1.VirtualPortfolioPosition getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VirtualPortfolioPosition 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.VirtualPortfolioPosition getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}