implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.Coupon)
ru.tinkoff.piapi.contract.v1.CouponOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_Coupon_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_Coupon_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.Coupon.class, ru.tinkoff.piapi.contract.v1.Coupon.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.Coupon.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
figi_ = "";
couponDate_ = null;
if (couponDateBuilder_ != null) {
couponDateBuilder_.dispose();
couponDateBuilder_ = null;
}
couponNumber_ = 0L;
fixDate_ = null;
if (fixDateBuilder_ != null) {
fixDateBuilder_.dispose();
fixDateBuilder_ = null;
}
payOneBond_ = null;
if (payOneBondBuilder_ != null) {
payOneBondBuilder_.dispose();
payOneBondBuilder_ = null;
}
couponType_ = 0;
couponStartDate_ = null;
if (couponStartDateBuilder_ != null) {
couponStartDateBuilder_.dispose();
couponStartDateBuilder_ = null;
}
couponEndDate_ = null;
if (couponEndDateBuilder_ != null) {
couponEndDateBuilder_.dispose();
couponEndDateBuilder_ = null;
}
couponPeriod_ = 0;
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_Coupon_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Coupon getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.Coupon.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Coupon build() {
ru.tinkoff.piapi.contract.v1.Coupon result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.Coupon buildPartial() {
ru.tinkoff.piapi.contract.v1.Coupon result = new ru.tinkoff.piapi.contract.v1.Coupon(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.Coupon result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.figi_ = figi_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.couponDate_ = couponDateBuilder_ == null
? couponDate_
: couponDateBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.couponNumber_ = couponNumber_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.fixDate_ = fixDateBuilder_ == null
? fixDate_
: fixDateBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.payOneBond_ = payOneBondBuilder_ == null
? payOneBond_
: payOneBondBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.couponType_ = couponType_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.couponStartDate_ = couponStartDateBuilder_ == null
? couponStartDate_
: couponStartDateBuilder_.build();
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.couponEndDate_ = couponEndDateBuilder_ == null
? couponEndDate_
: couponEndDateBuilder_.build();
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.couponPeriod_ = couponPeriod_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.Coupon) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.Coupon)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.Coupon other) {
if (other == ru.tinkoff.piapi.contract.v1.Coupon.getDefaultInstance()) return this;
if (!other.getFigi().isEmpty()) {
figi_ = other.figi_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasCouponDate()) {
mergeCouponDate(other.getCouponDate());
}
if (other.getCouponNumber() != 0L) {
setCouponNumber(other.getCouponNumber());
}
if (other.hasFixDate()) {
mergeFixDate(other.getFixDate());
}
if (other.hasPayOneBond()) {
mergePayOneBond(other.getPayOneBond());
}
if (other.couponType_ != 0) {
setCouponTypeValue(other.getCouponTypeValue());
}
if (other.hasCouponStartDate()) {
mergeCouponStartDate(other.getCouponStartDate());
}
if (other.hasCouponEndDate()) {
mergeCouponEndDate(other.getCouponEndDate());
}
if (other.getCouponPeriod() != 0) {
setCouponPeriod(other.getCouponPeriod());
}
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: {
figi_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getCouponDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
couponNumber_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
input.readMessage(
getFixDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
input.readMessage(
getPayOneBondFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 48: {
couponType_ = input.readEnum();
bitField0_ |= 0x00000020;
break;
} // case 48
case 58: {
input.readMessage(
getCouponStartDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 66: {
input.readMessage(
getCouponEndDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
case 72: {
couponPeriod_ = input.readInt32();
bitField0_ |= 0x00000100;
break;
} // case 72
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object figi_ = "";
/**
*
*Figi-идентификатор инструмента.
*
*
* string figi = 1;
* @return The figi.
*/
public java.lang.String getFigi() {
java.lang.Object ref = figi_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
figi_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Figi-идентификатор инструмента.
*
*
* string figi = 1;
* @return The bytes for figi.
*/
public com.google.protobuf.ByteString
getFigiBytes() {
java.lang.Object ref = figi_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
figi_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Figi-идентификатор инструмента.
*
*
* string figi = 1;
* @param value The figi to set.
* @return This builder for chaining.
*/
public Builder setFigi(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
figi_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Figi-идентификатор инструмента.
*
*
* string figi = 1;
* @return This builder for chaining.
*/
public Builder clearFigi() {
figi_ = getDefaultInstance().getFigi();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*Figi-идентификатор инструмента.
*
*
* string figi = 1;
* @param value The bytes for figi to set.
* @return This builder for chaining.
*/
public Builder setFigiBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
figi_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.Timestamp couponDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> couponDateBuilder_;
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
* @return Whether the couponDate field is set.
*/
public boolean hasCouponDate() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
* @return The couponDate.
*/
public com.google.protobuf.Timestamp getCouponDate() {
if (couponDateBuilder_ == null) {
return couponDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : couponDate_;
} else {
return couponDateBuilder_.getMessage();
}
}
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
*/
public Builder setCouponDate(com.google.protobuf.Timestamp value) {
if (couponDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
couponDate_ = value;
} else {
couponDateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
*/
public Builder setCouponDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (couponDateBuilder_ == null) {
couponDate_ = builderForValue.build();
} else {
couponDateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
*/
public Builder mergeCouponDate(com.google.protobuf.Timestamp value) {
if (couponDateBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
couponDate_ != null &&
couponDate_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCouponDateBuilder().mergeFrom(value);
} else {
couponDate_ = value;
}
} else {
couponDateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
*/
public Builder clearCouponDate() {
bitField0_ = (bitField0_ & ~0x00000002);
couponDate_ = null;
if (couponDateBuilder_ != null) {
couponDateBuilder_.dispose();
couponDateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
*/
public com.google.protobuf.Timestamp.Builder getCouponDateBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getCouponDateFieldBuilder().getBuilder();
}
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
*/
public com.google.protobuf.TimestampOrBuilder getCouponDateOrBuilder() {
if (couponDateBuilder_ != null) {
return couponDateBuilder_.getMessageOrBuilder();
} else {
return couponDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : couponDate_;
}
}
/**
*
*Дата выплаты купона.
*
*
* .google.protobuf.Timestamp coupon_date = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCouponDateFieldBuilder() {
if (couponDateBuilder_ == null) {
couponDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCouponDate(),
getParentForChildren(),
isClean());
couponDate_ = null;
}
return couponDateBuilder_;
}
private long couponNumber_ ;
/**
*
*Номер купона.
*
*
* int64 coupon_number = 3;
* @return The couponNumber.
*/
@java.lang.Override
public long getCouponNumber() {
return couponNumber_;
}
/**
*
*Номер купона.
*
*
* int64 coupon_number = 3;
* @param value The couponNumber to set.
* @return This builder for chaining.
*/
public Builder setCouponNumber(long value) {
couponNumber_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*Номер купона.
*
*
* int64 coupon_number = 3;
* @return This builder for chaining.
*/
public Builder clearCouponNumber() {
bitField0_ = (bitField0_ & ~0x00000004);
couponNumber_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.Timestamp fixDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> fixDateBuilder_;
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
* @return Whether the fixDate field is set.
*/
public boolean hasFixDate() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
* @return The fixDate.
*/
public com.google.protobuf.Timestamp getFixDate() {
if (fixDateBuilder_ == null) {
return fixDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : fixDate_;
} else {
return fixDateBuilder_.getMessage();
}
}
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
*/
public Builder setFixDate(com.google.protobuf.Timestamp value) {
if (fixDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fixDate_ = value;
} else {
fixDateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
*/
public Builder setFixDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (fixDateBuilder_ == null) {
fixDate_ = builderForValue.build();
} else {
fixDateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
*/
public Builder mergeFixDate(com.google.protobuf.Timestamp value) {
if (fixDateBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
fixDate_ != null &&
fixDate_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getFixDateBuilder().mergeFrom(value);
} else {
fixDate_ = value;
}
} else {
fixDateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
*/
public Builder clearFixDate() {
bitField0_ = (bitField0_ & ~0x00000008);
fixDate_ = null;
if (fixDateBuilder_ != null) {
fixDateBuilder_.dispose();
fixDateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
*/
public com.google.protobuf.Timestamp.Builder getFixDateBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getFixDateFieldBuilder().getBuilder();
}
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
*/
public com.google.protobuf.TimestampOrBuilder getFixDateOrBuilder() {
if (fixDateBuilder_ != null) {
return fixDateBuilder_.getMessageOrBuilder();
} else {
return fixDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : fixDate_;
}
}
/**
*
*(Опционально) Дата фиксации реестра для выплаты купона.
*
*
* .google.protobuf.Timestamp fix_date = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getFixDateFieldBuilder() {
if (fixDateBuilder_ == null) {
fixDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getFixDate(),
getParentForChildren(),
isClean());
fixDate_ = null;
}
return fixDateBuilder_;
}
private ru.tinkoff.piapi.contract.v1.MoneyValue payOneBond_;
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder> payOneBondBuilder_;
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
* @return Whether the payOneBond field is set.
*/
public boolean hasPayOneBond() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
* @return The payOneBond.
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue getPayOneBond() {
if (payOneBondBuilder_ == null) {
return payOneBond_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : payOneBond_;
} else {
return payOneBondBuilder_.getMessage();
}
}
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
*/
public Builder setPayOneBond(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (payOneBondBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
payOneBond_ = value;
} else {
payOneBondBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
*/
public Builder setPayOneBond(
ru.tinkoff.piapi.contract.v1.MoneyValue.Builder builderForValue) {
if (payOneBondBuilder_ == null) {
payOneBond_ = builderForValue.build();
} else {
payOneBondBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
*/
public Builder mergePayOneBond(ru.tinkoff.piapi.contract.v1.MoneyValue value) {
if (payOneBondBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
payOneBond_ != null &&
payOneBond_ != ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance()) {
getPayOneBondBuilder().mergeFrom(value);
} else {
payOneBond_ = value;
}
} else {
payOneBondBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
*/
public Builder clearPayOneBond() {
bitField0_ = (bitField0_ & ~0x00000010);
payOneBond_ = null;
if (payOneBondBuilder_ != null) {
payOneBondBuilder_.dispose();
payOneBondBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValue.Builder getPayOneBondBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getPayOneBondFieldBuilder().getBuilder();
}
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
*/
public ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder getPayOneBondOrBuilder() {
if (payOneBondBuilder_ != null) {
return payOneBondBuilder_.getMessageOrBuilder();
} else {
return payOneBond_ == null ?
ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : payOneBond_;
}
}
/**
*
*Выплата на одну облигацию.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue pay_one_bond = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>
getPayOneBondFieldBuilder() {
if (payOneBondBuilder_ == null) {
payOneBondBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>(
getPayOneBond(),
getParentForChildren(),
isClean());
payOneBond_ = null;
}
return payOneBondBuilder_;
}
private int couponType_ = 0;
/**
*
*Тип купона.
*
*
* .tinkoff.public.invest.api.contract.v1.CouponType coupon_type = 6;
* @return The enum numeric value on the wire for couponType.
*/
@java.lang.Override public int getCouponTypeValue() {
return couponType_;
}
/**
*
*Тип купона.
*
*
* .tinkoff.public.invest.api.contract.v1.CouponType coupon_type = 6;
* @param value The enum numeric value on the wire for couponType to set.
* @return This builder for chaining.
*/
public Builder setCouponTypeValue(int value) {
couponType_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Тип купона.
*
*
* .tinkoff.public.invest.api.contract.v1.CouponType coupon_type = 6;
* @return The couponType.
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.CouponType getCouponType() {
ru.tinkoff.piapi.contract.v1.CouponType result = ru.tinkoff.piapi.contract.v1.CouponType.forNumber(couponType_);
return result == null ? ru.tinkoff.piapi.contract.v1.CouponType.UNRECOGNIZED : result;
}
/**
*
*Тип купона.
*
*
* .tinkoff.public.invest.api.contract.v1.CouponType coupon_type = 6;
* @param value The couponType to set.
* @return This builder for chaining.
*/
public Builder setCouponType(ru.tinkoff.piapi.contract.v1.CouponType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
couponType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*Тип купона.
*
*
* .tinkoff.public.invest.api.contract.v1.CouponType coupon_type = 6;
* @return This builder for chaining.
*/
public Builder clearCouponType() {
bitField0_ = (bitField0_ & ~0x00000020);
couponType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp couponStartDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> couponStartDateBuilder_;
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
* @return Whether the couponStartDate field is set.
*/
public boolean hasCouponStartDate() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
* @return The couponStartDate.
*/
public com.google.protobuf.Timestamp getCouponStartDate() {
if (couponStartDateBuilder_ == null) {
return couponStartDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : couponStartDate_;
} else {
return couponStartDateBuilder_.getMessage();
}
}
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
*/
public Builder setCouponStartDate(com.google.protobuf.Timestamp value) {
if (couponStartDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
couponStartDate_ = value;
} else {
couponStartDateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
*/
public Builder setCouponStartDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (couponStartDateBuilder_ == null) {
couponStartDate_ = builderForValue.build();
} else {
couponStartDateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
*/
public Builder mergeCouponStartDate(com.google.protobuf.Timestamp value) {
if (couponStartDateBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
couponStartDate_ != null &&
couponStartDate_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCouponStartDateBuilder().mergeFrom(value);
} else {
couponStartDate_ = value;
}
} else {
couponStartDateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
*/
public Builder clearCouponStartDate() {
bitField0_ = (bitField0_ & ~0x00000040);
couponStartDate_ = null;
if (couponStartDateBuilder_ != null) {
couponStartDateBuilder_.dispose();
couponStartDateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
*/
public com.google.protobuf.Timestamp.Builder getCouponStartDateBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getCouponStartDateFieldBuilder().getBuilder();
}
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
*/
public com.google.protobuf.TimestampOrBuilder getCouponStartDateOrBuilder() {
if (couponStartDateBuilder_ != null) {
return couponStartDateBuilder_.getMessageOrBuilder();
} else {
return couponStartDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : couponStartDate_;
}
}
/**
*
*Начало купонного периода.
*
*
* .google.protobuf.Timestamp coupon_start_date = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCouponStartDateFieldBuilder() {
if (couponStartDateBuilder_ == null) {
couponStartDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCouponStartDate(),
getParentForChildren(),
isClean());
couponStartDate_ = null;
}
return couponStartDateBuilder_;
}
private com.google.protobuf.Timestamp couponEndDate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> couponEndDateBuilder_;
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
* @return Whether the couponEndDate field is set.
*/
public boolean hasCouponEndDate() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
* @return The couponEndDate.
*/
public com.google.protobuf.Timestamp getCouponEndDate() {
if (couponEndDateBuilder_ == null) {
return couponEndDate_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : couponEndDate_;
} else {
return couponEndDateBuilder_.getMessage();
}
}
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
*/
public Builder setCouponEndDate(com.google.protobuf.Timestamp value) {
if (couponEndDateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
couponEndDate_ = value;
} else {
couponEndDateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
*/
public Builder setCouponEndDate(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (couponEndDateBuilder_ == null) {
couponEndDate_ = builderForValue.build();
} else {
couponEndDateBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
*/
public Builder mergeCouponEndDate(com.google.protobuf.Timestamp value) {
if (couponEndDateBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
couponEndDate_ != null &&
couponEndDate_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCouponEndDateBuilder().mergeFrom(value);
} else {
couponEndDate_ = value;
}
} else {
couponEndDateBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
*/
public Builder clearCouponEndDate() {
bitField0_ = (bitField0_ & ~0x00000080);
couponEndDate_ = null;
if (couponEndDateBuilder_ != null) {
couponEndDateBuilder_.dispose();
couponEndDateBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
*/
public com.google.protobuf.Timestamp.Builder getCouponEndDateBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getCouponEndDateFieldBuilder().getBuilder();
}
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
*/
public com.google.protobuf.TimestampOrBuilder getCouponEndDateOrBuilder() {
if (couponEndDateBuilder_ != null) {
return couponEndDateBuilder_.getMessageOrBuilder();
} else {
return couponEndDate_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : couponEndDate_;
}
}
/**
*
*Окончание купонного периода.
*
*
* .google.protobuf.Timestamp coupon_end_date = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCouponEndDateFieldBuilder() {
if (couponEndDateBuilder_ == null) {
couponEndDateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCouponEndDate(),
getParentForChildren(),
isClean());
couponEndDate_ = null;
}
return couponEndDateBuilder_;
}
private int couponPeriod_ ;
/**
*
*Купонный период в днях.
*
*
* int32 coupon_period = 9;
* @return The couponPeriod.
*/
@java.lang.Override
public int getCouponPeriod() {
return couponPeriod_;
}
/**
*
*Купонный период в днях.
*
*
* int32 coupon_period = 9;
* @param value The couponPeriod to set.
* @return This builder for chaining.
*/
public Builder setCouponPeriod(int value) {
couponPeriod_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*Купонный период в днях.
*
*
* int32 coupon_period = 9;
* @return This builder for chaining.
*/
public Builder clearCouponPeriod() {
bitField0_ = (bitField0_ & ~0x00000100);
couponPeriod_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tinkoff.public.invest.api.contract.v1.Coupon)
}
// @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.Coupon)
private static final ru.tinkoff.piapi.contract.v1.Coupon DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.Coupon();
}
public static ru.tinkoff.piapi.contract.v1.Coupon getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Coupon 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.Coupon getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}