implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.Operation)
ru.tinkoff.piapi.contract.v1.OperationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_Operation_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_Operation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.Operation.class, ru.tinkoff.piapi.contract.v1.Operation.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.Operation.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
parentOperationId_ = "";
currency_ = "";
payment_ = null;
if (paymentBuilder_ != null) {
paymentBuilder_.dispose();
paymentBuilder_ = null;
}
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
state_ = 0;
quantity_ = 0L;
quantityRest_ = 0L;
figi_ = "";
instrumentType_ = "";
date_ = null;
if (dateBuilder_ != null) {
dateBuilder_.dispose();
dateBuilder_ = null;
}
type_ = "";
operationType_ = 0;
if (tradesBuilder_ == null) {
trades_ = java.util.Collections.emptyList();
} else {
trades_ = null;
tradesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00002000);
assetUid_ = "";
positionUid_ = "";
instrumentUid_ = "";
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_Operation_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Operation getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.Operation.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Operation build() {
ru.tinkoff.piapi.contract.v1.Operation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Operation buildPartial() {
ru.tinkoff.piapi.contract.v1.Operation result = new ru.tinkoff.piapi.contract.v1.Operation(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(ru.tinkoff.piapi.contract.v1.Operation result) {
if (tradesBuilder_ == null) {
if (((bitField0_ & 0x00002000) != 0)) {
trades_ = java.util.Collections.unmodifiableList(trades_);
bitField0_ = (bitField0_ & ~0x00002000);
}
result.trades_ = trades_;
} else {
result.trades_ = tradesBuilder_.build();
}
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.Operation result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.parentOperationId_ = parentOperationId_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.currency_ = currency_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.payment_ = paymentBuilder_ == null
? payment_
: paymentBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.price_ = priceBuilder_ == null
? price_
: priceBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.quantity_ = quantity_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.quantityRest_ = quantityRest_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.figi_ = figi_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.instrumentType_ = instrumentType_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.date_ = dateBuilder_ == null
? date_
: dateBuilder_.build();
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.operationType_ = operationType_;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.assetUid_ = assetUid_;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.positionUid_ = positionUid_;
}
if (((from_bitField0_ & 0x00010000) != 0)) {
result.instrumentUid_ = instrumentUid_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.Operation) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.Operation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.Operation other) {
if (other == ru.tinkoff.piapi.contract.v1.Operation.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getParentOperationId().isEmpty()) {
parentOperationId_ = other.parentOperationId_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getCurrency().isEmpty()) {
currency_ = other.currency_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasPayment()) {
mergePayment(other.getPayment());
}
if (other.hasPrice()) {
mergePrice(other.getPrice());
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (other.getQuantity() != 0L) {
setQuantity(other.getQuantity());
}
if (other.getQuantityRest() != 0L) {
setQuantityRest(other.getQuantityRest());
}
if (!other.getFigi().isEmpty()) {
figi_ = other.figi_;
bitField0_ |= 0x00000100;
onChanged();
}
if (!other.getInstrumentType().isEmpty()) {
instrumentType_ = other.instrumentType_;
bitField0_ |= 0x00000200;
onChanged();
}
if (other.hasDate()) {
mergeDate(other.getDate());
}
if (!other.getType().isEmpty()) {
type_ = other.type_;
bitField0_ |= 0x00000800;
onChanged();
}
if (other.operationType_ != 0) {
setOperationTypeValue(other.getOperationTypeValue());
}
if (tradesBuilder_ == null) {
if (!other.trades_.isEmpty()) {
if (trades_.isEmpty()) {
trades_ = other.trades_;
bitField0_ = (bitField0_ & ~0x00002000);
} else {
ensureTradesIsMutable();
trades_.addAll(other.trades_);
}
onChanged();
}
} else {
if (!other.trades_.isEmpty()) {
if (tradesBuilder_.isEmpty()) {
tradesBuilder_.dispose();
tradesBuilder_ = null;
trades_ = other.trades_;
bitField0_ = (bitField0_ & ~0x00002000);
tradesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTradesFieldBuilder() : null;
} else {
tradesBuilder_.addAllMessages(other.trades_);
}
}
}
if (!other.getAssetUid().isEmpty()) {
assetUid_ = other.assetUid_;
bitField0_ |= 0x00004000;
onChanged();
}
if (!other.getPositionUid().isEmpty()) {
positionUid_ = other.positionUid_;
bitField0_ |= 0x00008000;
onChanged();
}
if (!other.getInstrumentUid().isEmpty()) {
instrumentUid_ = other.instrumentUid_;
bitField0_ |= 0x00010000;
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: {
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
parentOperationId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
currency_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getPaymentFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
input.readMessage(
getPriceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 48: {
state_ = input.readEnum();
bitField0_ |= 0x00000020;
break;
} // case 48
case 56: {
quantity_ = input.readInt64();
bitField0_ |= 0x00000040;
break;
} // case 56
case 64: {
quantityRest_ = input.readInt64();
bitField0_ |= 0x00000080;
break;
} // case 64
case 74: {
figi_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 74
case 82: {
instrumentType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000200;
break;
} // case 82
case 90: {
input.readMessage(
getDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000400;
break;
} // case 90
case 98: {
type_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000800;
break;
} // case 98
case 104: {
operationType_ = input.readEnum();
bitField0_ |= 0x00001000;
break;
} // case 104
case 114: {
ru.tinkoff.piapi.contract.v1.OperationTrade m =
input.readMessage(
ru.tinkoff.piapi.contract.v1.OperationTrade.parser(),
extensionRegistry);
if (tradesBuilder_ == null) {
ensureTradesIsMutable();
trades_.add(m);
} else {
tradesBuilder_.addMessage(m);
}
break;
} // case 114
case 130: {
assetUid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00004000;
break;
} // case 130
case 138: {
positionUid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00008000;
break;
} // case 138
case 146: {
instrumentUid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00010000;
break;
} // case 146
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 id_ = "";
/**
*
*Идентификатор операции.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Идентификатор операции.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Идентификатор операции.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Идентификатор операции.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*Идентификатор операции.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
id_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object parentOperationId_ = "";
/**
*
*Идентификатор родительской операции.
*
*
* string parent_operation_id = 2;
* @return The parentOperationId.
*/
public java.lang.String getParentOperationId() {
java.lang.Object ref = parentOperationId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parentOperationId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Идентификатор родительской операции.
*
*
* string parent_operation_id = 2;
* @return The bytes for parentOperationId.
*/
public com.google.protobuf.ByteString
getParentOperationIdBytes() {
java.lang.Object ref = parentOperationId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parentOperationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Идентификатор родительской операции.
*
*
* string parent_operation_id = 2;
* @param value The parentOperationId to set.
* @return This builder for chaining.
*/
public Builder setParentOperationId(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
parentOperationId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Идентификатор родительской операции.
*
*
* string parent_operation_id = 2;
* @return This builder for chaining.
*/
public Builder clearParentOperationId() {
parentOperationId_ = getDefaultInstance().getParentOperationId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*Идентификатор родительской операции.
*
*
* string parent_operation_id = 2;
* @param value The bytes for parentOperationId to set.
* @return This builder for chaining.
*/
public Builder setParentOperationIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
parentOperationId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object currency_ = "";
/**
*
*Валюта операции.
*
*
* string currency = 3;
* @return The currency.
*/
public java.lang.String getCurrency() {
java.lang.Object ref = currency_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
currency_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Валюта операции.
*
*
* string currency = 3;
* @return The bytes for currency.
*/
public com.google.protobuf.ByteString
getCurrencyBytes() {
java.lang.Object ref = currency_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
currency_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Валюта операции.
*
*
* string currency = 3;
* @param value The currency to set.
* @return This builder for chaining.
*/
public Builder setCurrency(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
currency_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*Валюта операции.
*
*
* string currency = 3;
* @return This builder for chaining.
*/
public Builder clearCurrency() {
currency_ = getDefaultInstance().getCurrency();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*Валюта операции.
*
*
* string currency = 3;
* @param value The bytes for currency to set.
* @return This builder for chaining.
*/
public Builder setCurrencyBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
currency_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private ru.tinkoff.piapi.contract.v1.MoneyValue payment_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder> paymentBuilder_;
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
* @return Whether the payment field is set.
*/
public boolean hasPayment() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
* @return The payment.
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue getPayment() {
if (paymentBuilder_ == null) {
return payment_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : payment_;
} else {
return paymentBuilder_.getMessage();
}
}
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
*/
public Builder setPayment(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (paymentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
payment_ = value;
} else {
paymentBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
*/
public Builder setPayment(
ru.tinkoff.piapi.contract.v1.MoneyValue.Builder builderForValue) {
if (paymentBuilder_ == null) {
payment_ = builderForValue.build();
} else {
paymentBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
*/
public Builder mergePayment(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (paymentBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
payment_ != null &&
payment_ != ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance()) {
getPaymentBuilder().mergeFrom(value);
} else {
payment_ = value;
}
} else {
paymentBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
*/
public Builder clearPayment() {
bitField0_ = (bitField0_ & ~0x00000008);
payment_ = null;
if (paymentBuilder_ != null) {
paymentBuilder_.dispose();
paymentBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue.Builder getPaymentBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getPaymentFieldBuilder().getBuilder();
}
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder getPaymentOrBuilder() {
if (paymentBuilder_ != null) {
return paymentBuilder_.getMessageOrBuilder();
} else {
return payment_ == null ?
ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : payment_;
}
}
/**
*
*Сумма операции.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue payment = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>
getPaymentFieldBuilder() {
if (paymentBuilder_ == null) {
paymentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>(
getPayment(),
getParentForChildren(),
isClean());
payment_ = null;
}
return paymentBuilder_;
}
private ru.tinkoff.piapi.contract.v1.MoneyValue price_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder> priceBuilder_;
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
* @return Whether the price field is set.
*/
public boolean hasPrice() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
* @return The price.
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue getPrice() {
if (priceBuilder_ == null) {
return price_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : price_;
} else {
return priceBuilder_.getMessage();
}
}
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
*/
public Builder setPrice(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (priceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
price_ = value;
} else {
priceBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
*/
public Builder setPrice(
ru.tinkoff.piapi.contract.v1.MoneyValue.Builder builderForValue) {
if (priceBuilder_ == null) {
price_ = builderForValue.build();
} else {
priceBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
*/
public Builder mergePrice(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (priceBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
price_ != null &&
price_ != ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance()) {
getPriceBuilder().mergeFrom(value);
} else {
price_ = value;
}
} else {
priceBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
*/
public Builder clearPrice() {
bitField0_ = (bitField0_ & ~0x00000010);
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue.Builder getPriceBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getPriceFieldBuilder().getBuilder();
}
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder getPriceOrBuilder() {
if (priceBuilder_ != null) {
return priceBuilder_.getMessageOrBuilder();
} else {
return price_ == null ?
ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : price_;
}
}
/**
*
*Цена операции за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>
getPriceFieldBuilder() {
if (priceBuilder_ == null) {
priceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>(
getPrice(),
getParentForChildren(),
isClean());
price_ = null;
}
return priceBuilder_;
}
private int state_ = 0;
/**
*
*Статус операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationState state = 6;
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override public int getStateValue() {
return state_;
}
/**
*
*Статус операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationState state = 6;
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Статус операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationState state = 6;
* @return The state.
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.OperationState getState() {
ru.tinkoff.piapi.contract.v1.OperationState result = ru.tinkoff.piapi.contract.v1.OperationState.forNumber(state_);
return result == null ? ru.tinkoff.piapi.contract.v1.OperationState.UNRECOGNIZED : result;
}
/**
*
*Статус операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationState state = 6;
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(ru.tinkoff.piapi.contract.v1.OperationState value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*Статус операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationState state = 6;
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000020);
state_ = 0;
onChanged();
return this;
}
private long quantity_ ;
/**
*
*Количество единиц инструмента.
*
*
* int64 quantity = 7;
* @return The quantity.
*/
@java.lang.Override
public long getQuantity() {
return quantity_;
}
/**
*
*Количество единиц инструмента.
*
*
* int64 quantity = 7;
* @param value The quantity to set.
* @return This builder for chaining.
*/
public Builder setQuantity(long value) {
quantity_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Количество единиц инструмента.
*
*
* int64 quantity = 7;
* @return This builder for chaining.
*/
public Builder clearQuantity() {
bitField0_ = (bitField0_ & ~0x00000040);
quantity_ = 0L;
onChanged();
return this;
}
private long quantityRest_ ;
/**
*
*Неисполненный остаток по сделке.
*
*
* int64 quantity_rest = 8;
* @return The quantityRest.
*/
@java.lang.Override
public long getQuantityRest() {
return quantityRest_;
}
/**
*
*Неисполненный остаток по сделке.
*
*
* int64 quantity_rest = 8;
* @param value The quantityRest to set.
* @return This builder for chaining.
*/
public Builder setQuantityRest(long value) {
quantityRest_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*Неисполненный остаток по сделке.
*
*
* int64 quantity_rest = 8;
* @return This builder for chaining.
*/
public Builder clearQuantityRest() {
bitField0_ = (bitField0_ & ~0x00000080);
quantityRest_ = 0L;
onChanged();
return this;
}
private java.lang.Object figi_ = "";
/**
*
*Figi-идентификатор инструмента, связанного с операцией.
*
*
* string figi = 9;
* @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 = 9;
* @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 = 9;
* @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_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*Figi-идентификатор инструмента, связанного с операцией.
*
*
* string figi = 9;
* @return This builder for chaining.
*/
public Builder clearFigi() {
figi_ = getDefaultInstance().getFigi();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*Figi-идентификатор инструмента, связанного с операцией.
*
*
* string figi = 9;
* @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_ |= 0x00000100;
onChanged();
return this;
}
private java.lang.Object instrumentType_ = "";
/**
*
*Тип инструмента. Возможные значения: </br>**bond** — облигация; </br>**share** — акция; </br>**currency** — валюта; </br>**etf** — фонд; </br>**futures** — фьючерс.
*
*
* string instrument_type = 10;
* @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;
}
}
/**
*
*Тип инструмента. Возможные значения: </br>**bond** — облигация; </br>**share** — акция; </br>**currency** — валюта; </br>**etf** — фонд; </br>**futures** — фьючерс.
*
*
* string instrument_type = 10;
* @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;
}
}
/**
*
*Тип инструмента. Возможные значения: </br>**bond** — облигация; </br>**share** — акция; </br>**currency** — валюта; </br>**etf** — фонд; </br>**futures** — фьючерс.
*
*
* string instrument_type = 10;
* @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_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*Тип инструмента. Возможные значения: </br>**bond** — облигация; </br>**share** — акция; </br>**currency** — валюта; </br>**etf** — фонд; </br>**futures** — фьючерс.
*
*
* string instrument_type = 10;
* @return This builder for chaining.
*/
public Builder clearInstrumentType() {
instrumentType_ = getDefaultInstance().getInstrumentType();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
*Тип инструмента. Возможные значения: </br>**bond** — облигация; </br>**share** — акция; </br>**currency** — валюта; </br>**etf** — фонд; </br>**futures** — фьючерс.
*
*
* string instrument_type = 10;
* @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_ |= 0x00000200;
onChanged();
return this;
}
private com.google.protobuf.Timestamp date_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> dateBuilder_;
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
* @return Whether the date field is set.
*/
public boolean hasDate() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
* @return The date.
*/
public com.google.protobuf.Timestamp getDate() {
if (dateBuilder_ == null) {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
} else {
return dateBuilder_.getMessage();
}
}
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
*/
public Builder setDate(com.google.protobuf.Timestamp value) {
if (dateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
date_ = value;
} else {
dateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
*/
public Builder setDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (dateBuilder_ == null) {
date_ = builderForValue.build();
} else {
dateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
*/
public Builder mergeDate(com.google.protobuf.Timestamp value) {
if (dateBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0) &&
date_ != null &&
date_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getDateBuilder().mergeFrom(value);
} else {
date_ = value;
}
} else {
dateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
*/
public Builder clearDate() {
bitField0_ = (bitField0_ & ~0x00000400);
date_ = null;
if (dateBuilder_ != null) {
dateBuilder_.dispose();
dateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
*/
public com.google.protobuf.Timestamp.Builder getDateBuilder() {
bitField0_ |= 0x00000400;
onChanged();
return getDateFieldBuilder().getBuilder();
}
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
*/
public com.google.protobuf.TimestampOrBuilder getDateOrBuilder() {
if (dateBuilder_ != null) {
return dateBuilder_.getMessageOrBuilder();
} else {
return date_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : date_;
}
}
/**
*
*Дата и время операции в формате часовом поясе UTC.
*
*
* .google.protobuf.Timestamp date = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getDateFieldBuilder() {
if (dateBuilder_ == null) {
dateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getDate(),
getParentForChildren(),
isClean());
date_ = null;
}
return dateBuilder_;
}
private java.lang.Object type_ = "";
/**
*
*Текстовое описание типа операции.
*
*
* string type = 12;
* @return The type.
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
type_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Текстовое описание типа операции.
*
*
* string type = 12;
* @return The bytes for type.
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Текстовое описание типа операции.
*
*
* string type = 12;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
type_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*Текстовое описание типа операции.
*
*
* string type = 12;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
/**
*
*Текстовое описание типа операции.
*
*
* string type = 12;
* @param value The bytes for type to set.
* @return This builder for chaining.
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
type_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
private int operationType_ = 0;
/**
*
*Тип операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationType operation_type = 13;
* @return The enum numeric value on the wire for operationType.
*/
@java.lang.Override public int getOperationTypeValue() {
return operationType_;
}
/**
*
*Тип операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationType operation_type = 13;
* @param value The enum numeric value on the wire for operationType to set.
* @return This builder for chaining.
*/
public Builder setOperationTypeValue(int value) {
operationType_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*Тип операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationType operation_type = 13;
* @return The operationType.
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.OperationType getOperationType() {
ru.tinkoff.piapi.contract.v1.OperationType result = ru.tinkoff.piapi.contract.v1.OperationType.forNumber(operationType_);
return result == null ? ru.tinkoff.piapi.contract.v1.OperationType.UNRECOGNIZED : result;
}
/**
*
*Тип операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationType operation_type = 13;
* @param value The operationType to set.
* @return This builder for chaining.
*/
public Builder setOperationType(ru.tinkoff.piapi.contract.v1.OperationType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00001000;
operationType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*Тип операции.
*
*
* .tinkoff.public.invest.api.contract.v1.OperationType operation_type = 13;
* @return This builder for chaining.
*/
public Builder clearOperationType() {
bitField0_ = (bitField0_ & ~0x00001000);
operationType_ = 0;
onChanged();
return this;
}
private java.util.List trades_ =
java.util.Collections.emptyList();
private void ensureTradesIsMutable() {
if (!((bitField0_ & 0x00002000) != 0)) {
trades_ = new java.util.ArrayList(trades_);
bitField0_ |= 0x00002000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.OperationTrade, ru.tinkoff.piapi.contract.v1.OperationTrade.Builder, ru.tinkoff.piapi.contract.v1.OperationTradeOrBuilder> tradesBuilder_;
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public java.util.List getTradesList() {
if (tradesBuilder_ == null) {
return java.util.Collections.unmodifiableList(trades_);
} else {
return tradesBuilder_.getMessageList();
}
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public int getTradesCount() {
if (tradesBuilder_ == null) {
return trades_.size();
} else {
return tradesBuilder_.getCount();
}
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public ru.tinkoff.piapi.contract.v1.OperationTrade getTrades(int index) {
if (tradesBuilder_ == null) {
return trades_.get(index);
} else {
return tradesBuilder_.getMessage(index);
}
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder setTrades(
int index, ru.tinkoff.piapi.contract.v1.OperationTrade value) {
if (tradesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTradesIsMutable();
trades_.set(index, value);
onChanged();
} else {
tradesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder setTrades(
int index, ru.tinkoff.piapi.contract.v1.OperationTrade.Builder builderForValue) {
if (tradesBuilder_ == null) {
ensureTradesIsMutable();
trades_.set(index, builderForValue.build());
onChanged();
} else {
tradesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder addTrades(ru.tinkoff.piapi.contract.v1.OperationTrade value) {
if (tradesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTradesIsMutable();
trades_.add(value);
onChanged();
} else {
tradesBuilder_.addMessage(value);
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder addTrades(
int index, ru.tinkoff.piapi.contract.v1.OperationTrade value) {
if (tradesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTradesIsMutable();
trades_.add(index, value);
onChanged();
} else {
tradesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder addTrades(
ru.tinkoff.piapi.contract.v1.OperationTrade.Builder builderForValue) {
if (tradesBuilder_ == null) {
ensureTradesIsMutable();
trades_.add(builderForValue.build());
onChanged();
} else {
tradesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder addTrades(
int index, ru.tinkoff.piapi.contract.v1.OperationTrade.Builder builderForValue) {
if (tradesBuilder_ == null) {
ensureTradesIsMutable();
trades_.add(index, builderForValue.build());
onChanged();
} else {
tradesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder addAllTrades(
java.lang.Iterable extends ru.tinkoff.piapi.contract.v1.OperationTrade> values) {
if (tradesBuilder_ == null) {
ensureTradesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, trades_);
onChanged();
} else {
tradesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder clearTrades() {
if (tradesBuilder_ == null) {
trades_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00002000);
onChanged();
} else {
tradesBuilder_.clear();
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public Builder removeTrades(int index) {
if (tradesBuilder_ == null) {
ensureTradesIsMutable();
trades_.remove(index);
onChanged();
} else {
tradesBuilder_.remove(index);
}
return this;
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public ru.tinkoff.piapi.contract.v1.OperationTrade.Builder getTradesBuilder(
int index) {
return getTradesFieldBuilder().getBuilder(index);
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public ru.tinkoff.piapi.contract.v1.OperationTradeOrBuilder getTradesOrBuilder(
int index) {
if (tradesBuilder_ == null) {
return trades_.get(index); } else {
return tradesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public java.util.List extends ru.tinkoff.piapi.contract.v1.OperationTradeOrBuilder>
getTradesOrBuilderList() {
if (tradesBuilder_ != null) {
return tradesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(trades_);
}
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public ru.tinkoff.piapi.contract.v1.OperationTrade.Builder addTradesBuilder() {
return getTradesFieldBuilder().addBuilder(
ru.tinkoff.piapi.contract.v1.OperationTrade.getDefaultInstance());
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public ru.tinkoff.piapi.contract.v1.OperationTrade.Builder addTradesBuilder(
int index) {
return getTradesFieldBuilder().addBuilder(
index, ru.tinkoff.piapi.contract.v1.OperationTrade.getDefaultInstance());
}
/**
*
*Массив сделок.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.OperationTrade trades = 14;
*/
public java.util.List
getTradesBuilderList() {
return getTradesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.OperationTrade, ru.tinkoff.piapi.contract.v1.OperationTrade.Builder, ru.tinkoff.piapi.contract.v1.OperationTradeOrBuilder>
getTradesFieldBuilder() {
if (tradesBuilder_ == null) {
tradesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.OperationTrade, ru.tinkoff.piapi.contract.v1.OperationTrade.Builder, ru.tinkoff.piapi.contract.v1.OperationTradeOrBuilder>(
trades_,
((bitField0_ & 0x00002000) != 0),
getParentForChildren(),
isClean());
trades_ = null;
}
return tradesBuilder_;
}
private java.lang.Object assetUid_ = "";
/**
*
*Идентификатор актива
*
*
* string asset_uid = 16;
* @return The assetUid.
*/
public java.lang.String getAssetUid() {
java.lang.Object ref = assetUid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
assetUid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Идентификатор актива
*
*
* string asset_uid = 16;
* @return The bytes for assetUid.
*/
public com.google.protobuf.ByteString
getAssetUidBytes() {
java.lang.Object ref = assetUid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
assetUid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Идентификатор актива
*
*
* string asset_uid = 16;
* @param value The assetUid to set.
* @return This builder for chaining.
*/
public Builder setAssetUid(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
assetUid_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*Идентификатор актива
*
*
* string asset_uid = 16;
* @return This builder for chaining.
*/
public Builder clearAssetUid() {
assetUid_ = getDefaultInstance().getAssetUid();
bitField0_ = (bitField0_ & ~0x00004000);
onChanged();
return this;
}
/**
*
*Идентификатор актива
*
*
* string asset_uid = 16;
* @param value The bytes for assetUid to set.
* @return This builder for chaining.
*/
public Builder setAssetUidBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
assetUid_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
private java.lang.Object positionUid_ = "";
/**
*
*position_uid-идентификатора инструмента.
*
*
* string position_uid = 17;
* @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 = 17;
* @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 = 17;
* @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_ |= 0x00008000;
onChanged();
return this;
}
/**
*
*position_uid-идентификатора инструмента.
*
*
* string position_uid = 17;
* @return This builder for chaining.
*/
public Builder clearPositionUid() {
positionUid_ = getDefaultInstance().getPositionUid();
bitField0_ = (bitField0_ & ~0x00008000);
onChanged();
return this;
}
/**
*
*position_uid-идентификатора инструмента.
*
*
* string position_uid = 17;
* @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_ |= 0x00008000;
onChanged();
return this;
}
private java.lang.Object instrumentUid_ = "";
/**
*
*Уникальный идентификатор инструмента.
*
*
* string instrument_uid = 18;
* @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 = 18;
* @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 = 18;
* @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_ |= 0x00010000;
onChanged();
return this;
}
/**
*
*Уникальный идентификатор инструмента.
*
*
* string instrument_uid = 18;
* @return This builder for chaining.
*/
public Builder clearInstrumentUid() {
instrumentUid_ = getDefaultInstance().getInstrumentUid();
bitField0_ = (bitField0_ & ~0x00010000);
onChanged();
return this;
}
/**
*
*Уникальный идентификатор инструмента.
*
*
* string instrument_uid = 18;
* @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_ |= 0x00010000;
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.Operation)
}
// @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.Operation)
private static final ru.tinkoff.piapi.contract.v1.Operation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.Operation();
}
public static ru.tinkoff.piapi.contract.v1.Operation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Operation 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.Operation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}