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

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

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

package ru.tinkoff.piapi.contract.v1;

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy