All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.tinkoff.piapi.contract.v1.AssetSecurity Maven / Gradle / Ivy

There is a newer version: 1.25
Show newest version
// 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.AssetSecurity} */ public final class AssetSecurity extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.AssetSecurity) AssetSecurityOrBuilder { private static final long serialVersionUID = 0L; // Use AssetSecurity.newBuilder() to construct. private AssetSecurity(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AssetSecurity() { isin_ = ""; type_ = ""; instrumentKind_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new AssetSecurity(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_AssetSecurity_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_AssetSecurity_fieldAccessorTable .ensureFieldAccessorsInitialized( ru.tinkoff.piapi.contract.v1.AssetSecurity.class, ru.tinkoff.piapi.contract.v1.AssetSecurity.Builder.class); } private int extCase_ = 0; @SuppressWarnings("serial") private java.lang.Object ext_; public enum ExtCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { SHARE(3), BOND(4), SP(5), ETF(6), CLEARING_CERTIFICATE(7), EXT_NOT_SET(0); private final int value; private ExtCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ExtCase valueOf(int value) { return forNumber(value); } public static ExtCase forNumber(int value) { switch (value) { case 3: return SHARE; case 4: return BOND; case 5: return SP; case 6: return ETF; case 7: return CLEARING_CERTIFICATE; case 0: return EXT_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ExtCase getExtCase() { return ExtCase.forNumber( extCase_); } public static final int ISIN_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object isin_ = ""; /** *
   *ISIN-идентификатор ценной бумаги.
   * 
* * string isin = 1; * @return The isin. */ @java.lang.Override public java.lang.String getIsin() { java.lang.Object ref = isin_; 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(); isin_ = s; return s; } } /** *
   *ISIN-идентификатор ценной бумаги.
   * 
* * string isin = 1; * @return The bytes for isin. */ @java.lang.Override public com.google.protobuf.ByteString getIsinBytes() { java.lang.Object ref = isin_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); isin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TYPE_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object type_ = ""; /** *
   *Тип ценной бумаги.
   * 
* * string type = 2; * @return The type. */ @java.lang.Override public java.lang.String getType() { java.lang.Object ref = type_; 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(); type_ = s; return s; } } /** *
   *Тип ценной бумаги.
   * 
* * string type = 2; * @return The bytes for type. */ @java.lang.Override public com.google.protobuf.ByteString getTypeBytes() { java.lang.Object ref = type_; if (ref instanceof java.lang.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; } } 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 SHARE_FIELD_NUMBER = 3; /** *
   *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; * @return Whether the share field is set. */ @java.lang.Override public boolean hasShare() { return extCase_ == 3; } /** *
   *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; * @return The share. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetShare getShare() { if (extCase_ == 3) { return (ru.tinkoff.piapi.contract.v1.AssetShare) ext_; } return ru.tinkoff.piapi.contract.v1.AssetShare.getDefaultInstance(); } /** *
   *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetShareOrBuilder getShareOrBuilder() { if (extCase_ == 3) { return (ru.tinkoff.piapi.contract.v1.AssetShare) ext_; } return ru.tinkoff.piapi.contract.v1.AssetShare.getDefaultInstance(); } public static final int BOND_FIELD_NUMBER = 4; /** *
   *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; * @return Whether the bond field is set. */ @java.lang.Override public boolean hasBond() { return extCase_ == 4; } /** *
   *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; * @return The bond. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetBond getBond() { if (extCase_ == 4) { return (ru.tinkoff.piapi.contract.v1.AssetBond) ext_; } return ru.tinkoff.piapi.contract.v1.AssetBond.getDefaultInstance(); } /** *
   *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetBondOrBuilder getBondOrBuilder() { if (extCase_ == 4) { return (ru.tinkoff.piapi.contract.v1.AssetBond) ext_; } return ru.tinkoff.piapi.contract.v1.AssetBond.getDefaultInstance(); } public static final int SP_FIELD_NUMBER = 5; /** *
   *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; * @return Whether the sp field is set. */ @java.lang.Override public boolean hasSp() { return extCase_ == 5; } /** *
   *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; * @return The sp. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetStructuredProduct getSp() { if (extCase_ == 5) { return (ru.tinkoff.piapi.contract.v1.AssetStructuredProduct) ext_; } return ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.getDefaultInstance(); } /** *
   *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetStructuredProductOrBuilder getSpOrBuilder() { if (extCase_ == 5) { return (ru.tinkoff.piapi.contract.v1.AssetStructuredProduct) ext_; } return ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.getDefaultInstance(); } public static final int ETF_FIELD_NUMBER = 6; /** *
   * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; * @return Whether the etf field is set. */ @java.lang.Override public boolean hasEtf() { return extCase_ == 6; } /** *
   * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; * @return The etf. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetEtf getEtf() { if (extCase_ == 6) { return (ru.tinkoff.piapi.contract.v1.AssetEtf) ext_; } return ru.tinkoff.piapi.contract.v1.AssetEtf.getDefaultInstance(); } /** *
   * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetEtfOrBuilder getEtfOrBuilder() { if (extCase_ == 6) { return (ru.tinkoff.piapi.contract.v1.AssetEtf) ext_; } return ru.tinkoff.piapi.contract.v1.AssetEtf.getDefaultInstance(); } public static final int CLEARING_CERTIFICATE_FIELD_NUMBER = 7; /** *
   * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; * @return Whether the clearingCertificate field is set. */ @java.lang.Override public boolean hasClearingCertificate() { return extCase_ == 7; } /** *
   * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; * @return The clearingCertificate. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetClearingCertificate getClearingCertificate() { if (extCase_ == 7) { return (ru.tinkoff.piapi.contract.v1.AssetClearingCertificate) ext_; } return ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.getDefaultInstance(); } /** *
   * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
   * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetClearingCertificateOrBuilder getClearingCertificateOrBuilder() { if (extCase_ == 7) { return (ru.tinkoff.piapi.contract.v1.AssetClearingCertificate) ext_; } return ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.getDefaultInstance(); } 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(isin_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, isin_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); } if (extCase_ == 3) { output.writeMessage(3, (ru.tinkoff.piapi.contract.v1.AssetShare) ext_); } if (extCase_ == 4) { output.writeMessage(4, (ru.tinkoff.piapi.contract.v1.AssetBond) ext_); } if (extCase_ == 5) { output.writeMessage(5, (ru.tinkoff.piapi.contract.v1.AssetStructuredProduct) ext_); } if (extCase_ == 6) { output.writeMessage(6, (ru.tinkoff.piapi.contract.v1.AssetEtf) ext_); } if (extCase_ == 7) { output.writeMessage(7, (ru.tinkoff.piapi.contract.v1.AssetClearingCertificate) ext_); } if (instrumentKind_ != ru.tinkoff.piapi.contract.v1.InstrumentType.INSTRUMENT_TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(10, instrumentKind_); } 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(isin_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, isin_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); } if (extCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, (ru.tinkoff.piapi.contract.v1.AssetShare) ext_); } if (extCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (ru.tinkoff.piapi.contract.v1.AssetBond) ext_); } if (extCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (ru.tinkoff.piapi.contract.v1.AssetStructuredProduct) ext_); } if (extCase_ == 6) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, (ru.tinkoff.piapi.contract.v1.AssetEtf) ext_); } if (extCase_ == 7) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, (ru.tinkoff.piapi.contract.v1.AssetClearingCertificate) ext_); } if (instrumentKind_ != ru.tinkoff.piapi.contract.v1.InstrumentType.INSTRUMENT_TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(10, instrumentKind_); } 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.AssetSecurity)) { return super.equals(obj); } ru.tinkoff.piapi.contract.v1.AssetSecurity other = (ru.tinkoff.piapi.contract.v1.AssetSecurity) obj; if (!getIsin() .equals(other.getIsin())) return false; if (!getType() .equals(other.getType())) return false; if (instrumentKind_ != other.instrumentKind_) return false; if (!getExtCase().equals(other.getExtCase())) return false; switch (extCase_) { case 3: if (!getShare() .equals(other.getShare())) return false; break; case 4: if (!getBond() .equals(other.getBond())) return false; break; case 5: if (!getSp() .equals(other.getSp())) return false; break; case 6: if (!getEtf() .equals(other.getEtf())) return false; break; case 7: if (!getClearingCertificate() .equals(other.getClearingCertificate())) return false; break; case 0: default: } 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) + ISIN_FIELD_NUMBER; hash = (53 * hash) + getIsin().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + INSTRUMENT_KIND_FIELD_NUMBER; hash = (53 * hash) + instrumentKind_; switch (extCase_) { case 3: hash = (37 * hash) + SHARE_FIELD_NUMBER; hash = (53 * hash) + getShare().hashCode(); break; case 4: hash = (37 * hash) + BOND_FIELD_NUMBER; hash = (53 * hash) + getBond().hashCode(); break; case 5: hash = (37 * hash) + SP_FIELD_NUMBER; hash = (53 * hash) + getSp().hashCode(); break; case 6: hash = (37 * hash) + ETF_FIELD_NUMBER; hash = (53 * hash) + getEtf().hashCode(); break; case 7: hash = (37 * hash) + CLEARING_CERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + getClearingCertificate().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ru.tinkoff.piapi.contract.v1.AssetSecurity parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.AssetSecurity 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.AssetSecurity parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.AssetSecurity 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.AssetSecurity parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.AssetSecurity 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.AssetSecurity parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ru.tinkoff.piapi.contract.v1.AssetSecurity 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.AssetSecurity parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ru.tinkoff.piapi.contract.v1.AssetSecurity 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.AssetSecurity 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.AssetSecurity 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.AssetSecurity 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.AssetSecurity} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.AssetSecurity) ru.tinkoff.piapi.contract.v1.AssetSecurityOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_AssetSecurity_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_AssetSecurity_fieldAccessorTable .ensureFieldAccessorsInitialized( ru.tinkoff.piapi.contract.v1.AssetSecurity.class, ru.tinkoff.piapi.contract.v1.AssetSecurity.Builder.class); } // Construct using ru.tinkoff.piapi.contract.v1.AssetSecurity.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; isin_ = ""; type_ = ""; instrumentKind_ = 0; if (shareBuilder_ != null) { shareBuilder_.clear(); } if (bondBuilder_ != null) { bondBuilder_.clear(); } if (spBuilder_ != null) { spBuilder_.clear(); } if (etfBuilder_ != null) { etfBuilder_.clear(); } if (clearingCertificateBuilder_ != null) { clearingCertificateBuilder_.clear(); } extCase_ = 0; ext_ = null; 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_AssetSecurity_descriptor; } @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetSecurity getDefaultInstanceForType() { return ru.tinkoff.piapi.contract.v1.AssetSecurity.getDefaultInstance(); } @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetSecurity build() { ru.tinkoff.piapi.contract.v1.AssetSecurity result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetSecurity buildPartial() { ru.tinkoff.piapi.contract.v1.AssetSecurity result = new ru.tinkoff.piapi.contract.v1.AssetSecurity(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(ru.tinkoff.piapi.contract.v1.AssetSecurity result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.isin_ = isin_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.type_ = type_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.instrumentKind_ = instrumentKind_; } } private void buildPartialOneofs(ru.tinkoff.piapi.contract.v1.AssetSecurity result) { result.extCase_ = extCase_; result.ext_ = this.ext_; if (extCase_ == 3 && shareBuilder_ != null) { result.ext_ = shareBuilder_.build(); } if (extCase_ == 4 && bondBuilder_ != null) { result.ext_ = bondBuilder_.build(); } if (extCase_ == 5 && spBuilder_ != null) { result.ext_ = spBuilder_.build(); } if (extCase_ == 6 && etfBuilder_ != null) { result.ext_ = etfBuilder_.build(); } if (extCase_ == 7 && clearingCertificateBuilder_ != null) { result.ext_ = clearingCertificateBuilder_.build(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ru.tinkoff.piapi.contract.v1.AssetSecurity) { return mergeFrom((ru.tinkoff.piapi.contract.v1.AssetSecurity)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.AssetSecurity other) { if (other == ru.tinkoff.piapi.contract.v1.AssetSecurity.getDefaultInstance()) return this; if (!other.getIsin().isEmpty()) { isin_ = other.isin_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getType().isEmpty()) { type_ = other.type_; bitField0_ |= 0x00000002; onChanged(); } if (other.instrumentKind_ != 0) { setInstrumentKindValue(other.getInstrumentKindValue()); } switch (other.getExtCase()) { case SHARE: { mergeShare(other.getShare()); break; } case BOND: { mergeBond(other.getBond()); break; } case SP: { mergeSp(other.getSp()); break; } case ETF: { mergeEtf(other.getEtf()); break; } case CLEARING_CERTIFICATE: { mergeClearingCertificate(other.getClearingCertificate()); break; } case EXT_NOT_SET: { break; } } 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: { isin_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { type_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getShareFieldBuilder().getBuilder(), extensionRegistry); extCase_ = 3; break; } // case 26 case 34: { input.readMessage( getBondFieldBuilder().getBuilder(), extensionRegistry); extCase_ = 4; break; } // case 34 case 42: { input.readMessage( getSpFieldBuilder().getBuilder(), extensionRegistry); extCase_ = 5; break; } // case 42 case 50: { input.readMessage( getEtfFieldBuilder().getBuilder(), extensionRegistry); extCase_ = 6; break; } // case 50 case 58: { input.readMessage( getClearingCertificateFieldBuilder().getBuilder(), extensionRegistry); extCase_ = 7; break; } // case 58 case 80: { instrumentKind_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 80 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 extCase_ = 0; private java.lang.Object ext_; public ExtCase getExtCase() { return ExtCase.forNumber( extCase_); } public Builder clearExt() { extCase_ = 0; ext_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object isin_ = ""; /** *
     *ISIN-идентификатор ценной бумаги.
     * 
* * string isin = 1; * @return The isin. */ public java.lang.String getIsin() { java.lang.Object ref = isin_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); isin_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     *ISIN-идентификатор ценной бумаги.
     * 
