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

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

There is a newer version: 1.25
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: operations.proto

package ru.tinkoff.piapi.contract.v1;

/**
 * 
 *Сделка по операции.
 * 
* * Protobuf type {@code tinkoff.public.invest.api.contract.v1.OperationTrade} */ public final class OperationTrade extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.OperationTrade) OperationTradeOrBuilder { private static final long serialVersionUID = 0L; // Use OperationTrade.newBuilder() to construct. private OperationTrade(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private OperationTrade() { tradeId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new OperationTrade(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_OperationTrade_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_OperationTrade_fieldAccessorTable .ensureFieldAccessorsInitialized( ru.tinkoff.piapi.contract.v1.OperationTrade.class, ru.tinkoff.piapi.contract.v1.OperationTrade.Builder.class); } public static final int TRADE_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object tradeId_ = ""; /** *
   *Идентификатор сделки.
   * 
* * string trade_id = 1; * @return The tradeId. */ @java.lang.Override public java.lang.String getTradeId() { java.lang.Object ref = tradeId_; 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(); tradeId_ = s; return s; } } /** *
   *Идентификатор сделки.
   * 
* * string trade_id = 1; * @return The bytes for tradeId. */ @java.lang.Override public com.google.protobuf.ByteString getTradeIdBytes() { java.lang.Object ref = tradeId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); tradeId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DATE_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp dateTime_; /** *
   *Дата и время сделки в часовом поясе UTC.
   * 
* * .google.protobuf.Timestamp date_time = 2; * @return Whether the dateTime field is set. */ @java.lang.Override public boolean hasDateTime() { return dateTime_ != null; } /** *
   *Дата и время сделки в часовом поясе UTC.
   * 
* * .google.protobuf.Timestamp date_time = 2; * @return The dateTime. */ @java.lang.Override public com.google.protobuf.Timestamp getDateTime() { return dateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dateTime_; } /** *
   *Дата и время сделки в часовом поясе UTC.
   * 
* * .google.protobuf.Timestamp date_time = 2; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getDateTimeOrBuilder() { return dateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dateTime_; } public static final int QUANTITY_FIELD_NUMBER = 3; private long quantity_ = 0L; /** *
   *Количество инструментов.
   * 
* * int64 quantity = 3; * @return The quantity. */ @java.lang.Override public long getQuantity() { return quantity_; } public static final int PRICE_FIELD_NUMBER = 4; private ru.tinkoff.piapi.contract.v1.MoneyValue price_; /** *
   *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
   * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; * @return Whether the price field is set. */ @java.lang.Override public boolean hasPrice() { return price_ != null; } /** *
   *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
   * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; * @return The price. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.MoneyValue getPrice() { return price_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : price_; } /** *
   *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
   * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder getPriceOrBuilder() { return price_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : price_; } 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(tradeId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tradeId_); } if (dateTime_ != null) { output.writeMessage(2, getDateTime()); } if (quantity_ != 0L) { output.writeInt64(3, quantity_); } if (price_ != null) { output.writeMessage(4, getPrice()); } 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(tradeId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tradeId_); } if (dateTime_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getDateTime()); } if (quantity_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, quantity_); } if (price_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getPrice()); } 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.OperationTrade)) { return super.equals(obj); } ru.tinkoff.piapi.contract.v1.OperationTrade other = (ru.tinkoff.piapi.contract.v1.OperationTrade) obj; if (!getTradeId() .equals(other.getTradeId())) return false; if (hasDateTime() != other.hasDateTime()) return false; if (hasDateTime()) { if (!getDateTime() .equals(other.getDateTime())) return false; } if (getQuantity() != other.getQuantity()) return false; if (hasPrice() != other.hasPrice()) return false; if (hasPrice()) { if (!getPrice() .equals(other.getPrice())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TRADE_ID_FIELD_NUMBER; hash = (53 * hash) + getTradeId().hashCode(); if (hasDateTime()) { hash = (37 * hash) + DATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getDateTime().hashCode(); } hash = (37 * hash) + QUANTITY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getQuantity()); if (hasPrice()) { hash = (37 * hash) + PRICE_FIELD_NUMBER; hash = (53 * hash) + getPrice().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ru.tinkoff.piapi.contract.v1.OperationTrade parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.OperationTrade 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.OperationTrade parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.OperationTrade 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.OperationTrade parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.OperationTrade 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.OperationTrade parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ru.tinkoff.piapi.contract.v1.OperationTrade 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.OperationTrade parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ru.tinkoff.piapi.contract.v1.OperationTrade 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.OperationTrade 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.OperationTrade 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.OperationTrade 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.OperationTrade} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.OperationTrade) ru.tinkoff.piapi.contract.v1.OperationTradeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_OperationTrade_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_OperationTrade_fieldAccessorTable .ensureFieldAccessorsInitialized( ru.tinkoff.piapi.contract.v1.OperationTrade.class, ru.tinkoff.piapi.contract.v1.OperationTrade.Builder.class); } // Construct using ru.tinkoff.piapi.contract.v1.OperationTrade.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; tradeId_ = ""; dateTime_ = null; if (dateTimeBuilder_ != null) { dateTimeBuilder_.dispose(); dateTimeBuilder_ = null; } quantity_ = 0L; price_ = null; if (priceBuilder_ != null) { priceBuilder_.dispose(); priceBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_OperationTrade_descriptor; } @java.lang.Override public ru.tinkoff.piapi.contract.v1.OperationTrade getDefaultInstanceForType() { return ru.tinkoff.piapi.contract.v1.OperationTrade.getDefaultInstance(); } @java.lang.Override public ru.tinkoff.piapi.contract.v1.OperationTrade build() { ru.tinkoff.piapi.contract.v1.OperationTrade result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ru.tinkoff.piapi.contract.v1.OperationTrade buildPartial() { ru.tinkoff.piapi.contract.v1.OperationTrade result = new ru.tinkoff.piapi.contract.v1.OperationTrade(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ru.tinkoff.piapi.contract.v1.OperationTrade result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.tradeId_ = tradeId_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.dateTime_ = dateTimeBuilder_ == null ? dateTime_ : dateTimeBuilder_.build(); } if (((from_bitField0_ & 0x00000004) != 0)) { result.quantity_ = quantity_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.price_ = priceBuilder_ == null ? price_ : priceBuilder_.build(); } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ru.tinkoff.piapi.contract.v1.OperationTrade) { return mergeFrom((ru.tinkoff.piapi.contract.v1.OperationTrade)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.OperationTrade other) { if (other == ru.tinkoff.piapi.contract.v1.OperationTrade.getDefaultInstance()) return this; if (!other.getTradeId().isEmpty()) { tradeId_ = other.tradeId_; bitField0_ |= 0x00000001; onChanged(); } if (other.hasDateTime()) { mergeDateTime(other.getDateTime()); } if (other.getQuantity() != 0L) { setQuantity(other.getQuantity()); } if (other.hasPrice()) { mergePrice(other.getPrice()); } 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: { tradeId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getDateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 24: { quantity_ = input.readInt64(); bitField0_ |= 0x00000004; break; } // case 24 case 34: { input.readMessage( getPriceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 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 tradeId_ = ""; /** *
     *Идентификатор сделки.
     * 
* * string trade_id = 1; * @return The tradeId. */ public java.lang.String getTradeId() { java.lang.Object ref = tradeId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); tradeId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     *Идентификатор сделки.
     * 
* * string trade_id = 1; * @return The bytes for tradeId. */ public com.google.protobuf.ByteString getTradeIdBytes() { java.lang.Object ref = tradeId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); tradeId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     *Идентификатор сделки.
     * 
* * string trade_id = 1; * @param value The tradeId to set. * @return This builder for chaining. */ public Builder setTradeId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } tradeId_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     *Идентификатор сделки.
     * 
* * string trade_id = 1; * @return This builder for chaining. */ public Builder clearTradeId() { tradeId_ = getDefaultInstance().getTradeId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     *Идентификатор сделки.
     * 
* * string trade_id = 1; * @param value The bytes for tradeId to set. * @return This builder for chaining. */ public Builder setTradeIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); tradeId_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private com.google.protobuf.Timestamp dateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> dateTimeBuilder_; /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; * @return Whether the dateTime field is set. */ public boolean hasDateTime() { return ((bitField0_ & 0x00000002) != 0); } /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; * @return The dateTime. */ public com.google.protobuf.Timestamp getDateTime() { if (dateTimeBuilder_ == null) { return dateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dateTime_; } else { return dateTimeBuilder_.getMessage(); } } /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; */ public Builder setDateTime(com.google.protobuf.Timestamp value) { if (dateTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } dateTime_ = value; } else { dateTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; */ public Builder setDateTime( com.google.protobuf.Timestamp.Builder builderForValue) { if (dateTimeBuilder_ == null) { dateTime_ = builderForValue.build(); } else { dateTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; */ public Builder mergeDateTime(com.google.protobuf.Timestamp value) { if (dateTimeBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && dateTime_ != null && dateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getDateTimeBuilder().mergeFrom(value); } else { dateTime_ = value; } } else { dateTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; */ public Builder clearDateTime() { bitField0_ = (bitField0_ & ~0x00000002); dateTime_ = null; if (dateTimeBuilder_ != null) { dateTimeBuilder_.dispose(); dateTimeBuilder_ = null; } onChanged(); return this; } /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; */ public com.google.protobuf.Timestamp.Builder getDateTimeBuilder() { bitField0_ |= 0x00000002; onChanged(); return getDateTimeFieldBuilder().getBuilder(); } /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; */ public com.google.protobuf.TimestampOrBuilder getDateTimeOrBuilder() { if (dateTimeBuilder_ != null) { return dateTimeBuilder_.getMessageOrBuilder(); } else { return dateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dateTime_; } } /** *
     *Дата и время сделки в часовом поясе UTC.
     * 
* * .google.protobuf.Timestamp date_time = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getDateTimeFieldBuilder() { if (dateTimeBuilder_ == null) { dateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getDateTime(), getParentForChildren(), isClean()); dateTime_ = null; } return dateTimeBuilder_; } private long quantity_ ; /** *
     *Количество инструментов.
     * 
* * int64 quantity = 3; * @return The quantity. */ @java.lang.Override public long getQuantity() { return quantity_; } /** *
     *Количество инструментов.
     * 
* * int64 quantity = 3; * @param value The quantity to set. * @return This builder for chaining. */ public Builder setQuantity(long value) { quantity_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     *Количество инструментов.
     * 
* * int64 quantity = 3; * @return This builder for chaining. */ public Builder clearQuantity() { bitField0_ = (bitField0_ & ~0x00000004); quantity_ = 0L; onChanged(); return this; } private ru.tinkoff.piapi.contract.v1.MoneyValue price_; private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder> priceBuilder_; /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; * @return Whether the price field is set. */ public boolean hasPrice() { return ((bitField0_ & 0x00000008) != 0); } /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; * @return The price. */ public ru.tinkoff.piapi.contract.v1.MoneyValue getPrice() { if (priceBuilder_ == null) { return price_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : price_; } else { return priceBuilder_.getMessage(); } } /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; */ public Builder setPrice(ru.tinkoff.piapi.contract.v1.MoneyValue value) { if (priceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } price_ = value; } else { priceBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; */ public Builder setPrice( ru.tinkoff.piapi.contract.v1.MoneyValue.Builder builderForValue) { if (priceBuilder_ == null) { price_ = builderForValue.build(); } else { priceBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; */ public Builder mergePrice(ru.tinkoff.piapi.contract.v1.MoneyValue value) { if (priceBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && price_ != null && price_ != ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance()) { getPriceBuilder().mergeFrom(value); } else { price_ = value; } } else { priceBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; */ public Builder clearPrice() { bitField0_ = (bitField0_ & ~0x00000008); price_ = null; if (priceBuilder_ != null) { priceBuilder_.dispose(); priceBuilder_ = null; } onChanged(); return this; } /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; */ public ru.tinkoff.piapi.contract.v1.MoneyValue.Builder getPriceBuilder() { bitField0_ |= 0x00000008; onChanged(); return getPriceFieldBuilder().getBuilder(); } /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; */ public ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder getPriceOrBuilder() { if (priceBuilder_ != null) { return priceBuilder_.getMessageOrBuilder(); } else { return price_ == null ? ru.tinkoff.piapi.contract.v1.MoneyValue.getDefaultInstance() : price_; } } /** *
     *Цена за 1 инструмент. Для получения стоимости лота требуется умножить на лотность инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.MoneyValue price = 4; */ private com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder> getPriceFieldBuilder() { if (priceBuilder_ == null) { priceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< ru.tinkoff.piapi.contract.v1.MoneyValue, ru.tinkoff.piapi.contract.v1.MoneyValue.Builder, ru.tinkoff.piapi.contract.v1.MoneyValueOrBuilder>( getPrice(), getParentForChildren(), isClean()); price_ = null; } return priceBuilder_; } @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.OperationTrade) } // @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.OperationTrade) private static final ru.tinkoff.piapi.contract.v1.OperationTrade DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.OperationTrade(); } public static ru.tinkoff.piapi.contract.v1.OperationTrade getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public OperationTrade 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.OperationTrade getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy