Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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.OperationItemTrade}
*/
public final class OperationItemTrade extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.OperationItemTrade)
OperationItemTradeOrBuilder {
private static final long serialVersionUID = 0L;
// Use OperationItemTrade.newBuilder() to construct.
private OperationItemTrade(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OperationItemTrade() {
num_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new OperationItemTrade();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_OperationItemTrade_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_OperationItemTrade_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.OperationItemTrade.class, ru.tinkoff.piapi.contract.v1.OperationItemTrade.Builder.class);
}
public static final int NUM_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object num_ = "";
/**
*
*Номер сделки
*
*
* string num = 1;
* @return The num.
*/
@java.lang.Override
public java.lang.String getNum() {
java.lang.Object ref = num_;
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();
num_ = s;
return s;
}
}
/**
*
*Номер сделки
*
*
* string num = 1;
* @return The bytes for num.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNumBytes() {
java.lang.Object ref = num_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
num_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DATE_FIELD_NUMBER = 6;
private com.google.protobuf.Timestamp date_;
/**
*
*Дата сделки
*
*
* .google.protobuf.Timestamp date = 6;
* @return Whether the date field is set.
*/
@java.lang.Override
public boolean hasDate() {
return date_ != null;
}
/**
*
*Дата сделки
*
*
* .google.protobuf.Timestamp date = 6;
* @return The date.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getDate() {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
}
/**
*
*Дата сделки
*
*
* .google.protobuf.Timestamp date = 6;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getDateOrBuilder() {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
}
public static final int QUANTITY_FIELD_NUMBER = 11;
private long quantity_ = 0L;
/**
*
*Количество в единицах.
*
*
* int64 quantity = 11;
* @return The quantity.
*/
@java.lang.Override
public long getQuantity() {
return quantity_;
}
public static final int PRICE_FIELD_NUMBER = 16;
private ru.tinkoff.piapi.contract.v1.MoneyValue price_;
/**
*
*Цена.
*
*
* .tinkoff.public.invest.api.contract.v1.MoneyValue price = 16;
* @return Whether the price field is set.
*/
@java.lang.Override
public boolean hasPrice() {
return price_ != null;
}
/**
*
*
* .tinkoff.public.invest.api.contract.v1.Quotation yield_relative = 22;
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.QuotationOrBuilder getYieldRelativeOrBuilder() {
return yieldRelative_ == null ? ru.tinkoff.piapi.contract.v1.Quotation.getDefaultInstance() : yieldRelative_;
}
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(num_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, num_);
}
if (date_ != null) {
output.writeMessage(6, getDate());
}
if (quantity_ != 0L) {
output.writeInt64(11, quantity_);
}
if (price_ != null) {
output.writeMessage(16, getPrice());
}
if (yield_ != null) {
output.writeMessage(21, getYield());
}
if (yieldRelative_ != null) {
output.writeMessage(22, getYieldRelative());
}
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(num_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, num_);
}
if (date_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getDate());
}
if (quantity_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(11, quantity_);
}
if (price_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getPrice());
}
if (yield_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(21, getYield());
}
if (yieldRelative_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(22, getYieldRelative());
}
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.OperationItemTrade)) {
return super.equals(obj);
}
ru.tinkoff.piapi.contract.v1.OperationItemTrade other = (ru.tinkoff.piapi.contract.v1.OperationItemTrade) obj;
if (!getNum()
.equals(other.getNum())) return false;
if (hasDate() != other.hasDate()) return false;
if (hasDate()) {
if (!getDate()
.equals(other.getDate())) return false;
}
if (getQuantity()
!= other.getQuantity()) return false;
if (hasPrice() != other.hasPrice()) return false;
if (hasPrice()) {
if (!getPrice()
.equals(other.getPrice())) return false;
}
if (hasYield() != other.hasYield()) return false;
if (hasYield()) {
if (!getYield()
.equals(other.getYield())) return false;
}
if (hasYieldRelative() != other.hasYieldRelative()) return false;
if (hasYieldRelative()) {
if (!getYieldRelative()
.equals(other.getYieldRelative())) 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) + NUM_FIELD_NUMBER;
hash = (53 * hash) + getNum().hashCode();
if (hasDate()) {
hash = (37 * hash) + DATE_FIELD_NUMBER;
hash = (53 * hash) + getDate().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();
}
if (hasYield()) {
hash = (37 * hash) + YIELD_FIELD_NUMBER;
hash = (53 * hash) + getYield().hashCode();
}
if (hasYieldRelative()) {
hash = (37 * hash) + YIELD_RELATIVE_FIELD_NUMBER;
hash = (53 * hash) + getYieldRelative().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static ru.tinkoff.piapi.contract.v1.OperationItemTrade parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.OperationItemTrade 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.OperationItemTrade parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.OperationItemTrade 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.OperationItemTrade parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.OperationItemTrade 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.OperationItemTrade parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.OperationItemTrade 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.OperationItemTrade parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.OperationItemTrade 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.OperationItemTrade 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.OperationItemTrade 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.OperationItemTrade 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.OperationItemTrade}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.OperationItemTrade)
ru.tinkoff.piapi.contract.v1.OperationItemTradeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Operations.internal_static_tinkoff_public_invest_api_contract_v1_OperationItemTrade_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_OperationItemTrade_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.OperationItemTrade.class, ru.tinkoff.piapi.contract.v1.OperationItemTrade.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.OperationItemTrade.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
num_ = "";
date_ = null;
if (dateBuilder_ != null) {
dateBuilder_.dispose();
dateBuilder_ = null;
}
quantity_ = 0L;
price_ = null;
if (priceBuilder_ != null) {
priceBuilder_.dispose();
priceBuilder_ = null;
}
yield_ = null;
if (yieldBuilder_ != null) {
yieldBuilder_.dispose();
yieldBuilder_ = null;
}
yieldRelative_ = null;
if (yieldRelativeBuilder_ != null) {
yieldRelativeBuilder_.dispose();
yieldRelativeBuilder_ = 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_OperationItemTrade_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.OperationItemTrade getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.OperationItemTrade.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.OperationItemTrade build() {
ru.tinkoff.piapi.contract.v1.OperationItemTrade result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.OperationItemTrade buildPartial() {
ru.tinkoff.piapi.contract.v1.OperationItemTrade result = new ru.tinkoff.piapi.contract.v1.OperationItemTrade(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.OperationItemTrade result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.num_ = num_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.date_ = dateBuilder_ == null
? date_
: dateBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.quantity_ = quantity_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.price_ = priceBuilder_ == null
? price_
: priceBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.yield_ = yieldBuilder_ == null
? yield_
: yieldBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.yieldRelative_ = yieldRelativeBuilder_ == null
? yieldRelative_
: yieldRelativeBuilder_.build();
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.OperationItemTrade) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.OperationItemTrade)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.OperationItemTrade other) {
if (other == ru.tinkoff.piapi.contract.v1.OperationItemTrade.getDefaultInstance()) return this;
if (!other.getNum().isEmpty()) {
num_ = other.num_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasDate()) {
mergeDate(other.getDate());
}
if (other.getQuantity() != 0L) {
setQuantity(other.getQuantity());
}
if (other.hasPrice()) {
mergePrice(other.getPrice());
}
if (other.hasYield()) {
mergeYield(other.getYield());
}
if (other.hasYieldRelative()) {
mergeYieldRelative(other.getYieldRelative());
}
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: {
num_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 50: {
input.readMessage(
getDateFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 50
case 88: {
quantity_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 88
case 130: {
input.readMessage(
getPriceFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 130
case 170: {
input.readMessage(
getYieldFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 170
case 178: {
input.readMessage(
getYieldRelativeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 178
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 num_ = "";
/**
*
*Номер сделки
*
*
* string num = 1;
* @return The num.
*/
public java.lang.String getNum() {
java.lang.Object ref = num_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
num_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Номер сделки
*
*
* string num = 1;
* @return The bytes for num.
*/
public com.google.protobuf.ByteString
getNumBytes() {
java.lang.Object ref = num_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
num_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Номер сделки
*
*
* string num = 1;
* @param value The num to set.
* @return This builder for chaining.
*/
public Builder setNum(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
num_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Номер сделки
*
*
* string num = 1;
* @return This builder for chaining.
*/
public Builder clearNum() {
num_ = getDefaultInstance().getNum();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*Номер сделки
*
*
* string num = 1;
* @param value The bytes for num to set.
* @return This builder for chaining.
*/
public Builder setNumBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
num_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.Timestamp date_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> dateBuilder_;
/**
*
*Дата сделки
*
*
* .google.protobuf.Timestamp date = 6;
* @return Whether the date field is set.
*/
public boolean hasDate() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*Дата сделки
*
*
* .google.protobuf.Timestamp date = 6;
* @return The date.
*/
public com.google.protobuf.Timestamp getDate() {
if (dateBuilder_ == null) {
return date_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : date_;
} else {
return dateBuilder_.getMessage();
}
}
/**
*
*Дата сделки
*
*
* .google.protobuf.Timestamp date = 6;
*/
public Builder setDate(com.google.protobuf.Timestamp value) {
if (dateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
date_ = value;
} else {
dateBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*