Please wait. This can take some minutes ...
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.
ru.tinkoff.piapi.contract.v1.AssetInstrument Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: instruments.proto
package ru.tinkoff.piapi.contract.v1;
/**
*
*Идентификаторы инструмента.
*
*
* Protobuf type {@code tinkoff.public.invest.api.contract.v1.AssetInstrument}
*/
public final class AssetInstrument extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.AssetInstrument)
AssetInstrumentOrBuilder {
private static final long serialVersionUID = 0L;
// Use AssetInstrument.newBuilder() to construct.
private AssetInstrument(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AssetInstrument() {
uid_ = "";
figi_ = "";
instrumentType_ = "";
ticker_ = "";
classCode_ = "";
links_ = java.util.Collections.emptyList();
instrumentKind_ = 0;
positionUid_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AssetInstrument();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_AssetInstrument_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_AssetInstrument_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.AssetInstrument.class, ru.tinkoff.piapi.contract.v1.AssetInstrument.Builder.class);
}
public static final int UID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object uid_ = "";
/**
*
*uid идентификатор инструмента.
*
*
* string uid = 1;
* @return The uid.
*/
@java.lang.Override
public java.lang.String getUid() {
java.lang.Object ref = uid_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uid_ = s;
return s;
}
}
/**
*
*uid идентификатор инструмента.
*
*
* string uid = 1;
* @return The bytes for uid.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FIGI_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object figi_ = "";
/**
*
*figi идентификатор инструмента.
*
*
* string figi = 2;
* @return The figi.
*/
@java.lang.Override
public java.lang.String getFigi() {
java.lang.Object ref = figi_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
figi_ = s;
return s;
}
}
/**
*
*figi идентификатор инструмента.
*
*
* string figi = 2;
* @return The bytes for figi.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFigiBytes() {
java.lang.Object ref = figi_;
if (ref instanceof java.lang.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;
}
}
public static final int INSTRUMENT_TYPE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object instrumentType_ = "";
/**
*
*Тип инструмента.
*
*
* string instrument_type = 3;
* @return The instrumentType.
*/
@java.lang.Override
public java.lang.String getInstrumentType() {
java.lang.Object ref = instrumentType_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
instrumentType_ = s;
return s;
}
}
/**
*
*Тип инструмента.
*
*
* string instrument_type = 3;
* @return The bytes for instrumentType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getInstrumentTypeBytes() {
java.lang.Object ref = instrumentType_;
if (ref instanceof java.lang.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;
}
}
public static final int TICKER_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object ticker_ = "";
/**
*
*Тикер инструмента.
*
*
* string ticker = 4;
* @return The ticker.
*/
@java.lang.Override
public java.lang.String getTicker() {
java.lang.Object ref = ticker_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ticker_ = s;
return s;
}
}
/**
*
*Тикер инструмента.
*
*
* string ticker = 4;
* @return The bytes for ticker.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTickerBytes() {
java.lang.Object ref = ticker_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ticker_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CLASS_CODE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object classCode_ = "";
/**
*
*Класс-код (секция торгов).
*
*
* string class_code = 5;
* @return The classCode.
*/
@java.lang.Override
public java.lang.String getClassCode() {
java.lang.Object ref = classCode_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
classCode_ = s;
return s;
}
}
/**
*
*Класс-код (секция торгов).
*
*
* string class_code = 5;
* @return The bytes for classCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClassCodeBytes() {
java.lang.Object ref = classCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
classCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LINKS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private java.util.List links_;
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
@java.lang.Override
public java.util.List getLinksList() {
return links_;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
@java.lang.Override
public java.util.List extends ru.tinkoff.piapi.contract.v1.InstrumentLinkOrBuilder>
getLinksOrBuilderList() {
return links_;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
@java.lang.Override
public int getLinksCount() {
return links_.size();
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.InstrumentLink getLinks(int index) {
return links_.get(index);
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.InstrumentLinkOrBuilder getLinksOrBuilder(
int index) {
return links_.get(index);
}
public static final int INSTRUMENT_KIND_FIELD_NUMBER = 10;
private int instrumentKind_ = 0;
/**
*
*Тип инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 10;
* @return The enum numeric value on the wire for instrumentKind.
*/
@java.lang.Override public int getInstrumentKindValue() {
return instrumentKind_;
}
/**
*
*Тип инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 10;
* @return The instrumentKind.
*/
@java.lang.Override public ru.tinkoff.piapi.contract.v1.InstrumentType getInstrumentKind() {
ru.tinkoff.piapi.contract.v1.InstrumentType result = ru.tinkoff.piapi.contract.v1.InstrumentType.forNumber(instrumentKind_);
return result == null ? ru.tinkoff.piapi.contract.v1.InstrumentType.UNRECOGNIZED : result;
}
public static final int POSITION_UID_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private volatile java.lang.Object positionUid_ = "";
/**
*
*id позиции.
*
*
* string position_uid = 11;
* @return The positionUid.
*/
@java.lang.Override
public java.lang.String getPositionUid() {
java.lang.Object ref = positionUid_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
positionUid_ = s;
return s;
}
}
/**
*
*id позиции.
*
*
* string position_uid = 11;
* @return The bytes for positionUid.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPositionUidBytes() {
java.lang.Object ref = positionUid_;
if (ref instanceof java.lang.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;
}
}
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(uid_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uid_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(figi_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, figi_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instrumentType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instrumentType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ticker_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ticker_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, classCode_);
}
for (int i = 0; i < links_.size(); i++) {
output.writeMessage(6, links_.get(i));
}
if (instrumentKind_ != ru.tinkoff.piapi.contract.v1.InstrumentType.INSTRUMENT_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(10, instrumentKind_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(positionUid_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, positionUid_);
}
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(uid_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uid_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(figi_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, figi_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instrumentType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instrumentType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ticker_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ticker_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(classCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, classCode_);
}
for (int i = 0; i < links_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, links_.get(i));
}
if (instrumentKind_ != ru.tinkoff.piapi.contract.v1.InstrumentType.INSTRUMENT_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(10, instrumentKind_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(positionUid_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, positionUid_);
}
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.AssetInstrument)) {
return super.equals(obj);
}
ru.tinkoff.piapi.contract.v1.AssetInstrument other = (ru.tinkoff.piapi.contract.v1.AssetInstrument) obj;
if (!getUid()
.equals(other.getUid())) return false;
if (!getFigi()
.equals(other.getFigi())) return false;
if (!getInstrumentType()
.equals(other.getInstrumentType())) return false;
if (!getTicker()
.equals(other.getTicker())) return false;
if (!getClassCode()
.equals(other.getClassCode())) return false;
if (!getLinksList()
.equals(other.getLinksList())) return false;
if (instrumentKind_ != other.instrumentKind_) return false;
if (!getPositionUid()
.equals(other.getPositionUid())) 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) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid().hashCode();
hash = (37 * hash) + FIGI_FIELD_NUMBER;
hash = (53 * hash) + getFigi().hashCode();
hash = (37 * hash) + INSTRUMENT_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getInstrumentType().hashCode();
hash = (37 * hash) + TICKER_FIELD_NUMBER;
hash = (53 * hash) + getTicker().hashCode();
hash = (37 * hash) + CLASS_CODE_FIELD_NUMBER;
hash = (53 * hash) + getClassCode().hashCode();
if (getLinksCount() > 0) {
hash = (37 * hash) + LINKS_FIELD_NUMBER;
hash = (53 * hash) + getLinksList().hashCode();
}
hash = (37 * hash) + INSTRUMENT_KIND_FIELD_NUMBER;
hash = (53 * hash) + instrumentKind_;
hash = (37 * hash) + POSITION_UID_FIELD_NUMBER;
hash = (53 * hash) + getPositionUid().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static ru.tinkoff.piapi.contract.v1.AssetInstrument parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.AssetInstrument 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.AssetInstrument parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.AssetInstrument 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.AssetInstrument parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.AssetInstrument 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.AssetInstrument parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.AssetInstrument 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.AssetInstrument parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.AssetInstrument 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.AssetInstrument 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.AssetInstrument 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.AssetInstrument 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.AssetInstrument}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.AssetInstrument)
ru.tinkoff.piapi.contract.v1.AssetInstrumentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_AssetInstrument_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_AssetInstrument_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.AssetInstrument.class, ru.tinkoff.piapi.contract.v1.AssetInstrument.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.AssetInstrument.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
uid_ = "";
figi_ = "";
instrumentType_ = "";
ticker_ = "";
classCode_ = "";
if (linksBuilder_ == null) {
links_ = java.util.Collections.emptyList();
} else {
links_ = null;
linksBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
instrumentKind_ = 0;
positionUid_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_AssetInstrument_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.AssetInstrument getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.AssetInstrument.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.AssetInstrument build() {
ru.tinkoff.piapi.contract.v1.AssetInstrument result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.AssetInstrument buildPartial() {
ru.tinkoff.piapi.contract.v1.AssetInstrument result = new ru.tinkoff.piapi.contract.v1.AssetInstrument(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(ru.tinkoff.piapi.contract.v1.AssetInstrument result) {
if (linksBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)) {
links_ = java.util.Collections.unmodifiableList(links_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.links_ = links_;
} else {
result.links_ = linksBuilder_.build();
}
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.AssetInstrument result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.uid_ = uid_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.figi_ = figi_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.instrumentType_ = instrumentType_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.ticker_ = ticker_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.classCode_ = classCode_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.instrumentKind_ = instrumentKind_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.positionUid_ = positionUid_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.AssetInstrument) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.AssetInstrument)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.AssetInstrument other) {
if (other == ru.tinkoff.piapi.contract.v1.AssetInstrument.getDefaultInstance()) return this;
if (!other.getUid().isEmpty()) {
uid_ = other.uid_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getFigi().isEmpty()) {
figi_ = other.figi_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getInstrumentType().isEmpty()) {
instrumentType_ = other.instrumentType_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getTicker().isEmpty()) {
ticker_ = other.ticker_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getClassCode().isEmpty()) {
classCode_ = other.classCode_;
bitField0_ |= 0x00000010;
onChanged();
}
if (linksBuilder_ == null) {
if (!other.links_.isEmpty()) {
if (links_.isEmpty()) {
links_ = other.links_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureLinksIsMutable();
links_.addAll(other.links_);
}
onChanged();
}
} else {
if (!other.links_.isEmpty()) {
if (linksBuilder_.isEmpty()) {
linksBuilder_.dispose();
linksBuilder_ = null;
links_ = other.links_;
bitField0_ = (bitField0_ & ~0x00000020);
linksBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLinksFieldBuilder() : null;
} else {
linksBuilder_.addAllMessages(other.links_);
}
}
}
if (other.instrumentKind_ != 0) {
setInstrumentKindValue(other.getInstrumentKindValue());
}
if (!other.getPositionUid().isEmpty()) {
positionUid_ = other.positionUid_;
bitField0_ |= 0x00000080;
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: {
uid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
figi_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
instrumentType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
ticker_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
classCode_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
ru.tinkoff.piapi.contract.v1.InstrumentLink m =
input.readMessage(
ru.tinkoff.piapi.contract.v1.InstrumentLink.parser(),
extensionRegistry);
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.add(m);
} else {
linksBuilder_.addMessage(m);
}
break;
} // case 50
case 80: {
instrumentKind_ = input.readEnum();
bitField0_ |= 0x00000040;
break;
} // case 80
case 90: {
positionUid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
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 uid_ = "";
/**
*
*uid идентификатор инструмента.
*
*
* string uid = 1;
* @return The uid.
*/
public java.lang.String getUid() {
java.lang.Object ref = uid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*uid идентификатор инструмента.
*
*
* string uid = 1;
* @return The bytes for uid.
*/
public com.google.protobuf.ByteString
getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*uid идентификатор инструмента.
*
*
* string uid = 1;
* @param value The uid to set.
* @return This builder for chaining.
*/
public Builder setUid(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
uid_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*uid идентификатор инструмента.
*
*
* string uid = 1;
* @return This builder for chaining.
*/
public Builder clearUid() {
uid_ = getDefaultInstance().getUid();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*uid идентификатор инструмента.
*
*
* string uid = 1;
* @param value The bytes for uid to set.
* @return This builder for chaining.
*/
public Builder setUidBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
uid_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object figi_ = "";
/**
*
*figi идентификатор инструмента.
*
*
* string figi = 2;
* @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 = 2;
* @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 = 2;
* @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_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*figi идентификатор инструмента.
*
*
* string figi = 2;
* @return This builder for chaining.
*/
public Builder clearFigi() {
figi_ = getDefaultInstance().getFigi();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*figi идентификатор инструмента.
*
*
* string figi = 2;
* @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_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object instrumentType_ = "";
/**
*
*Тип инструмента.
*
*
* string instrument_type = 3;
* @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 = 3;
* @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 = 3;
* @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_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*Тип инструмента.
*
*
* string instrument_type = 3;
* @return This builder for chaining.
*/
public Builder clearInstrumentType() {
instrumentType_ = getDefaultInstance().getInstrumentType();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*Тип инструмента.
*
*
* string instrument_type = 3;
* @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_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object ticker_ = "";
/**
*
*Тикер инструмента.
*
*
* string ticker = 4;
* @return The ticker.
*/
public java.lang.String getTicker() {
java.lang.Object ref = ticker_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ticker_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Тикер инструмента.
*
*
* string ticker = 4;
* @return The bytes for ticker.
*/
public com.google.protobuf.ByteString
getTickerBytes() {
java.lang.Object ref = ticker_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ticker_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Тикер инструмента.
*
*
* string ticker = 4;
* @param value The ticker to set.
* @return This builder for chaining.
*/
public Builder setTicker(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ticker_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*Тикер инструмента.
*
*
* string ticker = 4;
* @return This builder for chaining.
*/
public Builder clearTicker() {
ticker_ = getDefaultInstance().getTicker();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*Тикер инструмента.
*
*
* string ticker = 4;
* @param value The bytes for ticker to set.
* @return This builder for chaining.
*/
public Builder setTickerBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ticker_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object classCode_ = "";
/**
*
*Класс-код (секция торгов).
*
*
* string class_code = 5;
* @return The classCode.
*/
public java.lang.String getClassCode() {
java.lang.Object ref = classCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
classCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Класс-код (секция торгов).
*
*
* string class_code = 5;
* @return The bytes for classCode.
*/
public com.google.protobuf.ByteString
getClassCodeBytes() {
java.lang.Object ref = classCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
classCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Класс-код (секция торгов).
*
*
* string class_code = 5;
* @param value The classCode to set.
* @return This builder for chaining.
*/
public Builder setClassCode(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
classCode_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Класс-код (секция торгов).
*
*
* string class_code = 5;
* @return This builder for chaining.
*/
public Builder clearClassCode() {
classCode_ = getDefaultInstance().getClassCode();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*Класс-код (секция торгов).
*
*
* string class_code = 5;
* @param value The bytes for classCode to set.
* @return This builder for chaining.
*/
public Builder setClassCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
classCode_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.util.List links_ =
java.util.Collections.emptyList();
private void ensureLinksIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
links_ = new java.util.ArrayList(links_);
bitField0_ |= 0x00000020;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.InstrumentLink, ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder, ru.tinkoff.piapi.contract.v1.InstrumentLinkOrBuilder> linksBuilder_;
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public java.util.List getLinksList() {
if (linksBuilder_ == null) {
return java.util.Collections.unmodifiableList(links_);
} else {
return linksBuilder_.getMessageList();
}
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public int getLinksCount() {
if (linksBuilder_ == null) {
return links_.size();
} else {
return linksBuilder_.getCount();
}
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public ru.tinkoff.piapi.contract.v1.InstrumentLink getLinks(int index) {
if (linksBuilder_ == null) {
return links_.get(index);
} else {
return linksBuilder_.getMessage(index);
}
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder setLinks(
int index, ru.tinkoff.piapi.contract.v1.InstrumentLink value) {
if (linksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinksIsMutable();
links_.set(index, value);
onChanged();
} else {
linksBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder setLinks(
int index, ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder builderForValue) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.set(index, builderForValue.build());
onChanged();
} else {
linksBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder addLinks(ru.tinkoff.piapi.contract.v1.InstrumentLink value) {
if (linksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinksIsMutable();
links_.add(value);
onChanged();
} else {
linksBuilder_.addMessage(value);
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder addLinks(
int index, ru.tinkoff.piapi.contract.v1.InstrumentLink value) {
if (linksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinksIsMutable();
links_.add(index, value);
onChanged();
} else {
linksBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder addLinks(
ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder builderForValue) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.add(builderForValue.build());
onChanged();
} else {
linksBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder addLinks(
int index, ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder builderForValue) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.add(index, builderForValue.build());
onChanged();
} else {
linksBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder addAllLinks(
java.lang.Iterable extends ru.tinkoff.piapi.contract.v1.InstrumentLink> values) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, links_);
onChanged();
} else {
linksBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder clearLinks() {
if (linksBuilder_ == null) {
links_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
linksBuilder_.clear();
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public Builder removeLinks(int index) {
if (linksBuilder_ == null) {
ensureLinksIsMutable();
links_.remove(index);
onChanged();
} else {
linksBuilder_.remove(index);
}
return this;
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder getLinksBuilder(
int index) {
return getLinksFieldBuilder().getBuilder(index);
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public ru.tinkoff.piapi.contract.v1.InstrumentLinkOrBuilder getLinksOrBuilder(
int index) {
if (linksBuilder_ == null) {
return links_.get(index); } else {
return linksBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public java.util.List extends ru.tinkoff.piapi.contract.v1.InstrumentLinkOrBuilder>
getLinksOrBuilderList() {
if (linksBuilder_ != null) {
return linksBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(links_);
}
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder addLinksBuilder() {
return getLinksFieldBuilder().addBuilder(
ru.tinkoff.piapi.contract.v1.InstrumentLink.getDefaultInstance());
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder addLinksBuilder(
int index) {
return getLinksFieldBuilder().addBuilder(
index, ru.tinkoff.piapi.contract.v1.InstrumentLink.getDefaultInstance());
}
/**
*
*Массив связанных инструментов.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.InstrumentLink links = 6;
*/
public java.util.List
getLinksBuilderList() {
return getLinksFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.InstrumentLink, ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder, ru.tinkoff.piapi.contract.v1.InstrumentLinkOrBuilder>
getLinksFieldBuilder() {
if (linksBuilder_ == null) {
linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.InstrumentLink, ru.tinkoff.piapi.contract.v1.InstrumentLink.Builder, ru.tinkoff.piapi.contract.v1.InstrumentLinkOrBuilder>(
links_,
((bitField0_ & 0x00000020) != 0),
getParentForChildren(),
isClean());
links_ = null;
}
return linksBuilder_;
}
private int instrumentKind_ = 0;
/**
*
*Тип инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 10;
* @return The enum numeric value on the wire for instrumentKind.
*/
@java.lang.Override public int getInstrumentKindValue() {
return instrumentKind_;
}
/**
*
*Тип инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 10;
* @param value The enum numeric value on the wire for instrumentKind to set.
* @return This builder for chaining.
*/
public Builder setInstrumentKindValue(int value) {
instrumentKind_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Тип инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 10;
* @return The instrumentKind.
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.InstrumentType getInstrumentKind() {
ru.tinkoff.piapi.contract.v1.InstrumentType result = ru.tinkoff.piapi.contract.v1.InstrumentType.forNumber(instrumentKind_);
return result == null ? ru.tinkoff.piapi.contract.v1.InstrumentType.UNRECOGNIZED : result;
}
/**
*
*Тип инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 10;
* @param value The instrumentKind to set.
* @return This builder for chaining.
*/
public Builder setInstrumentKind(ru.tinkoff.piapi.contract.v1.InstrumentType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
instrumentKind_ = value.getNumber();
onChanged();
return this;
}
/**
*
*Тип инструмента.
*
*
* .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 10;
* @return This builder for chaining.
*/
public Builder clearInstrumentKind() {
bitField0_ = (bitField0_ & ~0x00000040);
instrumentKind_ = 0;
onChanged();
return this;
}
private java.lang.Object positionUid_ = "";
/**
*
*id позиции.
*
*
* string position_uid = 11;
* @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;
}
}
/**
*
*id позиции.
*
*
* string position_uid = 11;
* @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;
}
}
/**
*
*id позиции.
*
*
* string position_uid = 11;
* @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_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*id позиции.
*
*
* string position_uid = 11;
* @return This builder for chaining.
*/
public Builder clearPositionUid() {
positionUid_ = getDefaultInstance().getPositionUid();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
*id позиции.
*
*
* string position_uid = 11;
* @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_ |= 0x00000080;
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.AssetInstrument)
}
// @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.AssetInstrument)
private static final ru.tinkoff.piapi.contract.v1.AssetInstrument DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.AssetInstrument();
}
public static ru.tinkoff.piapi.contract.v1.AssetInstrument getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AssetInstrument 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.AssetInstrument getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}