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

org.openfeed.SubscriptionResponse Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: openfeed_api.proto
// Protobuf Java Version: 4.28.3

package org.openfeed;

/**
 * Protobuf type {@code org.openfeed.SubscriptionResponse}
 */
public final class SubscriptionResponse extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:org.openfeed.SubscriptionResponse)
    SubscriptionResponseOrBuilder {
private static final long serialVersionUID = 0L;
  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
      com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
      /* major= */ 4,
      /* minor= */ 28,
      /* patch= */ 3,
      /* suffix= */ "",
      SubscriptionResponse.class.getName());
  }
  // Use SubscriptionResponse.newBuilder() to construct.
  private SubscriptionResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
    super(builder);
  }
  private SubscriptionResponse() {
    symbol_ = "";
    exchange_ = "";
    subscriptionType_ = 0;
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return org.openfeed.OpenfeedApi.internal_static_org_openfeed_SubscriptionResponse_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return org.openfeed.OpenfeedApi.internal_static_org_openfeed_SubscriptionResponse_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            org.openfeed.SubscriptionResponse.class, org.openfeed.SubscriptionResponse.Builder.class);
  }

  private int bitField0_;
  public static final int CORRELATIONID_FIELD_NUMBER = 1;
  private long correlationId_ = 0L;
  /**
   * sint64 correlationId = 1;
   * @return The correlationId.
   */
  @java.lang.Override
  public long getCorrelationId() {
    return correlationId_;
  }

  public static final int STATUS_FIELD_NUMBER = 2;
  private org.openfeed.Status status_;
  /**
   * .org.openfeed.Status status = 2;
   * @return Whether the status field is set.
   */
  @java.lang.Override
  public boolean hasStatus() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * .org.openfeed.Status status = 2;
   * @return The status.
   */
  @java.lang.Override
  public org.openfeed.Status getStatus() {
    return status_ == null ? org.openfeed.Status.getDefaultInstance() : status_;
  }
  /**
   * .org.openfeed.Status status = 2;
   */
  @java.lang.Override
  public org.openfeed.StatusOrBuilder getStatusOrBuilder() {
    return status_ == null ? org.openfeed.Status.getDefaultInstance() : status_;
  }

  public static final int SYMBOL_FIELD_NUMBER = 3;
  @SuppressWarnings("serial")
  private volatile java.lang.Object symbol_ = "";
  /**
   * string symbol = 3;
   * @return The symbol.
   */
  @java.lang.Override
  public java.lang.String getSymbol() {
    java.lang.Object ref = symbol_;
    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();
      symbol_ = s;
      return s;
    }
  }
  /**
   * string symbol = 3;
   * @return The bytes for symbol.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getSymbolBytes() {
    java.lang.Object ref = symbol_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      symbol_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MARKETID_FIELD_NUMBER = 4;
  private long marketId_ = 0L;
  /**
   * sint64 marketId = 4;
   * @return The marketId.
   */
  @java.lang.Override
  public long getMarketId() {
    return marketId_;
  }

  public static final int EXCHANGE_FIELD_NUMBER = 5;
  @SuppressWarnings("serial")
  private volatile java.lang.Object exchange_ = "";
  /**
   * string exchange = 5;
   * @return The exchange.
   */
  @java.lang.Override
  public java.lang.String getExchange() {
    java.lang.Object ref = exchange_;
    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();
      exchange_ = s;
      return s;
    }
  }
  /**
   * string exchange = 5;
   * @return The bytes for exchange.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getExchangeBytes() {
    java.lang.Object ref = exchange_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      exchange_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CHANNELID_FIELD_NUMBER = 6;
  private int channelId_ = 0;
  /**
   * sint32 channelId = 6;
   * @return The channelId.
   */
  @java.lang.Override
  public int getChannelId() {
    return channelId_;
  }

  public static final int NUMBEROFDEFINITIONS_FIELD_NUMBER = 7;
  private int numberOfDefinitions_ = 0;
  /**
   * sint32 numberOfDefinitions = 7;
   * @return The numberOfDefinitions.
   */
  @java.lang.Override
  public int getNumberOfDefinitions() {
    return numberOfDefinitions_;
  }

  public static final int SUBSCRIPTIONTYPE_FIELD_NUMBER = 8;
  private int subscriptionType_ = 0;
  /**
   * .org.openfeed.SubscriptionType subscriptionType = 8;
   * @return The enum numeric value on the wire for subscriptionType.
   */
  @java.lang.Override public int getSubscriptionTypeValue() {
    return subscriptionType_;
  }
  /**
   * .org.openfeed.SubscriptionType subscriptionType = 8;
   * @return The subscriptionType.
   */
  @java.lang.Override public org.openfeed.SubscriptionType getSubscriptionType() {
    org.openfeed.SubscriptionType result = org.openfeed.SubscriptionType.forNumber(subscriptionType_);
    return result == null ? org.openfeed.SubscriptionType.UNRECOGNIZED : result;
  }

  public static final int UNSUBSCRIBE_FIELD_NUMBER = 9;
  private boolean unsubscribe_ = false;
  /**
   * bool unsubscribe = 9;
   * @return The unsubscribe.
   */
  @java.lang.Override
  public boolean getUnsubscribe() {
    return unsubscribe_;
  }

  public static final int SNAPSHOTINTERVALSECONDS_FIELD_NUMBER = 10;
  private int snapshotIntervalSeconds_ = 0;
  /**
   * sint32 snapshotIntervalSeconds = 10;
   * @return The snapshotIntervalSeconds.
   */
  @java.lang.Override
  public int getSnapshotIntervalSeconds() {
    return snapshotIntervalSeconds_;
  }

  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 (correlationId_ != 0L) {
      output.writeSInt64(1, correlationId_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(2, getStatus());
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(symbol_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 3, symbol_);
    }
    if (marketId_ != 0L) {
      output.writeSInt64(4, marketId_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(exchange_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 5, exchange_);
    }
    if (channelId_ != 0) {
      output.writeSInt32(6, channelId_);
    }
    if (numberOfDefinitions_ != 0) {
      output.writeSInt32(7, numberOfDefinitions_);
    }
    if (subscriptionType_ != org.openfeed.SubscriptionType.ALL.getNumber()) {
      output.writeEnum(8, subscriptionType_);
    }
    if (unsubscribe_ != false) {
      output.writeBool(9, unsubscribe_);
    }
    if (snapshotIntervalSeconds_ != 0) {
      output.writeSInt32(10, snapshotIntervalSeconds_);
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (correlationId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt64Size(1, correlationId_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getStatus());
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(symbol_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(3, symbol_);
    }
    if (marketId_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt64Size(4, marketId_);
    }
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(exchange_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, exchange_);
    }
    if (channelId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(6, channelId_);
    }
    if (numberOfDefinitions_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(7, numberOfDefinitions_);
    }
    if (subscriptionType_ != org.openfeed.SubscriptionType.ALL.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(8, subscriptionType_);
    }
    if (unsubscribe_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(9, unsubscribe_);
    }
    if (snapshotIntervalSeconds_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(10, snapshotIntervalSeconds_);
    }
    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 org.openfeed.SubscriptionResponse)) {
      return super.equals(obj);
    }
    org.openfeed.SubscriptionResponse other = (org.openfeed.SubscriptionResponse) obj;

    if (getCorrelationId()
        != other.getCorrelationId()) return false;
    if (hasStatus() != other.hasStatus()) return false;
    if (hasStatus()) {
      if (!getStatus()
          .equals(other.getStatus())) return false;
    }
    if (!getSymbol()
        .equals(other.getSymbol())) return false;
    if (getMarketId()
        != other.getMarketId()) return false;
    if (!getExchange()
        .equals(other.getExchange())) return false;
    if (getChannelId()
        != other.getChannelId()) return false;
    if (getNumberOfDefinitions()
        != other.getNumberOfDefinitions()) return false;
    if (subscriptionType_ != other.subscriptionType_) return false;
    if (getUnsubscribe()
        != other.getUnsubscribe()) return false;
    if (getSnapshotIntervalSeconds()
        != other.getSnapshotIntervalSeconds()) 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) + CORRELATIONID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getCorrelationId());
    if (hasStatus()) {
      hash = (37 * hash) + STATUS_FIELD_NUMBER;
      hash = (53 * hash) + getStatus().hashCode();
    }
    hash = (37 * hash) + SYMBOL_FIELD_NUMBER;
    hash = (53 * hash) + getSymbol().hashCode();
    hash = (37 * hash) + MARKETID_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getMarketId());
    hash = (37 * hash) + EXCHANGE_FIELD_NUMBER;
    hash = (53 * hash) + getExchange().hashCode();
    hash = (37 * hash) + CHANNELID_FIELD_NUMBER;
    hash = (53 * hash) + getChannelId();
    hash = (37 * hash) + NUMBEROFDEFINITIONS_FIELD_NUMBER;
    hash = (53 * hash) + getNumberOfDefinitions();
    hash = (37 * hash) + SUBSCRIPTIONTYPE_FIELD_NUMBER;
    hash = (53 * hash) + subscriptionType_;
    hash = (37 * hash) + UNSUBSCRIBE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getUnsubscribe());
    hash = (37 * hash) + SNAPSHOTINTERVALSECONDS_FIELD_NUMBER;
    hash = (53 * hash) + getSnapshotIntervalSeconds();
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.openfeed.SubscriptionResponse parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static org.openfeed.SubscriptionResponse parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static org.openfeed.SubscriptionResponse parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.openfeed.SubscriptionResponse parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(org.openfeed.SubscriptionResponse 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.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code org.openfeed.SubscriptionResponse}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder implements
      // @@protoc_insertion_point(builder_implements:org.openfeed.SubscriptionResponse)
      org.openfeed.SubscriptionResponseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.openfeed.OpenfeedApi.internal_static_org_openfeed_SubscriptionResponse_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.openfeed.OpenfeedApi.internal_static_org_openfeed_SubscriptionResponse_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              org.openfeed.SubscriptionResponse.class, org.openfeed.SubscriptionResponse.Builder.class);
    }

    // Construct using org.openfeed.SubscriptionResponse.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessage
              .alwaysUseFieldBuilders) {
        getStatusFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      correlationId_ = 0L;
      status_ = null;
      if (statusBuilder_ != null) {
        statusBuilder_.dispose();
        statusBuilder_ = null;
      }
      symbol_ = "";
      marketId_ = 0L;
      exchange_ = "";
      channelId_ = 0;
      numberOfDefinitions_ = 0;
      subscriptionType_ = 0;
      unsubscribe_ = false;
      snapshotIntervalSeconds_ = 0;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return org.openfeed.OpenfeedApi.internal_static_org_openfeed_SubscriptionResponse_descriptor;
    }

    @java.lang.Override
    public org.openfeed.SubscriptionResponse getDefaultInstanceForType() {
      return org.openfeed.SubscriptionResponse.getDefaultInstance();
    }

    @java.lang.Override
    public org.openfeed.SubscriptionResponse build() {
      org.openfeed.SubscriptionResponse result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public org.openfeed.SubscriptionResponse buildPartial() {
      org.openfeed.SubscriptionResponse result = new org.openfeed.SubscriptionResponse(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(org.openfeed.SubscriptionResponse result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.correlationId_ = correlationId_;
      }
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.status_ = statusBuilder_ == null
            ? status_
            : statusBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.symbol_ = symbol_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.marketId_ = marketId_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.exchange_ = exchange_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.channelId_ = channelId_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.numberOfDefinitions_ = numberOfDefinitions_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.subscriptionType_ = subscriptionType_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.unsubscribe_ = unsubscribe_;
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.snapshotIntervalSeconds_ = snapshotIntervalSeconds_;
      }
      result.bitField0_ |= to_bitField0_;
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof org.openfeed.SubscriptionResponse) {
        return mergeFrom((org.openfeed.SubscriptionResponse)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(org.openfeed.SubscriptionResponse other) {
      if (other == org.openfeed.SubscriptionResponse.getDefaultInstance()) return this;
      if (other.getCorrelationId() != 0L) {
        setCorrelationId(other.getCorrelationId());
      }
      if (other.hasStatus()) {
        mergeStatus(other.getStatus());
      }
      if (!other.getSymbol().isEmpty()) {
        symbol_ = other.symbol_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (other.getMarketId() != 0L) {
        setMarketId(other.getMarketId());
      }
      if (!other.getExchange().isEmpty()) {
        exchange_ = other.exchange_;
        bitField0_ |= 0x00000010;
        onChanged();
      }
      if (other.getChannelId() != 0) {
        setChannelId(other.getChannelId());
      }
      if (other.getNumberOfDefinitions() != 0) {
        setNumberOfDefinitions(other.getNumberOfDefinitions());
      }
      if (other.subscriptionType_ != 0) {
        setSubscriptionTypeValue(other.getSubscriptionTypeValue());
      }
      if (other.getUnsubscribe() != false) {
        setUnsubscribe(other.getUnsubscribe());
      }
      if (other.getSnapshotIntervalSeconds() != 0) {
        setSnapshotIntervalSeconds(other.getSnapshotIntervalSeconds());
      }
      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: {
              correlationId_ = input.readSInt64();
              bitField0_ |= 0x00000001;
              break;
            } // case 8
            case 18: {
              input.readMessage(
                  getStatusFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            case 26: {
              symbol_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000004;
              break;
            } // case 26
            case 32: {
              marketId_ = input.readSInt64();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 42: {
              exchange_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000010;
              break;
            } // case 42
            case 48: {
              channelId_ = input.readSInt32();
              bitField0_ |= 0x00000020;
              break;
            } // case 48
            case 56: {
              numberOfDefinitions_ = input.readSInt32();
              bitField0_ |= 0x00000040;
              break;
            } // case 56
            case 64: {
              subscriptionType_ = input.readEnum();
              bitField0_ |= 0x00000080;
              break;
            } // case 64
            case 72: {
              unsubscribe_ = input.readBool();
              bitField0_ |= 0x00000100;
              break;
            } // case 72
            case 80: {
              snapshotIntervalSeconds_ = input.readSInt32();
              bitField0_ |= 0x00000200;
              break;
            } // case 80
            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 long correlationId_ ;
    /**
     * sint64 correlationId = 1;
     * @return The correlationId.
     */
    @java.lang.Override
    public long getCorrelationId() {
      return correlationId_;
    }
    /**
     * sint64 correlationId = 1;
     * @param value The correlationId to set.
     * @return This builder for chaining.
     */
    public Builder setCorrelationId(long value) {

      correlationId_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * sint64 correlationId = 1;
     * @return This builder for chaining.
     */
    public Builder clearCorrelationId() {
      bitField0_ = (bitField0_ & ~0x00000001);
      correlationId_ = 0L;
      onChanged();
      return this;
    }

    private org.openfeed.Status status_;
    private com.google.protobuf.SingleFieldBuilder<
        org.openfeed.Status, org.openfeed.Status.Builder, org.openfeed.StatusOrBuilder> statusBuilder_;
    /**
     * .org.openfeed.Status status = 2;
     * @return Whether the status field is set.
     */
    public boolean hasStatus() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * .org.openfeed.Status status = 2;
     * @return The status.
     */
    public org.openfeed.Status getStatus() {
      if (statusBuilder_ == null) {
        return status_ == null ? org.openfeed.Status.getDefaultInstance() : status_;
      } else {
        return statusBuilder_.getMessage();
      }
    }
    /**
     * .org.openfeed.Status status = 2;
     */
    public Builder setStatus(org.openfeed.Status value) {
      if (statusBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        status_ = value;
      } else {
        statusBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .org.openfeed.Status status = 2;
     */
    public Builder setStatus(
        org.openfeed.Status.Builder builderForValue) {
      if (statusBuilder_ == null) {
        status_ = builderForValue.build();
      } else {
        statusBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * .org.openfeed.Status status = 2;
     */
    public Builder mergeStatus(org.openfeed.Status value) {
      if (statusBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0) &&
          status_ != null &&
          status_ != org.openfeed.Status.getDefaultInstance()) {
          getStatusBuilder().mergeFrom(value);
        } else {
          status_ = value;
        }
      } else {
        statusBuilder_.mergeFrom(value);
      }
      if (status_ != null) {
        bitField0_ |= 0x00000002;
        onChanged();
      }
      return this;
    }
    /**
     * .org.openfeed.Status status = 2;
     */
    public Builder clearStatus() {
      bitField0_ = (bitField0_ & ~0x00000002);
      status_ = null;
      if (statusBuilder_ != null) {
        statusBuilder_.dispose();
        statusBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * .org.openfeed.Status status = 2;
     */
    public org.openfeed.Status.Builder getStatusBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getStatusFieldBuilder().getBuilder();
    }
    /**
     * .org.openfeed.Status status = 2;
     */
    public org.openfeed.StatusOrBuilder getStatusOrBuilder() {
      if (statusBuilder_ != null) {
        return statusBuilder_.getMessageOrBuilder();
      } else {
        return status_ == null ?
            org.openfeed.Status.getDefaultInstance() : status_;
      }
    }
    /**
     * .org.openfeed.Status status = 2;
     */
    private com.google.protobuf.SingleFieldBuilder<
        org.openfeed.Status, org.openfeed.Status.Builder, org.openfeed.StatusOrBuilder> 
        getStatusFieldBuilder() {
      if (statusBuilder_ == null) {
        statusBuilder_ = new com.google.protobuf.SingleFieldBuilder<
            org.openfeed.Status, org.openfeed.Status.Builder, org.openfeed.StatusOrBuilder>(
                getStatus(),
                getParentForChildren(),
                isClean());
        status_ = null;
      }
      return statusBuilder_;
    }

    private java.lang.Object symbol_ = "";
    /**
     * string symbol = 3;
     * @return The symbol.
     */
    public java.lang.String getSymbol() {
      java.lang.Object ref = symbol_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        symbol_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string symbol = 3;
     * @return The bytes for symbol.
     */
    public com.google.protobuf.ByteString
        getSymbolBytes() {
      java.lang.Object ref = symbol_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        symbol_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string symbol = 3;
     * @param value The symbol to set.
     * @return This builder for chaining.
     */
    public Builder setSymbol(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      symbol_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * string symbol = 3;
     * @return This builder for chaining.
     */
    public Builder clearSymbol() {
      symbol_ = getDefaultInstance().getSymbol();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     * string symbol = 3;
     * @param value The bytes for symbol to set.
     * @return This builder for chaining.
     */
    public Builder setSymbolBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      symbol_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private long marketId_ ;
    /**
     * sint64 marketId = 4;
     * @return The marketId.
     */
    @java.lang.Override
    public long getMarketId() {
      return marketId_;
    }
    /**
     * sint64 marketId = 4;
     * @param value The marketId to set.
     * @return This builder for chaining.
     */
    public Builder setMarketId(long value) {

      marketId_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * sint64 marketId = 4;
     * @return This builder for chaining.
     */
    public Builder clearMarketId() {
      bitField0_ = (bitField0_ & ~0x00000008);
      marketId_ = 0L;
      onChanged();
      return this;
    }

    private java.lang.Object exchange_ = "";
    /**
     * string exchange = 5;
     * @return The exchange.
     */
    public java.lang.String getExchange() {
      java.lang.Object ref = exchange_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        exchange_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string exchange = 5;
     * @return The bytes for exchange.
     */
    public com.google.protobuf.ByteString
        getExchangeBytes() {
      java.lang.Object ref = exchange_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        exchange_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string exchange = 5;
     * @param value The exchange to set.
     * @return This builder for chaining.
     */
    public Builder setExchange(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      exchange_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * string exchange = 5;
     * @return This builder for chaining.
     */
    public Builder clearExchange() {
      exchange_ = getDefaultInstance().getExchange();
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     * string exchange = 5;
     * @param value The bytes for exchange to set.
     * @return This builder for chaining.
     */
    public Builder setExchangeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      exchange_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }

    private int channelId_ ;
    /**
     * sint32 channelId = 6;
     * @return The channelId.
     */
    @java.lang.Override
    public int getChannelId() {
      return channelId_;
    }
    /**
     * sint32 channelId = 6;
     * @param value The channelId to set.
     * @return This builder for chaining.
     */
    public Builder setChannelId(int value) {

      channelId_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * sint32 channelId = 6;
     * @return This builder for chaining.
     */
    public Builder clearChannelId() {
      bitField0_ = (bitField0_ & ~0x00000020);
      channelId_ = 0;
      onChanged();
      return this;
    }

    private int numberOfDefinitions_ ;
    /**
     * sint32 numberOfDefinitions = 7;
     * @return The numberOfDefinitions.
     */
    @java.lang.Override
    public int getNumberOfDefinitions() {
      return numberOfDefinitions_;
    }
    /**
     * sint32 numberOfDefinitions = 7;
     * @param value The numberOfDefinitions to set.
     * @return This builder for chaining.
     */
    public Builder setNumberOfDefinitions(int value) {

      numberOfDefinitions_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * sint32 numberOfDefinitions = 7;
     * @return This builder for chaining.
     */
    public Builder clearNumberOfDefinitions() {
      bitField0_ = (bitField0_ & ~0x00000040);
      numberOfDefinitions_ = 0;
      onChanged();
      return this;
    }

    private int subscriptionType_ = 0;
    /**
     * .org.openfeed.SubscriptionType subscriptionType = 8;
     * @return The enum numeric value on the wire for subscriptionType.
     */
    @java.lang.Override public int getSubscriptionTypeValue() {
      return subscriptionType_;
    }
    /**
     * .org.openfeed.SubscriptionType subscriptionType = 8;
     * @param value The enum numeric value on the wire for subscriptionType to set.
     * @return This builder for chaining.
     */
    public Builder setSubscriptionTypeValue(int value) {
      subscriptionType_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     * .org.openfeed.SubscriptionType subscriptionType = 8;
     * @return The subscriptionType.
     */
    @java.lang.Override
    public org.openfeed.SubscriptionType getSubscriptionType() {
      org.openfeed.SubscriptionType result = org.openfeed.SubscriptionType.forNumber(subscriptionType_);
      return result == null ? org.openfeed.SubscriptionType.UNRECOGNIZED : result;
    }
    /**
     * .org.openfeed.SubscriptionType subscriptionType = 8;
     * @param value The subscriptionType to set.
     * @return This builder for chaining.
     */
    public Builder setSubscriptionType(org.openfeed.SubscriptionType value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000080;
      subscriptionType_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * .org.openfeed.SubscriptionType subscriptionType = 8;
     * @return This builder for chaining.
     */
    public Builder clearSubscriptionType() {
      bitField0_ = (bitField0_ & ~0x00000080);
      subscriptionType_ = 0;
      onChanged();
      return this;
    }

    private boolean unsubscribe_ ;
    /**
     * bool unsubscribe = 9;
     * @return The unsubscribe.
     */
    @java.lang.Override
    public boolean getUnsubscribe() {
      return unsubscribe_;
    }
    /**
     * bool unsubscribe = 9;
     * @param value The unsubscribe to set.
     * @return This builder for chaining.
     */
    public Builder setUnsubscribe(boolean value) {

      unsubscribe_ = value;
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     * bool unsubscribe = 9;
     * @return This builder for chaining.
     */
    public Builder clearUnsubscribe() {
      bitField0_ = (bitField0_ & ~0x00000100);
      unsubscribe_ = false;
      onChanged();
      return this;
    }

    private int snapshotIntervalSeconds_ ;
    /**
     * sint32 snapshotIntervalSeconds = 10;
     * @return The snapshotIntervalSeconds.
     */
    @java.lang.Override
    public int getSnapshotIntervalSeconds() {
      return snapshotIntervalSeconds_;
    }
    /**
     * sint32 snapshotIntervalSeconds = 10;
     * @param value The snapshotIntervalSeconds to set.
     * @return This builder for chaining.
     */
    public Builder setSnapshotIntervalSeconds(int value) {

      snapshotIntervalSeconds_ = value;
      bitField0_ |= 0x00000200;
      onChanged();
      return this;
    }
    /**
     * sint32 snapshotIntervalSeconds = 10;
     * @return This builder for chaining.
     */
    public Builder clearSnapshotIntervalSeconds() {
      bitField0_ = (bitField0_ & ~0x00000200);
      snapshotIntervalSeconds_ = 0;
      onChanged();
      return this;
    }

    // @@protoc_insertion_point(builder_scope:org.openfeed.SubscriptionResponse)
  }

  // @@protoc_insertion_point(class_scope:org.openfeed.SubscriptionResponse)
  private static final org.openfeed.SubscriptionResponse DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new org.openfeed.SubscriptionResponse();
  }

  public static org.openfeed.SubscriptionResponse getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser
      PARSER = new com.google.protobuf.AbstractParser() {
    @java.lang.Override
    public SubscriptionResponse 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 org.openfeed.SubscriptionResponse getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy