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

org.openfeed.ContextData Maven / Gradle / Ivy

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

package org.openfeed;

/**
 * Protobuf type {@code org.openfeed.ContextData}
 */
public final class ContextData extends
    com.google.protobuf.GeneratedMessage implements
    // @@protoc_insertion_point(message_implements:org.openfeed.ContextData)
    ContextDataOrBuilder {
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= */ "",
      ContextData.class.getName());
  }
  // Use ContextData.newBuilder() to construct.
  private ContextData(com.google.protobuf.GeneratedMessage.Builder builder) {
    super(builder);
  }
  private ContextData() {
    id_ = "";
  }

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

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

  private int dataCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object data_;
  public enum DataCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    VSTRING(5),
    VBYTES(6),
    VBOOL(7),
    VSINT32(8),
    VSINT64(9),
    VFLOAT(10),
    VDOUBLE(11),
    DATA_NOT_SET(0);
    private final int value;
    private DataCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static DataCase valueOf(int value) {
      return forNumber(value);
    }

    public static DataCase forNumber(int value) {
      switch (value) {
        case 5: return VSTRING;
        case 6: return VBYTES;
        case 7: return VBOOL;
        case 8: return VSINT32;
        case 9: return VSINT64;
        case 10: return VFLOAT;
        case 11: return VDOUBLE;
        case 0: return DATA_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public DataCase
  getDataCase() {
    return DataCase.forNumber(
        dataCase_);
  }

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

  public static final int VSTRING_FIELD_NUMBER = 5;
  /**
   * string vstring = 5;
   * @return Whether the vstring field is set.
   */
  public boolean hasVstring() {
    return dataCase_ == 5;
  }
  /**
   * string vstring = 5;
   * @return The vstring.
   */
  public java.lang.String getVstring() {
    java.lang.Object ref = "";
    if (dataCase_ == 5) {
      ref = data_;
    }
    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();
      if (dataCase_ == 5) {
        data_ = s;
      }
      return s;
    }
  }
  /**
   * string vstring = 5;
   * @return The bytes for vstring.
   */
  public com.google.protobuf.ByteString
      getVstringBytes() {
    java.lang.Object ref = "";
    if (dataCase_ == 5) {
      ref = data_;
    }
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      if (dataCase_ == 5) {
        data_ = b;
      }
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int VBYTES_FIELD_NUMBER = 6;
  /**
   * bytes vbytes = 6;
   * @return Whether the vbytes field is set.
   */
  @java.lang.Override
  public boolean hasVbytes() {
    return dataCase_ == 6;
  }
  /**
   * bytes vbytes = 6;
   * @return The vbytes.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getVbytes() {
    if (dataCase_ == 6) {
      return (com.google.protobuf.ByteString) data_;
    }
    return com.google.protobuf.ByteString.EMPTY;
  }

  public static final int VBOOL_FIELD_NUMBER = 7;
  /**
   * bool vbool = 7;
   * @return Whether the vbool field is set.
   */
  @java.lang.Override
  public boolean hasVbool() {
    return dataCase_ == 7;
  }
  /**
   * bool vbool = 7;
   * @return The vbool.
   */
  @java.lang.Override
  public boolean getVbool() {
    if (dataCase_ == 7) {
      return (java.lang.Boolean) data_;
    }
    return false;
  }

  public static final int VSINT32_FIELD_NUMBER = 8;
  /**
   * sint32 vsint32 = 8;
   * @return Whether the vsint32 field is set.
   */
  @java.lang.Override
  public boolean hasVsint32() {
    return dataCase_ == 8;
  }
  /**
   * sint32 vsint32 = 8;
   * @return The vsint32.
   */
  @java.lang.Override
  public int getVsint32() {
    if (dataCase_ == 8) {
      return (java.lang.Integer) data_;
    }
    return 0;
  }

  public static final int VSINT64_FIELD_NUMBER = 9;
  /**
   * sint64 vsint64 = 9;
   * @return Whether the vsint64 field is set.
   */
  @java.lang.Override
  public boolean hasVsint64() {
    return dataCase_ == 9;
  }
  /**
   * sint64 vsint64 = 9;
   * @return The vsint64.
   */
  @java.lang.Override
  public long getVsint64() {
    if (dataCase_ == 9) {
      return (java.lang.Long) data_;
    }
    return 0L;
  }

  public static final int VFLOAT_FIELD_NUMBER = 10;
  /**
   * float vfloat = 10;
   * @return Whether the vfloat field is set.
   */
  @java.lang.Override
  public boolean hasVfloat() {
    return dataCase_ == 10;
  }
  /**
   * float vfloat = 10;
   * @return The vfloat.
   */
  @java.lang.Override
  public float getVfloat() {
    if (dataCase_ == 10) {
      return (java.lang.Float) data_;
    }
    return 0F;
  }

  public static final int VDOUBLE_FIELD_NUMBER = 11;
  /**
   * double vdouble = 11;
   * @return Whether the vdouble field is set.
   */
  @java.lang.Override
  public boolean hasVdouble() {
    return dataCase_ == 11;
  }
  /**
   * double vdouble = 11;
   * @return The vdouble.
   */
  @java.lang.Override
  public double getVdouble() {
    if (dataCase_ == 11) {
      return (java.lang.Double) data_;
    }
    return 0D;
  }

  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.GeneratedMessage.isStringEmpty(id_)) {
      com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);
    }
    if (dataCase_ == 5) {
      com.google.protobuf.GeneratedMessage.writeString(output, 5, data_);
    }
    if (dataCase_ == 6) {
      output.writeBytes(
          6, (com.google.protobuf.ByteString) data_);
    }
    if (dataCase_ == 7) {
      output.writeBool(
          7, (boolean)((java.lang.Boolean) data_));
    }
    if (dataCase_ == 8) {
      output.writeSInt32(
          8, (int)((java.lang.Integer) data_));
    }
    if (dataCase_ == 9) {
      output.writeSInt64(
          9, (long)((java.lang.Long) data_));
    }
    if (dataCase_ == 10) {
      output.writeFloat(
          10, (float)((java.lang.Float) data_));
    }
    if (dataCase_ == 11) {
      output.writeDouble(
          11, (double)((java.lang.Double) data_));
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);
    }
    if (dataCase_ == 5) {
      size += com.google.protobuf.GeneratedMessage.computeStringSize(5, data_);
    }
    if (dataCase_ == 6) {
      size += com.google.protobuf.CodedOutputStream
        .computeBytesSize(
            6, (com.google.protobuf.ByteString) data_);
    }
    if (dataCase_ == 7) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(
            7, (boolean)((java.lang.Boolean) data_));
    }
    if (dataCase_ == 8) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt32Size(
            8, (int)((java.lang.Integer) data_));
    }
    if (dataCase_ == 9) {
      size += com.google.protobuf.CodedOutputStream
        .computeSInt64Size(
            9, (long)((java.lang.Long) data_));
    }
    if (dataCase_ == 10) {
      size += com.google.protobuf.CodedOutputStream
        .computeFloatSize(
            10, (float)((java.lang.Float) data_));
    }
    if (dataCase_ == 11) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(
            11, (double)((java.lang.Double) data_));
    }
    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.ContextData)) {
      return super.equals(obj);
    }
    org.openfeed.ContextData other = (org.openfeed.ContextData) obj;

    if (!getId()
        .equals(other.getId())) return false;
    if (!getDataCase().equals(other.getDataCase())) return false;
    switch (dataCase_) {
      case 5:
        if (!getVstring()
            .equals(other.getVstring())) return false;
        break;
      case 6:
        if (!getVbytes()
            .equals(other.getVbytes())) return false;
        break;
      case 7:
        if (getVbool()
            != other.getVbool()) return false;
        break;
      case 8:
        if (getVsint32()
            != other.getVsint32()) return false;
        break;
      case 9:
        if (getVsint64()
            != other.getVsint64()) return false;
        break;
      case 10:
        if (java.lang.Float.floatToIntBits(getVfloat())
            != java.lang.Float.floatToIntBits(
                other.getVfloat())) return false;
        break;
      case 11:
        if (java.lang.Double.doubleToLongBits(getVdouble())
            != java.lang.Double.doubleToLongBits(
                other.getVdouble())) return false;
        break;
      case 0:
      default:
    }
    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) + ID_FIELD_NUMBER;
    hash = (53 * hash) + getId().hashCode();
    switch (dataCase_) {
      case 5:
        hash = (37 * hash) + VSTRING_FIELD_NUMBER;
        hash = (53 * hash) + getVstring().hashCode();
        break;
      case 6:
        hash = (37 * hash) + VBYTES_FIELD_NUMBER;
        hash = (53 * hash) + getVbytes().hashCode();
        break;
      case 7:
        hash = (37 * hash) + VBOOL_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
            getVbool());
        break;
      case 8:
        hash = (37 * hash) + VSINT32_FIELD_NUMBER;
        hash = (53 * hash) + getVsint32();
        break;
      case 9:
        hash = (37 * hash) + VSINT64_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            getVsint64());
        break;
      case 10:
        hash = (37 * hash) + VFLOAT_FIELD_NUMBER;
        hash = (53 * hash) + java.lang.Float.floatToIntBits(
            getVfloat());
        break;
      case 11:
        hash = (37 * hash) + VDOUBLE_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
            java.lang.Double.doubleToLongBits(getVdouble()));
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static org.openfeed.ContextData parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.openfeed.ContextData parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.openfeed.ContextData parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.openfeed.ContextData 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.ContextData parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static org.openfeed.ContextData parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static org.openfeed.ContextData parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.openfeed.ContextData 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.ContextData parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static org.openfeed.ContextData 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.ContextData parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage
        .parseWithIOException(PARSER, input);
  }
  public static org.openfeed.ContextData 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.ContextData 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.ContextData}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessage.Builder implements
      // @@protoc_insertion_point(builder_implements:org.openfeed.ContextData)
      org.openfeed.ContextDataOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.openfeed.Openfeed.internal_static_org_openfeed_ContextData_descriptor;
    }

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

    // Construct using org.openfeed.ContextData.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      id_ = "";
      dataCase_ = 0;
      data_ = null;
      return this;
    }

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

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

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

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

    private void buildPartial0(org.openfeed.ContextData result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.id_ = id_;
      }
    }

    private void buildPartialOneofs(org.openfeed.ContextData result) {
      result.dataCase_ = dataCase_;
      result.data_ = this.data_;
    }

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

    public Builder mergeFrom(org.openfeed.ContextData other) {
      if (other == org.openfeed.ContextData.getDefaultInstance()) return this;
      if (!other.getId().isEmpty()) {
        id_ = other.id_;
        bitField0_ |= 0x00000001;
        onChanged();
      }
      switch (other.getDataCase()) {
        case VSTRING: {
          dataCase_ = 5;
          data_ = other.data_;
          onChanged();
          break;
        }
        case VBYTES: {
          setVbytes(other.getVbytes());
          break;
        }
        case VBOOL: {
          setVbool(other.getVbool());
          break;
        }
        case VSINT32: {
          setVsint32(other.getVsint32());
          break;
        }
        case VSINT64: {
          setVsint64(other.getVsint64());
          break;
        }
        case VFLOAT: {
          setVfloat(other.getVfloat());
          break;
        }
        case VDOUBLE: {
          setVdouble(other.getVdouble());
          break;
        }
        case DATA_NOT_SET: {
          break;
        }
      }
      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: {
              id_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 42: {
              java.lang.String s = input.readStringRequireUtf8();
              dataCase_ = 5;
              data_ = s;
              break;
            } // case 42
            case 50: {
              data_ = input.readBytes();
              dataCase_ = 6;
              break;
            } // case 50
            case 56: {
              data_ = input.readBool();
              dataCase_ = 7;
              break;
            } // case 56
            case 64: {
              data_ = input.readSInt32();
              dataCase_ = 8;
              break;
            } // case 64
            case 72: {
              data_ = input.readSInt64();
              dataCase_ = 9;
              break;
            } // case 72
            case 85: {
              data_ = input.readFloat();
              dataCase_ = 10;
              break;
            } // case 85
            case 89: {
              data_ = input.readDouble();
              dataCase_ = 11;
              break;
            } // case 89
            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 dataCase_ = 0;
    private java.lang.Object data_;
    public DataCase
        getDataCase() {
      return DataCase.forNumber(
          dataCase_);
    }

    public Builder clearData() {
      dataCase_ = 0;
      data_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private java.lang.Object id_ = "";
    /**
     * string id = 1;
     * @return The id.
     */
    public java.lang.String getId() {
      java.lang.Object ref = id_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        id_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string id = 1;
     * @return The bytes for id.
     */
    public com.google.protobuf.ByteString
        getIdBytes() {
      java.lang.Object ref = id_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string id = 1;
     * @param value The id to set.
     * @return This builder for chaining.
     */
    public Builder setId(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      id_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * string id = 1;
     * @return This builder for chaining.
     */
    public Builder clearId() {
      id_ = getDefaultInstance().getId();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * string id = 1;
     * @param value The bytes for id to set.
     * @return This builder for chaining.
     */
    public Builder setIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      id_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }

    /**
     * string vstring = 5;
     * @return Whether the vstring field is set.
     */
    @java.lang.Override
    public boolean hasVstring() {
      return dataCase_ == 5;
    }
    /**
     * string vstring = 5;
     * @return The vstring.
     */
    @java.lang.Override
    public java.lang.String getVstring() {
      java.lang.Object ref = "";
      if (dataCase_ == 5) {
        ref = data_;
      }
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (dataCase_ == 5) {
          data_ = s;
        }
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string vstring = 5;
     * @return The bytes for vstring.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getVstringBytes() {
      java.lang.Object ref = "";
      if (dataCase_ == 5) {
        ref = data_;
      }
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (dataCase_ == 5) {
          data_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string vstring = 5;
     * @param value The vstring to set.
     * @return This builder for chaining.
     */
    public Builder setVstring(
        java.lang.String value) {
      if (value == null) { throw new NullPointerException(); }
      dataCase_ = 5;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * string vstring = 5;
     * @return This builder for chaining.
     */
    public Builder clearVstring() {
      if (dataCase_ == 5) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }
    /**
     * string vstring = 5;
     * @param value The bytes for vstring to set.
     * @return This builder for chaining.
     */
    public Builder setVstringBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      dataCase_ = 5;
      data_ = value;
      onChanged();
      return this;
    }

    /**
     * bytes vbytes = 6;
     * @return Whether the vbytes field is set.
     */
    public boolean hasVbytes() {
      return dataCase_ == 6;
    }
    /**
     * bytes vbytes = 6;
     * @return The vbytes.
     */
    public com.google.protobuf.ByteString getVbytes() {
      if (dataCase_ == 6) {
        return (com.google.protobuf.ByteString) data_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }
    /**
     * bytes vbytes = 6;
     * @param value The vbytes to set.
     * @return This builder for chaining.
     */
    public Builder setVbytes(com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      dataCase_ = 6;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * bytes vbytes = 6;
     * @return This builder for chaining.
     */
    public Builder clearVbytes() {
      if (dataCase_ == 6) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * bool vbool = 7;
     * @return Whether the vbool field is set.
     */
    public boolean hasVbool() {
      return dataCase_ == 7;
    }
    /**
     * bool vbool = 7;
     * @return The vbool.
     */
    public boolean getVbool() {
      if (dataCase_ == 7) {
        return (java.lang.Boolean) data_;
      }
      return false;
    }
    /**
     * bool vbool = 7;
     * @param value The vbool to set.
     * @return This builder for chaining.
     */
    public Builder setVbool(boolean value) {

      dataCase_ = 7;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * bool vbool = 7;
     * @return This builder for chaining.
     */
    public Builder clearVbool() {
      if (dataCase_ == 7) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * sint32 vsint32 = 8;
     * @return Whether the vsint32 field is set.
     */
    public boolean hasVsint32() {
      return dataCase_ == 8;
    }
    /**
     * sint32 vsint32 = 8;
     * @return The vsint32.
     */
    public int getVsint32() {
      if (dataCase_ == 8) {
        return (java.lang.Integer) data_;
      }
      return 0;
    }
    /**
     * sint32 vsint32 = 8;
     * @param value The vsint32 to set.
     * @return This builder for chaining.
     */
    public Builder setVsint32(int value) {

      dataCase_ = 8;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * sint32 vsint32 = 8;
     * @return This builder for chaining.
     */
    public Builder clearVsint32() {
      if (dataCase_ == 8) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * sint64 vsint64 = 9;
     * @return Whether the vsint64 field is set.
     */
    public boolean hasVsint64() {
      return dataCase_ == 9;
    }
    /**
     * sint64 vsint64 = 9;
     * @return The vsint64.
     */
    public long getVsint64() {
      if (dataCase_ == 9) {
        return (java.lang.Long) data_;
      }
      return 0L;
    }
    /**
     * sint64 vsint64 = 9;
     * @param value The vsint64 to set.
     * @return This builder for chaining.
     */
    public Builder setVsint64(long value) {

      dataCase_ = 9;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * sint64 vsint64 = 9;
     * @return This builder for chaining.
     */
    public Builder clearVsint64() {
      if (dataCase_ == 9) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * float vfloat = 10;
     * @return Whether the vfloat field is set.
     */
    public boolean hasVfloat() {
      return dataCase_ == 10;
    }
    /**
     * float vfloat = 10;
     * @return The vfloat.
     */
    public float getVfloat() {
      if (dataCase_ == 10) {
        return (java.lang.Float) data_;
      }
      return 0F;
    }
    /**
     * float vfloat = 10;
     * @param value The vfloat to set.
     * @return This builder for chaining.
     */
    public Builder setVfloat(float value) {

      dataCase_ = 10;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * float vfloat = 10;
     * @return This builder for chaining.
     */
    public Builder clearVfloat() {
      if (dataCase_ == 10) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

    /**
     * double vdouble = 11;
     * @return Whether the vdouble field is set.
     */
    public boolean hasVdouble() {
      return dataCase_ == 11;
    }
    /**
     * double vdouble = 11;
     * @return The vdouble.
     */
    public double getVdouble() {
      if (dataCase_ == 11) {
        return (java.lang.Double) data_;
      }
      return 0D;
    }
    /**
     * double vdouble = 11;
     * @param value The vdouble to set.
     * @return This builder for chaining.
     */
    public Builder setVdouble(double value) {

      dataCase_ = 11;
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * double vdouble = 11;
     * @return This builder for chaining.
     */
    public Builder clearVdouble() {
      if (dataCase_ == 11) {
        dataCase_ = 0;
        data_ = null;
        onChanged();
      }
      return this;
    }

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

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

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

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

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy