Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
*
* repeated .tinkoff.public.invest.api.contract.v1.PositionsOptions options = 5;
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.PositionsOptionsOrBuilder getOptionsOrBuilder(
int index) {
return options_.get(index);
}
public static final int DATE_FIELD_NUMBER = 6;
private com.google.protobuf.Timestamp date_;
/**
*
*Дата и время операции в формате UTC.
*
*
* .google.protobuf.Timestamp date = 6;
* @return Whether the date field is set.
*/
@java.lang.Override
public boolean hasDate() {
return date_ != null;
}
/**
*
*Дата и время операции в формате UTC.
*
*
* .google.protobuf.Timestamp date = 6;
* @return The date.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getDate() {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
}
/**
*
*Дата и время операции в формате UTC.
*
*
* .google.protobuf.Timestamp date = 6;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getDateOrBuilder() {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, accountId_);
}
for (int i = 0; i < money_.size(); i++) {
output.writeMessage(2, money_.get(i));
}
for (int i = 0; i < securities_.size(); i++) {
output.writeMessage(3, securities_.get(i));
}
for (int i = 0; i < futures_.size(); i++) {
output.writeMessage(4, futures_.get(i));
}
for (int i = 0; i < options_.size(); i++) {
output.writeMessage(5, options_.get(i));
}
if (date_ != null) {
output.writeMessage(6, getDate());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accountId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, accountId_);
}
for (int i = 0; i < money_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, money_.get(i));
}
for (int i = 0; i < securities_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, securities_.get(i));
}
for (int i = 0; i < futures_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, futures_.get(i));
}
for (int i = 0; i < options_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, options_.get(i));
}
if (date_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getDate());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof ru.tinkoff.piapi.contract.v1.PositionData)) {
return super.equals(obj);
}
ru.tinkoff.piapi.contract.v1.PositionData other = (ru.tinkoff.piapi.contract.v1.PositionData) obj;
if (!getAccountId()
.equals(other.getAccountId())) return false;
if (!getMoneyList()
.equals(other.getMoneyList())) return false;
if (!getSecuritiesList()
.equals(other.getSecuritiesList())) return false;
if (!getFuturesList()
.equals(other.getFuturesList())) return false;
if (!getOptionsList()
.equals(other.getOptionsList())) return false;
if (hasDate() != other.hasDate()) return false;
if (hasDate()) {
if (!getDate()
.equals(other.getDate())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ACCOUNT_ID_FIELD_NUMBER;
hash = (53 * hash) + getAccountId().hashCode();
if (getMoneyCount() > 0) {
hash = (37 * hash) + MONEY_FIELD_NUMBER;
hash = (53 * hash) + getMoneyList().hashCode();
}
if (getSecuritiesCount() > 0) {
hash = (37 * hash) + SECURITIES_FIELD_NUMBER;
hash = (53 * hash) + getSecuritiesList().hashCode();
}
if (getFuturesCount() > 0) {
hash = (37 * hash) + FUTURES_FIELD_NUMBER;
hash = (53 * hash) + getFuturesList().hashCode();
}
if (getOptionsCount() > 0) {
hash = (37 * hash) + OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + getOptionsList().hashCode();
}
if (hasDate()) {
hash = (37 * hash) + DATE_FIELD_NUMBER;
hash = (53 * hash) + getDate().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.PositionData parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(ru.tinkoff.piapi.contract.v1.PositionData prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*Данные о позиции портфеля.
*
*
* Protobuf type {@code tinkoff.public.invest.api.contract.v1.PositionData}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.PositionData)
ru.tinkoff.piapi.contract.v1.PositionDataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_PositionData_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_PositionData_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.PositionData.class, ru.tinkoff.piapi.contract.v1.PositionData.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.PositionData.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
accountId_ = "";
if (moneyBuilder_ == null) {
money_ = java.util.Collections.emptyList();
} else {
money_ = null;
moneyBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (securitiesBuilder_ == null) {
securities_ = java.util.Collections.emptyList();
} else {
securities_ = null;
securitiesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (futuresBuilder_ == null) {
futures_ = java.util.Collections.emptyList();
} else {
futures_ = null;
futuresBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (optionsBuilder_ == null) {
options_ = java.util.Collections.emptyList();
} else {
options_ = null;
optionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
date_ = null;
if (dateBuilder_ != null) {
dateBuilder_.dispose();
dateBuilder_ = 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_PositionData_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.PositionData getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.PositionData.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.PositionData build() {
ru.tinkoff.piapi.contract.v1.PositionData result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.PositionData buildPartial() {
ru.tinkoff.piapi.contract.v1.PositionData result = new ru.tinkoff.piapi.contract.v1.PositionData(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(ru.tinkoff.piapi.contract.v1.PositionData result) {
if (moneyBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
money_ = java.util.Collections.unmodifiableList(money_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.money_ = money_;
} else {
result.money_ = moneyBuilder_.build();
}
if (securitiesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
securities_ = java.util.Collections.unmodifiableList(securities_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.securities_ = securities_;
} else {
result.securities_ = securitiesBuilder_.build();
}
if (futuresBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
futures_ = java.util.Collections.unmodifiableList(futures_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.futures_ = futures_;
} else {
result.futures_ = futuresBuilder_.build();
}
if (optionsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
options_ = java.util.Collections.unmodifiableList(options_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.options_ = options_;
} else {
result.options_ = optionsBuilder_.build();
}
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.PositionData result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.accountId_ = accountId_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.date_ = dateBuilder_ == null
? date_
: dateBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.PositionData) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.PositionData)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.PositionData other) {
if (other == ru.tinkoff.piapi.contract.v1.PositionData.getDefaultInstance()) return this;
if (!other.getAccountId().isEmpty()) {
accountId_ = other.accountId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (moneyBuilder_ == null) {
if (!other.money_.isEmpty()) {
if (money_.isEmpty()) {
money_ = other.money_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureMoneyIsMutable();
money_.addAll(other.money_);
}
onChanged();
}
} else {
if (!other.money_.isEmpty()) {
if (moneyBuilder_.isEmpty()) {
moneyBuilder_.dispose();
moneyBuilder_ = null;
money_ = other.money_;
bitField0_ = (bitField0_ & ~0x00000002);
moneyBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getMoneyFieldBuilder() : null;
} else {
moneyBuilder_.addAllMessages(other.money_);
}
}
}
if (securitiesBuilder_ == null) {
if (!other.securities_.isEmpty()) {
if (securities_.isEmpty()) {
securities_ = other.securities_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureSecuritiesIsMutable();
securities_.addAll(other.securities_);
}
onChanged();
}
} else {
if (!other.securities_.isEmpty()) {
if (securitiesBuilder_.isEmpty()) {
securitiesBuilder_.dispose();
securitiesBuilder_ = null;
securities_ = other.securities_;
bitField0_ = (bitField0_ & ~0x00000004);
securitiesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSecuritiesFieldBuilder() : null;
} else {
securitiesBuilder_.addAllMessages(other.securities_);
}
}
}
if (futuresBuilder_ == null) {
if (!other.futures_.isEmpty()) {
if (futures_.isEmpty()) {
futures_ = other.futures_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureFuturesIsMutable();
futures_.addAll(other.futures_);
}
onChanged();
}
} else {
if (!other.futures_.isEmpty()) {
if (futuresBuilder_.isEmpty()) {
futuresBuilder_.dispose();
futuresBuilder_ = null;
futures_ = other.futures_;
bitField0_ = (bitField0_ & ~0x00000008);
futuresBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFuturesFieldBuilder() : null;
} else {
futuresBuilder_.addAllMessages(other.futures_);
}
}
}
if (optionsBuilder_ == null) {
if (!other.options_.isEmpty()) {
if (options_.isEmpty()) {
options_ = other.options_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureOptionsIsMutable();
options_.addAll(other.options_);
}
onChanged();
}
} else {
if (!other.options_.isEmpty()) {
if (optionsBuilder_.isEmpty()) {
optionsBuilder_.dispose();
optionsBuilder_ = null;
options_ = other.options_;
bitField0_ = (bitField0_ & ~0x00000010);
optionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getOptionsFieldBuilder() : null;
} else {
optionsBuilder_.addAllMessages(other.options_);
}
}
}
if (other.hasDate()) {
mergeDate(other.getDate());
}
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: {
accountId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
ru.tinkoff.piapi.contract.v1.PositionsMoney m =
input.readMessage(
ru.tinkoff.piapi.contract.v1.PositionsMoney.parser(),
extensionRegistry);
if (moneyBuilder_ == null) {
ensureMoneyIsMutable();
money_.add(m);
} else {
moneyBuilder_.addMessage(m);
}
break;
} // case 18
case 26: {
ru.tinkoff.piapi.contract.v1.PositionsSecurities m =
input.readMessage(
ru.tinkoff.piapi.contract.v1.PositionsSecurities.parser(),
extensionRegistry);
if (securitiesBuilder_ == null) {
ensureSecuritiesIsMutable();
securities_.add(m);
} else {
securitiesBuilder_.addMessage(m);
}
break;
} // case 26
case 34: {
ru.tinkoff.piapi.contract.v1.PositionsFutures m =
input.readMessage(
ru.tinkoff.piapi.contract.v1.PositionsFutures.parser(),
extensionRegistry);
if (futuresBuilder_ == null) {
ensureFuturesIsMutable();
futures_.add(m);
} else {
futuresBuilder_.addMessage(m);
}
break;
} // case 34
case 42: {
ru.tinkoff.piapi.contract.v1.PositionsOptions m =
input.readMessage(
ru.tinkoff.piapi.contract.v1.PositionsOptions.parser(),
extensionRegistry);
if (optionsBuilder_ == null) {
ensureOptionsIsMutable();
options_.add(m);
} else {
optionsBuilder_.addMessage(m);
}
break;
} // case 42
case 50: {
input.readMessage(
getDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
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 accountId_ = "";
/**
*
*
* .google.protobuf.Timestamp date = 6;
* @return Whether the date field is set.
*/
public boolean hasDate() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*Дата и время операции в формате UTC.
*
*
* .google.protobuf.Timestamp date = 6;
* @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 = 6;
*/
public Builder setDate(com.google.protobuf.Timestamp value) {
if (dateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
date_ = value;
} else {
dateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*