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

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

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

package ru.tinkoff.piapi.contract.v1;

/**
 * 
 *Лимит stream-соединений.
 * 
* * Protobuf type {@code tinkoff.public.invest.api.contract.v1.StreamLimit} */ public final class StreamLimit extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:tinkoff.public.invest.api.contract.v1.StreamLimit) StreamLimitOrBuilder { private static final long serialVersionUID = 0L; // Use StreamLimit.newBuilder() to construct. private StreamLimit(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StreamLimit() { streams_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new StreamLimit(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_StreamLimit_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_StreamLimit_fieldAccessorTable .ensureFieldAccessorsInitialized( ru.tinkoff.piapi.contract.v1.StreamLimit.class, ru.tinkoff.piapi.contract.v1.StreamLimit.Builder.class); } public static final int LIMIT_FIELD_NUMBER = 1; private int limit_ = 0; /** *
   *Максимальное количество stream-соединений.
   * 
* * int32 limit = 1; * @return The limit. */ @java.lang.Override public int getLimit() { return limit_; } public static final int STREAMS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private com.google.protobuf.LazyStringArrayList streams_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
   *Названия stream-методов.
   * 
* * repeated string streams = 2; * @return A list containing the streams. */ public com.google.protobuf.ProtocolStringList getStreamsList() { return streams_; } /** *
   *Названия stream-методов.
   * 
* * repeated string streams = 2; * @return The count of streams. */ public int getStreamsCount() { return streams_.size(); } /** *
   *Названия stream-методов.
   * 
* * repeated string streams = 2; * @param index The index of the element to return. * @return The streams at the given index. */ public java.lang.String getStreams(int index) { return streams_.get(index); } /** *
   *Названия stream-методов.
   * 
* * repeated string streams = 2; * @param index The index of the value to return. * @return The bytes of the streams at the given index. */ public com.google.protobuf.ByteString getStreamsBytes(int index) { return streams_.getByteString(index); } public static final int OPEN_FIELD_NUMBER = 3; private int open_ = 0; /** *
   *Текущее количество открытых stream-соединений.
   * 
* * int32 open = 3; * @return The open. */ @java.lang.Override public int getOpen() { return open_; } 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 (limit_ != 0) { output.writeInt32(1, limit_); } for (int i = 0; i < streams_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, streams_.getRaw(i)); } if (open_ != 0) { output.writeInt32(3, open_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (limit_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, limit_); } { int dataSize = 0; for (int i = 0; i < streams_.size(); i++) { dataSize += computeStringSizeNoTag(streams_.getRaw(i)); } size += dataSize; size += 1 * getStreamsList().size(); } if (open_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, open_); } 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.StreamLimit)) { return super.equals(obj); } ru.tinkoff.piapi.contract.v1.StreamLimit other = (ru.tinkoff.piapi.contract.v1.StreamLimit) obj; if (getLimit() != other.getLimit()) return false; if (!getStreamsList() .equals(other.getStreamsList())) return false; if (getOpen() != other.getOpen()) 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) + LIMIT_FIELD_NUMBER; hash = (53 * hash) + getLimit(); if (getStreamsCount() > 0) { hash = (37 * hash) + STREAMS_FIELD_NUMBER; hash = (53 * hash) + getStreamsList().hashCode(); } hash = (37 * hash) + OPEN_FIELD_NUMBER; hash = (53 * hash) + getOpen(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static ru.tinkoff.piapi.contract.v1.StreamLimit parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.StreamLimit 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.StreamLimit parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.StreamLimit 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.StreamLimit parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static ru.tinkoff.piapi.contract.v1.StreamLimit 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.StreamLimit parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static ru.tinkoff.piapi.contract.v1.StreamLimit 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.StreamLimit parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static ru.tinkoff.piapi.contract.v1.StreamLimit 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.StreamLimit 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.StreamLimit 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.StreamLimit 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; } /** *
   *Лимит stream-соединений.
   * 
* * Protobuf type {@code tinkoff.public.invest.api.contract.v1.StreamLimit} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:tinkoff.public.invest.api.contract.v1.StreamLimit) ru.tinkoff.piapi.contract.v1.StreamLimitOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_StreamLimit_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_StreamLimit_fieldAccessorTable .ensureFieldAccessorsInitialized( ru.tinkoff.piapi.contract.v1.StreamLimit.class, ru.tinkoff.piapi.contract.v1.StreamLimit.Builder.class); } // Construct using ru.tinkoff.piapi.contract.v1.StreamLimit.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; limit_ = 0; streams_ = com.google.protobuf.LazyStringArrayList.emptyList(); open_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return ru.tinkoff.piapi.contract.v1.Users.internal_static_tinkoff_public_invest_api_contract_v1_StreamLimit_descriptor; } @java.lang.Override public ru.tinkoff.piapi.contract.v1.StreamLimit getDefaultInstanceForType() { return ru.tinkoff.piapi.contract.v1.StreamLimit.getDefaultInstance(); } @java.lang.Override public ru.tinkoff.piapi.contract.v1.StreamLimit build() { ru.tinkoff.piapi.contract.v1.StreamLimit result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public ru.tinkoff.piapi.contract.v1.StreamLimit buildPartial() { ru.tinkoff.piapi.contract.v1.StreamLimit result = new ru.tinkoff.piapi.contract.v1.StreamLimit(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(ru.tinkoff.piapi.contract.v1.StreamLimit result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.limit_ = limit_; } if (((from_bitField0_ & 0x00000002) != 0)) { streams_.makeImmutable(); result.streams_ = streams_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.open_ = open_; } } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof ru.tinkoff.piapi.contract.v1.StreamLimit) { return mergeFrom((ru.tinkoff.piapi.contract.v1.StreamLimit)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(ru.tinkoff.piapi.contract.v1.StreamLimit other) { if (other == ru.tinkoff.piapi.contract.v1.StreamLimit.getDefaultInstance()) return this; if (other.getLimit() != 0) { setLimit(other.getLimit()); } if (!other.streams_.isEmpty()) { if (streams_.isEmpty()) { streams_ = other.streams_; bitField0_ |= 0x00000002; } else { ensureStreamsIsMutable(); streams_.addAll(other.streams_); } onChanged(); } if (other.getOpen() != 0) { setOpen(other.getOpen()); } 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: { limit_ = input.readInt32(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { java.lang.String s = input.readStringRequireUtf8(); ensureStreamsIsMutable(); streams_.add(s); break; } // case 18 case 24: { open_ = input.readInt32(); 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 int limit_ ; /** *
     *Максимальное количество stream-соединений.
     * 
* * int32 limit = 1; * @return The limit. */ @java.lang.Override public int getLimit() { return limit_; } /** *
     *Максимальное количество stream-соединений.
     * 
* * int32 limit = 1; * @param value The limit to set. * @return This builder for chaining. */ public Builder setLimit(int value) { limit_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     *Максимальное количество stream-соединений.
     * 
* * int32 limit = 1; * @return This builder for chaining. */ public Builder clearLimit() { bitField0_ = (bitField0_ & ~0x00000001); limit_ = 0; onChanged(); return this; } private com.google.protobuf.LazyStringArrayList streams_ = com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureStreamsIsMutable() { if (!streams_.isModifiable()) { streams_ = new com.google.protobuf.LazyStringArrayList(streams_); } bitField0_ |= 0x00000002; } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @return A list containing the streams. */ public com.google.protobuf.ProtocolStringList getStreamsList() { streams_.makeImmutable(); return streams_; } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @return The count of streams. */ public int getStreamsCount() { return streams_.size(); } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @param index The index of the element to return. * @return The streams at the given index. */ public java.lang.String getStreams(int index) { return streams_.get(index); } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @param index The index of the value to return. * @return The bytes of the streams at the given index. */ public com.google.protobuf.ByteString getStreamsBytes(int index) { return streams_.getByteString(index); } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @param index The index to set the value at. * @param value The streams to set. * @return This builder for chaining. */ public Builder setStreams( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureStreamsIsMutable(); streams_.set(index, value); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @param value The streams to add. * @return This builder for chaining. */ public Builder addStreams( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureStreamsIsMutable(); streams_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @param values The streams to add. * @return This builder for chaining. */ public Builder addAllStreams( java.lang.Iterable values) { ensureStreamsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, streams_); bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @return This builder for chaining. */ public Builder clearStreams() { streams_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000002);; onChanged(); return this; } /** *
     *Названия stream-методов.
     * 
* * repeated string streams = 2; * @param value The bytes of the streams to add. * @return This builder for chaining. */ public Builder addStreamsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureStreamsIsMutable(); streams_.add(value); bitField0_ |= 0x00000002; onChanged(); return this; } private int open_ ; /** *
     *Текущее количество открытых stream-соединений.
     * 
* * int32 open = 3; * @return The open. */ @java.lang.Override public int getOpen() { return open_; } /** *
     *Текущее количество открытых stream-соединений.
     * 
* * int32 open = 3; * @param value The open to set. * @return This builder for chaining. */ public Builder setOpen(int value) { open_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     *Текущее количество открытых stream-соединений.
     * 
* * int32 open = 3; * @return This builder for chaining. */ public Builder clearOpen() { bitField0_ = (bitField0_ & ~0x00000004); open_ = 0; 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.StreamLimit) } // @@protoc_insertion_point(class_scope:tinkoff.public.invest.api.contract.v1.StreamLimit) private static final ru.tinkoff.piapi.contract.v1.StreamLimit DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new ru.tinkoff.piapi.contract.v1.StreamLimit(); } public static ru.tinkoff.piapi.contract.v1.StreamLimit getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StreamLimit 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.StreamLimit getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy