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

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

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

package ru.tinkoff.piapi.contract.v1;

/**
 * 
 *Запрос на поиск инструментов.
 * 
* * Protobuf type {@code tinkoff.public.invest.api.contract.v1.FindInstrumentRequest} */ public final class FindInstrumentRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.FindInstrumentRequest) FindInstrumentRequestOrBuilder { private static final long serialVersionUID = 0L; // Use FindInstrumentRequest.newBuilder() to construct. private FindInstrumentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FindInstrumentRequest() { query_ = ""; instrumentKind_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new FindInstrumentRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_FindInstrumentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_FindInstrumentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ru.tinkoff.piapi.contract.v1.FindInstrumentRequest.class, ru.tinkoff.piapi.contract.v1.FindInstrumentRequest.Builder.class); } public static final int QUERY_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object query_ = ""; /** *
   *Строка поиска.
   * 
* * string query = 1; * @return The query. */ @java.lang.Override public java.lang.String getQuery() { java.lang.Object ref = query_; 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(); query_ = s; return s; } } /** *
   *Строка поиска.
   * 
* * string query = 1; * @return The bytes for query. */ @java.lang.Override public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INSTRUMENT_KIND_FIELD_NUMBER = 2; private int instrumentKind_ = 0; /** *
   *Фильтр по типу инструмента.
   * 
* * .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 2; * @return The enum numeric value on the wire for instrumentKind. */ @java.lang.Override public int getInstrumentKindValue() { return instrumentKind_; } /** *
   *Фильтр по типу инструмента.
   * 
* * .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 2; * @return The instrumentKind. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.InstrumentType getInstrumentKind() { ru.tinkoff.piapi.contract.v1.InstrumentType result = ru.tinkoff.piapi.contract.v1.InstrumentType.forNumber(instrumentKind_); return result == null ? ru.tinkoff.piapi.contract.v1.InstrumentType.UNRECOGNIZED : result; } public static final int API_TRADE_AVAILABLE_FLAG_FIELD_NUMBER = 3; private boolean apiTradeAvailableFlag_ = false; /** *
   *Фильтр для отображения только торговых инструментов.
   * 
* * bool api_trade_available_flag = 3; * @return The apiTradeAvailableFlag. */ @java.lang.Override public boolean getApiTradeAvailableFlag() { return apiTradeAvailableFlag_; } 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(query_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, query_); } if (instrumentKind_ != ru.tinkoff.piapi.contract.v1.InstrumentType.INSTRUMENT_TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, instrumentKind_); } if (apiTradeAvailableFlag_ != false) { output.writeBool(3, apiTradeAvailableFlag_); } 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(query_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, query_); } if (instrumentKind_ != ru.tinkoff.piapi.contract.v1.InstrumentType.INSTRUMENT_TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, instrumentKind_); } if (apiTradeAvailableFlag_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, apiTradeAvailableFlag_); } 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.FindInstrumentRequest)) { return super.equals(obj); } ru.tinkoff.piapi.contract.v1.FindInstrumentRequest other = (ru.tinkoff.piapi.contract.v1.FindInstrumentRequest) obj; if (!getQuery() .equals(other.getQuery())) return false; if (instrumentKind_ != other.instrumentKind_) return false; if (getApiTradeAvailableFlag() != other.getApiTradeAvailableFlag()) 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) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); hash = (37 * hash) + INSTRUMENT_KIND_FIELD_NUMBER; hash = (53 * hash) + instrumentKind_; hash = (37 * hash) + API_TRADE_AVAILABLE_FLAG_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getApiTradeAvailableFlag()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ru.tinkoff.piapi.contract.v1.FindInstrumentRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.FindInstrumentRequest 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.FindInstrumentRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.FindInstrumentRequest 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.FindInstrumentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.FindInstrumentRequest 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.FindInstrumentRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ru.tinkoff.piapi.contract.v1.FindInstrumentRequest 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.FindInstrumentRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ru.tinkoff.piapi.contract.v1.FindInstrumentRequest 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.FindInstrumentRequest 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.FindInstrumentRequest 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.FindInstrumentRequest 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.FindInstrumentRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.FindInstrumentRequest) ru.tinkoff.piapi.contract.v1.FindInstrumentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_FindInstrumentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_FindInstrumentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( ru.tinkoff.piapi.contract.v1.FindInstrumentRequest.class, ru.tinkoff.piapi.contract.v1.FindInstrumentRequest.Builder.class); } // Construct using ru.tinkoff.piapi.contract.v1.FindInstrumentRequest.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; query_ = ""; instrumentKind_ = 0; apiTradeAvailableFlag_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ru.tinkoff.piapi.contract.v1.Instruments.internal_static_tinkoff_public_invest_api_contract_v1_FindInstrumentRequest_descriptor; } @java.lang.Override public ru.tinkoff.piapi.contract.v1.FindInstrumentRequest getDefaultInstanceForType() { return ru.tinkoff.piapi.contract.v1.FindInstrumentRequest.getDefaultInstance(); } @java.lang.Override public ru.tinkoff.piapi.contract.v1.FindInstrumentRequest build() { ru.tinkoff.piapi.contract.v1.FindInstrumentRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ru.tinkoff.piapi.contract.v1.FindInstrumentRequest buildPartial() { ru.tinkoff.piapi.contract.v1.FindInstrumentRequest result = new ru.tinkoff.piapi.contract.v1.FindInstrumentRequest(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ru.tinkoff.piapi.contract.v1.FindInstrumentRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.query_ = query_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.instrumentKind_ = instrumentKind_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.apiTradeAvailableFlag_ = apiTradeAvailableFlag_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ru.tinkoff.piapi.contract.v1.FindInstrumentRequest) { return mergeFrom((ru.tinkoff.piapi.contract.v1.FindInstrumentRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.FindInstrumentRequest other) { if (other == ru.tinkoff.piapi.contract.v1.FindInstrumentRequest.getDefaultInstance()) return this; if (!other.getQuery().isEmpty()) { query_ = other.query_; bitField0_ |= 0x00000001; onChanged(); } if (other.instrumentKind_ != 0) { setInstrumentKindValue(other.getInstrumentKindValue()); } if (other.getApiTradeAvailableFlag() != false) { setApiTradeAvailableFlag(other.getApiTradeAvailableFlag()); } 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: { query_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { instrumentKind_ = input.readEnum(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { apiTradeAvailableFlag_ = input.readBool(); bitField0_ |= 0x00000004; break; } // case 24 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 query_ = ""; /** *
     *Строка поиска.
     * 
* * string query = 1; * @return The query. */ public java.lang.String getQuery() { java.lang.Object ref = query_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); query_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     *Строка поиска.
     * 
* * string query = 1; * @return The bytes for query. */ public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     *Строка поиска.
     * 
* * string query = 1; * @param value The query to set. * @return This builder for chaining. */ public Builder setQuery( java.lang.String value) { if (value == null) { throw new NullPointerException(); } query_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     *Строка поиска.
     * 
* * string query = 1; * @return This builder for chaining. */ public Builder clearQuery() { query_ = getDefaultInstance().getQuery(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     *Строка поиска.
     * 
* * string query = 1; * @param value The bytes for query to set. * @return This builder for chaining. */ public Builder setQueryBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); query_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int instrumentKind_ = 0; /** *
     *Фильтр по типу инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 2; * @return The enum numeric value on the wire for instrumentKind. */ @java.lang.Override public int getInstrumentKindValue() { return instrumentKind_; } /** *
     *Фильтр по типу инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 2; * @param value The enum numeric value on the wire for instrumentKind to set. * @return This builder for chaining. */ public Builder setInstrumentKindValue(int value) { instrumentKind_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     *Фильтр по типу инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 2; * @return The instrumentKind. */ @java.lang.Override public ru.tinkoff.piapi.contract.v1.InstrumentType getInstrumentKind() { ru.tinkoff.piapi.contract.v1.InstrumentType result = ru.tinkoff.piapi.contract.v1.InstrumentType.forNumber(instrumentKind_); return result == null ? ru.tinkoff.piapi.contract.v1.InstrumentType.UNRECOGNIZED : result; } /** *
     *Фильтр по типу инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 2; * @param value The instrumentKind to set. * @return This builder for chaining. */ public Builder setInstrumentKind(ru.tinkoff.piapi.contract.v1.InstrumentType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; instrumentKind_ = value.getNumber(); onChanged(); return this; } /** *
     *Фильтр по типу инструмента.
     * 
* * .tinkoff.public.invest.api.contract.v1.InstrumentType instrument_kind = 2; * @return This builder for chaining. */ public Builder clearInstrumentKind() { bitField0_ = (bitField0_ & ~0x00000002); instrumentKind_ = 0; onChanged(); return this; } private boolean apiTradeAvailableFlag_ ; /** *
     *Фильтр для отображения только торговых инструментов.
     * 
* * bool api_trade_available_flag = 3; * @return The apiTradeAvailableFlag. */ @java.lang.Override public boolean getApiTradeAvailableFlag() { return apiTradeAvailableFlag_; } /** *
     *Фильтр для отображения только торговых инструментов.
     * 
* * bool api_trade_available_flag = 3; * @param value The apiTradeAvailableFlag to set. * @return This builder for chaining. */ public Builder setApiTradeAvailableFlag(boolean value) { apiTradeAvailableFlag_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     *Фильтр для отображения только торговых инструментов.
     * 
* * bool api_trade_available_flag = 3; * @return This builder for chaining. */ public Builder clearApiTradeAvailableFlag() { bitField0_ = (bitField0_ & ~0x00000004); apiTradeAvailableFlag_ = false; 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.FindInstrumentRequest) } // @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.FindInstrumentRequest) private static final ru.tinkoff.piapi.contract.v1.FindInstrumentRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.FindInstrumentRequest(); } public static ru.tinkoff.piapi.contract.v1.FindInstrumentRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FindInstrumentRequest 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.FindInstrumentRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy