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;
}
}