* * string isin = 1; * @return The bytes for isin. */ public com.google.protobuf.ByteString getIsinBytes() { java.lang.Object ref = isin_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); isin_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     *ISIN-идентификатор ценной бумаги.
     * 
* * string isin = 1; * @param value The isin to set. * @return This builder for chaining. */ public Builder setIsin( java.lang.String value) { if (value == null) { throw new NullPointerException(); } isin_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     *ISIN-идентификатор ценной бумаги.
     * 
* * string isin = 1; * @return This builder for chaining. */ public Builder clearIsin() { isin_ = getDefaultInstance().getIsin(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     *ISIN-идентификатор ценной бумаги.
     * 
* * string isin = 1; * @param value The bytes for isin to set. * @return This builder for chaining. */ public Builder setIsinBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); isin_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object type_ = ""; /** *
     *Тип ценной бумаги.
     * 
* * string type = 2; * @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 = 2; * @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 = 2; * @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_ |= 0x00000002; onChanged(); return this; } /** *
     *Тип ценной бумаги.
     * 
* * string type = 2; * @return This builder for chaining. */ public Builder clearType() { type_ = getDefaultInstance().getType(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
     *Тип ценной бумаги.
     * 
* * string type = 2; * @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_ |= 0x00000002; onChanged(); return this; } 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_ |= 0x00000004; 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_ |= 0x00000004; 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_ & ~0x00000004); instrumentKind_ = 0; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetShare, ru.tinkoff.piapi.contract.v1.AssetShare.Builder, ru.tinkoff.piapi.contract.v1.AssetShareOrBuilder> shareBuilder_; /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; * @return Whether the share field is set. */ @java.lang.Override public boolean hasShare() { return extCase_ == 3; } /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; * @return The share. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetShare getShare() { if (shareBuilder_ == null) { if (extCase_ == 3) { return (ru.tinkoff.piapi.contract.v1.AssetShare) ext_; } return ru.tinkoff.piapi.contract.v1.AssetShare.getDefaultInstance(); } else { if (extCase_ == 3) { return shareBuilder_.getMessage(); } return ru.tinkoff.piapi.contract.v1.AssetShare.getDefaultInstance(); } } /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; */ public Builder setShare(ru.tinkoff.piapi.contract.v1.AssetShare value) { if (shareBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ext_ = value; onChanged(); } else { shareBuilder_.setMessage(value); } extCase_ = 3; return this; } /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; */ public Builder setShare( ru.tinkoff.piapi.contract.v1.AssetShare.Builder builderForValue) { if (shareBuilder_ == null) { ext_ = builderForValue.build(); onChanged(); } else { shareBuilder_.setMessage(builderForValue.build()); } extCase_ = 3; return this; } /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; */ public Builder mergeShare(ru.tinkoff.piapi.contract.v1.AssetShare value) { if (shareBuilder_ == null) { if (extCase_ == 3 && ext_ != ru.tinkoff.piapi.contract.v1.AssetShare.getDefaultInstance()) { ext_ = ru.tinkoff.piapi.contract.v1.AssetShare.newBuilder((ru.tinkoff.piapi.contract.v1.AssetShare) ext_) .mergeFrom(value).buildPartial(); } else { ext_ = value; } onChanged(); } else { if (extCase_ == 3) { shareBuilder_.mergeFrom(value); } else { shareBuilder_.setMessage(value); } } extCase_ = 3; return this; } /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; */ public Builder clearShare() { if (shareBuilder_ == null) { if (extCase_ == 3) { extCase_ = 0; ext_ = null; onChanged(); } } else { if (extCase_ == 3) { extCase_ = 0; ext_ = null; } shareBuilder_.clear(); } return this; } /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; */ public ru.tinkoff.piapi.contract.v1.AssetShare.Builder getShareBuilder() { return getShareFieldBuilder().getBuilder(); } /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetShareOrBuilder getShareOrBuilder() { if ((extCase_ == 3) && (shareBuilder_ != null)) { return shareBuilder_.getMessageOrBuilder(); } else { if (extCase_ == 3) { return (ru.tinkoff.piapi.contract.v1.AssetShare) ext_; } return ru.tinkoff.piapi.contract.v1.AssetShare.getDefaultInstance(); } } /** *
     *Акция. Заполняется только для акций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = share).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetShare share = 3; */ private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetShare, ru.tinkoff.piapi.contract.v1.AssetShare.Builder, ru.tinkoff.piapi.contract.v1.AssetShareOrBuilder> getShareFieldBuilder() { if (shareBuilder_ == null) { if (!(extCase_ == 3)) { ext_ = ru.tinkoff.piapi.contract.v1.AssetShare.getDefaultInstance(); } shareBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetShare, ru.tinkoff.piapi.contract.v1.AssetShare.Builder, ru.tinkoff.piapi.contract.v1.AssetShareOrBuilder>( (ru.tinkoff.piapi.contract.v1.AssetShare) ext_, getParentForChildren(), isClean()); ext_ = null; } extCase_ = 3; onChanged(); return shareBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetBond, ru.tinkoff.piapi.contract.v1.AssetBond.Builder, ru.tinkoff.piapi.contract.v1.AssetBondOrBuilder> bondBuilder_; /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; * @return Whether the bond field is set. */ @java.lang.Override public boolean hasBond() { return extCase_ == 4; } /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; * @return The bond. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetBond getBond() { if (bondBuilder_ == null) { if (extCase_ == 4) { return (ru.tinkoff.piapi.contract.v1.AssetBond) ext_; } return ru.tinkoff.piapi.contract.v1.AssetBond.getDefaultInstance(); } else { if (extCase_ == 4) { return bondBuilder_.getMessage(); } return ru.tinkoff.piapi.contract.v1.AssetBond.getDefaultInstance(); } } /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; */ public Builder setBond(ru.tinkoff.piapi.contract.v1.AssetBond value) { if (bondBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ext_ = value; onChanged(); } else { bondBuilder_.setMessage(value); } extCase_ = 4; return this; } /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; */ public Builder setBond( ru.tinkoff.piapi.contract.v1.AssetBond.Builder builderForValue) { if (bondBuilder_ == null) { ext_ = builderForValue.build(); onChanged(); } else { bondBuilder_.setMessage(builderForValue.build()); } extCase_ = 4; return this; } /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; */ public Builder mergeBond(ru.tinkoff.piapi.contract.v1.AssetBond value) { if (bondBuilder_ == null) { if (extCase_ == 4 && ext_ != ru.tinkoff.piapi.contract.v1.AssetBond.getDefaultInstance()) { ext_ = ru.tinkoff.piapi.contract.v1.AssetBond.newBuilder((ru.tinkoff.piapi.contract.v1.AssetBond) ext_) .mergeFrom(value).buildPartial(); } else { ext_ = value; } onChanged(); } else { if (extCase_ == 4) { bondBuilder_.mergeFrom(value); } else { bondBuilder_.setMessage(value); } } extCase_ = 4; return this; } /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; */ public Builder clearBond() { if (bondBuilder_ == null) { if (extCase_ == 4) { extCase_ = 0; ext_ = null; onChanged(); } } else { if (extCase_ == 4) { extCase_ = 0; ext_ = null; } bondBuilder_.clear(); } return this; } /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; */ public ru.tinkoff.piapi.contract.v1.AssetBond.Builder getBondBuilder() { return getBondFieldBuilder().getBuilder(); } /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetBondOrBuilder getBondOrBuilder() { if ((extCase_ == 4) && (bondBuilder_ != null)) { return bondBuilder_.getMessageOrBuilder(); } else { if (extCase_ == 4) { return (ru.tinkoff.piapi.contract.v1.AssetBond) ext_; } return ru.tinkoff.piapi.contract.v1.AssetBond.getDefaultInstance(); } } /** *
     *Облигация. Заполняется только для облигаций (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = bond).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetBond bond = 4; */ private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetBond, ru.tinkoff.piapi.contract.v1.AssetBond.Builder, ru.tinkoff.piapi.contract.v1.AssetBondOrBuilder> getBondFieldBuilder() { if (bondBuilder_ == null) { if (!(extCase_ == 4)) { ext_ = ru.tinkoff.piapi.contract.v1.AssetBond.getDefaultInstance(); } bondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetBond, ru.tinkoff.piapi.contract.v1.AssetBond.Builder, ru.tinkoff.piapi.contract.v1.AssetBondOrBuilder>( (ru.tinkoff.piapi.contract.v1.AssetBond) ext_, getParentForChildren(), isClean()); ext_ = null; } extCase_ = 4; onChanged(); return bondBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetStructuredProduct, ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.Builder, ru.tinkoff.piapi.contract.v1.AssetStructuredProductOrBuilder> spBuilder_; /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; * @return Whether the sp field is set. */ @java.lang.Override public boolean hasSp() { return extCase_ == 5; } /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; * @return The sp. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetStructuredProduct getSp() { if (spBuilder_ == null) { if (extCase_ == 5) { return (ru.tinkoff.piapi.contract.v1.AssetStructuredProduct) ext_; } return ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.getDefaultInstance(); } else { if (extCase_ == 5) { return spBuilder_.getMessage(); } return ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.getDefaultInstance(); } } /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; */ public Builder setSp(ru.tinkoff.piapi.contract.v1.AssetStructuredProduct value) { if (spBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ext_ = value; onChanged(); } else { spBuilder_.setMessage(value); } extCase_ = 5; return this; } /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; */ public Builder setSp( ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.Builder builderForValue) { if (spBuilder_ == null) { ext_ = builderForValue.build(); onChanged(); } else { spBuilder_.setMessage(builderForValue.build()); } extCase_ = 5; return this; } /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; */ public Builder mergeSp(ru.tinkoff.piapi.contract.v1.AssetStructuredProduct value) { if (spBuilder_ == null) { if (extCase_ == 5 && ext_ != ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.getDefaultInstance()) { ext_ = ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.newBuilder((ru.tinkoff.piapi.contract.v1.AssetStructuredProduct) ext_) .mergeFrom(value).buildPartial(); } else { ext_ = value; } onChanged(); } else { if (extCase_ == 5) { spBuilder_.mergeFrom(value); } else { spBuilder_.setMessage(value); } } extCase_ = 5; return this; } /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; */ public Builder clearSp() { if (spBuilder_ == null) { if (extCase_ == 5) { extCase_ = 0; ext_ = null; onChanged(); } } else { if (extCase_ == 5) { extCase_ = 0; ext_ = null; } spBuilder_.clear(); } return this; } /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; */ public ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.Builder getSpBuilder() { return getSpFieldBuilder().getBuilder(); } /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetStructuredProductOrBuilder getSpOrBuilder() { if ((extCase_ == 5) && (spBuilder_ != null)) { return spBuilder_.getMessageOrBuilder(); } else { if (extCase_ == 5) { return (ru.tinkoff.piapi.contract.v1.AssetStructuredProduct) ext_; } return ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.getDefaultInstance(); } } /** *
     *Структурная нота. Заполняется только для структурных продуктов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = sp).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetStructuredProduct sp = 5; */ private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetStructuredProduct, ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.Builder, ru.tinkoff.piapi.contract.v1.AssetStructuredProductOrBuilder> getSpFieldBuilder() { if (spBuilder_ == null) { if (!(extCase_ == 5)) { ext_ = ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.getDefaultInstance(); } spBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetStructuredProduct, ru.tinkoff.piapi.contract.v1.AssetStructuredProduct.Builder, ru.tinkoff.piapi.contract.v1.AssetStructuredProductOrBuilder>( (ru.tinkoff.piapi.contract.v1.AssetStructuredProduct) ext_, getParentForChildren(), isClean()); ext_ = null; } extCase_ = 5; onChanged(); return spBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetEtf, ru.tinkoff.piapi.contract.v1.AssetEtf.Builder, ru.tinkoff.piapi.contract.v1.AssetEtfOrBuilder> etfBuilder_; /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; * @return Whether the etf field is set. */ @java.lang.Override public boolean hasEtf() { return extCase_ == 6; } /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; * @return The etf. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetEtf getEtf() { if (etfBuilder_ == null) { if (extCase_ == 6) { return (ru.tinkoff.piapi.contract.v1.AssetEtf) ext_; } return ru.tinkoff.piapi.contract.v1.AssetEtf.getDefaultInstance(); } else { if (extCase_ == 6) { return etfBuilder_.getMessage(); } return ru.tinkoff.piapi.contract.v1.AssetEtf.getDefaultInstance(); } } /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; */ public Builder setEtf(ru.tinkoff.piapi.contract.v1.AssetEtf value) { if (etfBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ext_ = value; onChanged(); } else { etfBuilder_.setMessage(value); } extCase_ = 6; return this; } /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; */ public Builder setEtf( ru.tinkoff.piapi.contract.v1.AssetEtf.Builder builderForValue) { if (etfBuilder_ == null) { ext_ = builderForValue.build(); onChanged(); } else { etfBuilder_.setMessage(builderForValue.build()); } extCase_ = 6; return this; } /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; */ public Builder mergeEtf(ru.tinkoff.piapi.contract.v1.AssetEtf value) { if (etfBuilder_ == null) { if (extCase_ == 6 && ext_ != ru.tinkoff.piapi.contract.v1.AssetEtf.getDefaultInstance()) { ext_ = ru.tinkoff.piapi.contract.v1.AssetEtf.newBuilder((ru.tinkoff.piapi.contract.v1.AssetEtf) ext_) .mergeFrom(value).buildPartial(); } else { ext_ = value; } onChanged(); } else { if (extCase_ == 6) { etfBuilder_.mergeFrom(value); } else { etfBuilder_.setMessage(value); } } extCase_ = 6; return this; } /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; */ public Builder clearEtf() { if (etfBuilder_ == null) { if (extCase_ == 6) { extCase_ = 0; ext_ = null; onChanged(); } } else { if (extCase_ == 6) { extCase_ = 0; ext_ = null; } etfBuilder_.clear(); } return this; } /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; */ public ru.tinkoff.piapi.contract.v1.AssetEtf.Builder getEtfBuilder() { return getEtfFieldBuilder().getBuilder(); } /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetEtfOrBuilder getEtfOrBuilder() { if ((extCase_ == 6) && (etfBuilder_ != null)) { return etfBuilder_.getMessageOrBuilder(); } else { if (extCase_ == 6) { return (ru.tinkoff.piapi.contract.v1.AssetEtf) ext_; } return ru.tinkoff.piapi.contract.v1.AssetEtf.getDefaultInstance(); } } /** *
     * Фонд. Заполняется только для фондов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = etf).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetEtf etf = 6; */ private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetEtf, ru.tinkoff.piapi.contract.v1.AssetEtf.Builder, ru.tinkoff.piapi.contract.v1.AssetEtfOrBuilder> getEtfFieldBuilder() { if (etfBuilder_ == null) { if (!(extCase_ == 6)) { ext_ = ru.tinkoff.piapi.contract.v1.AssetEtf.getDefaultInstance(); } etfBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetEtf, ru.tinkoff.piapi.contract.v1.AssetEtf.Builder, ru.tinkoff.piapi.contract.v1.AssetEtfOrBuilder>( (ru.tinkoff.piapi.contract.v1.AssetEtf) ext_, getParentForChildren(), isClean()); ext_ = null; } extCase_ = 6; onChanged(); return etfBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetClearingCertificate, ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.Builder, ru.tinkoff.piapi.contract.v1.AssetClearingCertificateOrBuilder> clearingCertificateBuilder_; /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; * @return Whether the clearingCertificate field is set. */ @java.lang.Override public boolean hasClearingCertificate() { return extCase_ == 7; } /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; * @return The clearingCertificate. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetClearingCertificate getClearingCertificate() { if (clearingCertificateBuilder_ == null) { if (extCase_ == 7) { return (ru.tinkoff.piapi.contract.v1.AssetClearingCertificate) ext_; } return ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.getDefaultInstance(); } else { if (extCase_ == 7) { return clearingCertificateBuilder_.getMessage(); } return ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.getDefaultInstance(); } } /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; */ public Builder setClearingCertificate(ru.tinkoff.piapi.contract.v1.AssetClearingCertificate value) { if (clearingCertificateBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ext_ = value; onChanged(); } else { clearingCertificateBuilder_.setMessage(value); } extCase_ = 7; return this; } /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; */ public Builder setClearingCertificate( ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.Builder builderForValue) { if (clearingCertificateBuilder_ == null) { ext_ = builderForValue.build(); onChanged(); } else { clearingCertificateBuilder_.setMessage(builderForValue.build()); } extCase_ = 7; return this; } /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; */ public Builder mergeClearingCertificate(ru.tinkoff.piapi.contract.v1.AssetClearingCertificate value) { if (clearingCertificateBuilder_ == null) { if (extCase_ == 7 && ext_ != ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.getDefaultInstance()) { ext_ = ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.newBuilder((ru.tinkoff.piapi.contract.v1.AssetClearingCertificate) ext_) .mergeFrom(value).buildPartial(); } else { ext_ = value; } onChanged(); } else { if (extCase_ == 7) { clearingCertificateBuilder_.mergeFrom(value); } else { clearingCertificateBuilder_.setMessage(value); } } extCase_ = 7; return this; } /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; */ public Builder clearClearingCertificate() { if (clearingCertificateBuilder_ == null) { if (extCase_ == 7) { extCase_ = 0; ext_ = null; onChanged(); } } else { if (extCase_ == 7) { extCase_ = 0; ext_ = null; } clearingCertificateBuilder_.clear(); } return this; } /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; */ public ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.Builder getClearingCertificateBuilder() { return getClearingCertificateFieldBuilder().getBuilder(); } /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.AssetClearingCertificateOrBuilder getClearingCertificateOrBuilder() { if ((extCase_ == 7) && (clearingCertificateBuilder_ != null)) { return clearingCertificateBuilder_.getMessageOrBuilder(); } else { if (extCase_ == 7) { return (ru.tinkoff.piapi.contract.v1.AssetClearingCertificate) ext_; } return ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.getDefaultInstance(); } } /** *
     * Клиринговый сертификат участия. Заполняется только для клиринговых сертификатов (тип актива asset.type = "ASSET_TYPE_SECURITY" и security.type = clearing_certificate).
     * 
* * .tinkoff.public.invest.api.contract.v1.AssetClearingCertificate clearing_certificate = 7; */ private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetClearingCertificate, ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.Builder, ru.tinkoff.piapi.contract.v1.AssetClearingCertificateOrBuilder> getClearingCertificateFieldBuilder() { if (clearingCertificateBuilder_ == null) { if (!(extCase_ == 7)) { ext_ = ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.getDefaultInstance(); } clearingCertificateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.AssetClearingCertificate, ru.tinkoff.piapi.contract.v1.AssetClearingCertificate.Builder, ru.tinkoff.piapi.contract.v1.AssetClearingCertificateOrBuilder>( (ru.tinkoff.piapi.contract.v1.AssetClearingCertificate) ext_, getParentForChildren(), isClean()); ext_ = null; } extCase_ = 7; onChanged(); return clearingCertificateBuilder_; } @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.AssetSecurity) } // @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.AssetSecurity) private static final ru.tinkoff.piapi.contract.v1.AssetSecurity DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.AssetSecurity(); } public static ru.tinkoff.piapi.contract.v1.AssetSecurity getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AssetSecurity 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.AssetSecurity getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy