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: marketdata.proto
package ru.tinkoff.piapi.contract.v1;
/**
*
*Изменение статуса подписки на цену последней сделки по инструменту.
*
*
* Protobuf type {@code tinkoff.public.invest.api.contract.v1.SubscribeLastPriceRequest}
*/
public final class SubscribeLastPriceRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.SubscribeLastPriceRequest)
SubscribeLastPriceRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use SubscribeLastPriceRequest.newBuilder() to construct.
private SubscribeLastPriceRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SubscribeLastPriceRequest() {
subscriptionAction_ = 0;
instruments_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SubscribeLastPriceRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Marketdata.internal_static_tinkoff_public_invest_api_contract_v1_SubscribeLastPriceRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Marketdata.internal_static_tinkoff_public_invest_api_contract_v1_SubscribeLastPriceRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest.class, ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest.Builder.class);
}
public static final int SUBSCRIPTION_ACTION_FIELD_NUMBER = 1;
private int subscriptionAction_ = 0;
/**
*
*Изменение статуса подписки.
*
*
* .tinkoff.public.invest.api.contract.v1.SubscriptionAction subscription_action = 1;
* @return The enum numeric value on the wire for subscriptionAction.
*/
@java.lang.Override public int getSubscriptionActionValue() {
return subscriptionAction_;
}
/**
*
*Изменение статуса подписки.
*
*
* .tinkoff.public.invest.api.contract.v1.SubscriptionAction subscription_action = 1;
* @return The subscriptionAction.
*/
@java.lang.Override public ru.tinkoff.piapi.contract.v1.SubscriptionAction getSubscriptionAction() {
ru.tinkoff.piapi.contract.v1.SubscriptionAction result = ru.tinkoff.piapi.contract.v1.SubscriptionAction.forNumber(subscriptionAction_);
return result == null ? ru.tinkoff.piapi.contract.v1.SubscriptionAction.UNRECOGNIZED : result;
}
public static final int INSTRUMENTS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List instruments_;
/**
*
*Массив инструментов для подписки на цену последней сделки.
*
*Массив инструментов для подписки на цену последней сделки.
*
*
* repeated .tinkoff.public.invest.api.contract.v1.LastPriceInstrument instruments = 2;
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.LastPriceInstrumentOrBuilder getInstrumentsOrBuilder(
int index) {
return instruments_.get(index);
}
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 (subscriptionAction_ != ru.tinkoff.piapi.contract.v1.SubscriptionAction.SUBSCRIPTION_ACTION_UNSPECIFIED.getNumber()) {
output.writeEnum(1, subscriptionAction_);
}
for (int i = 0; i < instruments_.size(); i++) {
output.writeMessage(2, instruments_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (subscriptionAction_ != ru.tinkoff.piapi.contract.v1.SubscriptionAction.SUBSCRIPTION_ACTION_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, subscriptionAction_);
}
for (int i = 0; i < instruments_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, instruments_.get(i));
}
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.SubscribeLastPriceRequest)) {
return super.equals(obj);
}
ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest other = (ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest) obj;
if (subscriptionAction_ != other.subscriptionAction_) return false;
if (!getInstrumentsList()
.equals(other.getInstrumentsList())) 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) + SUBSCRIPTION_ACTION_FIELD_NUMBER;
hash = (53 * hash) + subscriptionAction_;
if (getInstrumentsCount() > 0) {
hash = (37 * hash) + INSTRUMENTS_FIELD_NUMBER;
hash = (53 * hash) + getInstrumentsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest 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.SubscribeLastPriceRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest 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.SubscribeLastPriceRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest 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.SubscribeLastPriceRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest 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.SubscribeLastPriceRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest 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.SubscribeLastPriceRequest 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.SubscribeLastPriceRequest 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.SubscribeLastPriceRequest 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.SubscribeLastPriceRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.SubscribeLastPriceRequest)
ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return ru.tinkoff.piapi.contract.v1.Marketdata.internal_static_tinkoff_public_invest_api_contract_v1_SubscribeLastPriceRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return ru.tinkoff.piapi.contract.v1.Marketdata.internal_static_tinkoff_public_invest_api_contract_v1_SubscribeLastPriceRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest.class, ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest.Builder.class);
}
// Construct using ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
subscriptionAction_ = 0;
if (instrumentsBuilder_ == null) {
instruments_ = java.util.Collections.emptyList();
} else {
instruments_ = null;
instrumentsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return ru.tinkoff.piapi.contract.v1.Marketdata.internal_static_tinkoff_public_invest_api_contract_v1_SubscribeLastPriceRequest_descriptor;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest getDefaultInstanceForType() {
return ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest.getDefaultInstance();
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest build() {
ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest buildPartial() {
ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest result = new ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest result) {
if (instrumentsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
instruments_ = java.util.Collections.unmodifiableList(instruments_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.instruments_ = instruments_;
} else {
result.instruments_ = instrumentsBuilder_.build();
}
}
private void buildPartial0(ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.subscriptionAction_ = subscriptionAction_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest) {
return mergeFrom((ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest other) {
if (other == ru.tinkoff.piapi.contract.v1.SubscribeLastPriceRequest.getDefaultInstance()) return this;
if (other.subscriptionAction_ != 0) {
setSubscriptionActionValue(other.getSubscriptionActionValue());
}
if (instrumentsBuilder_ == null) {
if (!other.instruments_.isEmpty()) {
if (instruments_.isEmpty()) {
instruments_ = other.instruments_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureInstrumentsIsMutable();
instruments_.addAll(other.instruments_);
}
onChanged();
}
} else {
if (!other.instruments_.isEmpty()) {
if (instrumentsBuilder_.isEmpty()) {
instrumentsBuilder_.dispose();
instrumentsBuilder_ = null;
instruments_ = other.instruments_;
bitField0_ = (bitField0_ & ~0x00000002);
instrumentsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getInstrumentsFieldBuilder() : null;
} else {
instrumentsBuilder_.addAllMessages(other.instruments_);
}
}
}
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 8: {
subscriptionAction_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
ru.tinkoff.piapi.contract.v1.LastPriceInstrument m =
input.readMessage(
ru.tinkoff.piapi.contract.v1.LastPriceInstrument.parser(),
extensionRegistry);
if (instrumentsBuilder_ == null) {
ensureInstrumentsIsMutable();
instruments_.add(m);
} else {
instrumentsBuilder_.addMessage(m);
}
break;
} // case 18
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 int subscriptionAction_ = 0;
/**
*
*Изменение статуса подписки.
*
*
* .tinkoff.public.invest.api.contract.v1.SubscriptionAction subscription_action = 1;
* @return The enum numeric value on the wire for subscriptionAction.
*/
@java.lang.Override public int getSubscriptionActionValue() {
return subscriptionAction_;
}
/**
*
*Изменение статуса подписки.
*
*
* .tinkoff.public.invest.api.contract.v1.SubscriptionAction subscription_action = 1;
* @param value The enum numeric value on the wire for subscriptionAction to set.
* @return This builder for chaining.
*/
public Builder setSubscriptionActionValue(int value) {
subscriptionAction_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Изменение статуса подписки.
*
*
* .tinkoff.public.invest.api.contract.v1.SubscriptionAction subscription_action = 1;
* @return The subscriptionAction.
*/
@java.lang.Override
public ru.tinkoff.piapi.contract.v1.SubscriptionAction getSubscriptionAction() {
ru.tinkoff.piapi.contract.v1.SubscriptionAction result = ru.tinkoff.piapi.contract.v1.SubscriptionAction.forNumber(subscriptionAction_);
return result == null ? ru.tinkoff.piapi.contract.v1.SubscriptionAction.UNRECOGNIZED : result;
}
/**
*
*Изменение статуса подписки.
*
*
* .tinkoff.public.invest.api.contract.v1.SubscriptionAction subscription_action = 1;
* @param value The subscriptionAction to set.
* @return This builder for chaining.
*/
public Builder setSubscriptionAction(ru.tinkoff.piapi.contract.v1.SubscriptionAction value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
subscriptionAction_ = value.getNumber();
onChanged();
return this;
}
/**
*