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

com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: Bookmarks.proto

package com.ironsoftware.ironpdf.internal.proto;

/**
 * Protobuf type {@code IronPdfEngine.Proto.InsertBookmarkRequest}
 */
public final class InsertBookmarkRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:IronPdfEngine.Proto.InsertBookmarkRequest)
    InsertBookmarkRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use InsertBookmarkRequest.newBuilder() to construct.
  private InsertBookmarkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private InsertBookmarkRequest() {
    text_ = "";
    parentText_ = "";
    previousText_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new InsertBookmarkRequest();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ironsoftware.ironpdf.internal.proto.Bookmarks.internal_static_IronPdfEngine_Proto_InsertBookmarkRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ironsoftware.ironpdf.internal.proto.Bookmarks.internal_static_IronPdfEngine_Proto_InsertBookmarkRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest.class, com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest.Builder.class);
  }

  private int bitField0_;
  public static final int DOCUMENT_FIELD_NUMBER = 1;
  private com.ironsoftware.ironpdf.internal.proto.PdfDocument document_;
  /**
   * .IronPdfEngine.Proto.PdfDocument document = 1;
   * @return Whether the document field is set.
   */
  @java.lang.Override
  public boolean hasDocument() {
    return document_ != null;
  }
  /**
   * .IronPdfEngine.Proto.PdfDocument document = 1;
   * @return The document.
   */
  @java.lang.Override
  public com.ironsoftware.ironpdf.internal.proto.PdfDocument getDocument() {
    return document_ == null ? com.ironsoftware.ironpdf.internal.proto.PdfDocument.getDefaultInstance() : document_;
  }
  /**
   * .IronPdfEngine.Proto.PdfDocument document = 1;
   */
  @java.lang.Override
  public com.ironsoftware.ironpdf.internal.proto.PdfDocumentOrBuilder getDocumentOrBuilder() {
    return getDocument();
  }

  public static final int PAGE_INDEX_FIELD_NUMBER = 2;
  private int pageIndex_;
  /**
   * int32 page_index = 2;
   * @return The pageIndex.
   */
  @java.lang.Override
  public int getPageIndex() {
    return pageIndex_;
  }

  public static final int TEXT_FIELD_NUMBER = 3;
  private volatile java.lang.Object text_;
  /**
   * string text = 3;
   * @return The text.
   */
  @java.lang.Override
  public java.lang.String getText() {
    java.lang.Object ref = text_;
    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();
      text_ = s;
      return s;
    }
  }
  /**
   * string text = 3;
   * @return The bytes for text.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getTextBytes() {
    java.lang.Object ref = text_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      text_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PARENT_TEXT_FIELD_NUMBER = 4;
  private volatile java.lang.Object parentText_;
  /**
   * optional string parent_text = 4;
   * @return Whether the parentText field is set.
   */
  @java.lang.Override
  public boolean hasParentText() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * optional string parent_text = 4;
   * @return The parentText.
   */
  @java.lang.Override
  public java.lang.String getParentText() {
    java.lang.Object ref = parentText_;
    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();
      parentText_ = s;
      return s;
    }
  }
  /**
   * optional string parent_text = 4;
   * @return The bytes for parentText.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getParentTextBytes() {
    java.lang.Object ref = parentText_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      parentText_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PREVIOUS_TEXT_FIELD_NUMBER = 5;
  private volatile java.lang.Object previousText_;
  /**
   * optional string previous_text = 5;
   * @return Whether the previousText field is set.
   */
  @java.lang.Override
  public boolean hasPreviousText() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * optional string previous_text = 5;
   * @return The previousText.
   */
  @java.lang.Override
  public java.lang.String getPreviousText() {
    java.lang.Object ref = previousText_;
    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();
      previousText_ = s;
      return s;
    }
  }
  /**
   * optional string previous_text = 5;
   * @return The bytes for previousText.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getPreviousTextBytes() {
    java.lang.Object ref = previousText_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      previousText_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 (document_ != null) {
      output.writeMessage(1, getDocument());
    }
    if (pageIndex_ != 0) {
      output.writeInt32(2, pageIndex_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, text_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, parentText_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, previousText_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (document_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getDocument());
    }
    if (pageIndex_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, pageIndex_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, text_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, parentText_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, previousText_);
    }
    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 com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest)) {
      return super.equals(obj);
    }
    com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest other = (com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest) obj;

    if (hasDocument() != other.hasDocument()) return false;
    if (hasDocument()) {
      if (!getDocument()
          .equals(other.getDocument())) return false;
    }
    if (getPageIndex()
        != other.getPageIndex()) return false;
    if (!getText()
        .equals(other.getText())) return false;
    if (hasParentText() != other.hasParentText()) return false;
    if (hasParentText()) {
      if (!getParentText()
          .equals(other.getParentText())) return false;
    }
    if (hasPreviousText() != other.hasPreviousText()) return false;
    if (hasPreviousText()) {
      if (!getPreviousText()
          .equals(other.getPreviousText())) 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();
    if (hasDocument()) {
      hash = (37 * hash) + DOCUMENT_FIELD_NUMBER;
      hash = (53 * hash) + getDocument().hashCode();
    }
    hash = (37 * hash) + PAGE_INDEX_FIELD_NUMBER;
    hash = (53 * hash) + getPageIndex();
    hash = (37 * hash) + TEXT_FIELD_NUMBER;
    hash = (53 * hash) + getText().hashCode();
    if (hasParentText()) {
      hash = (37 * hash) + PARENT_TEXT_FIELD_NUMBER;
      hash = (53 * hash) + getParentText().hashCode();
    }
    if (hasPreviousText()) {
      hash = (37 * hash) + PREVIOUS_TEXT_FIELD_NUMBER;
      hash = (53 * hash) + getPreviousText().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest 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 com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest 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 com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest 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(com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code IronPdfEngine.Proto.InsertBookmarkRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder implements
      // @@protoc_insertion_point(builder_implements:IronPdfEngine.Proto.InsertBookmarkRequest)
      com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ironsoftware.ironpdf.internal.proto.Bookmarks.internal_static_IronPdfEngine_Proto_InsertBookmarkRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ironsoftware.ironpdf.internal.proto.Bookmarks.internal_static_IronPdfEngine_Proto_InsertBookmarkRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest.class, com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest.Builder.class);
    }

    // Construct using com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest.newBuilder()
    private Builder() {

    }

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

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (documentBuilder_ == null) {
        document_ = null;
      } else {
        document_ = null;
        documentBuilder_ = null;
      }
      pageIndex_ = 0;

      text_ = "";

      parentText_ = "";
      bitField0_ = (bitField0_ & ~0x00000001);
      previousText_ = "";
      bitField0_ = (bitField0_ & ~0x00000002);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ironsoftware.ironpdf.internal.proto.Bookmarks.internal_static_IronPdfEngine_Proto_InsertBookmarkRequest_descriptor;
    }

    @java.lang.Override
    public com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest getDefaultInstanceForType() {
      return com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest.getDefaultInstance();
    }

    @java.lang.Override
    public com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest build() {
      com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest buildPartial() {
      com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest result = new com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (documentBuilder_ == null) {
        result.document_ = document_;
      } else {
        result.document_ = documentBuilder_.build();
      }
      result.pageIndex_ = pageIndex_;
      result.text_ = text_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        to_bitField0_ |= 0x00000001;
      }
      result.parentText_ = parentText_;
      if (((from_bitField0_ & 0x00000002) != 0)) {
        to_bitField0_ |= 0x00000002;
      }
      result.previousText_ = previousText_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest) {
        return mergeFrom((com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest other) {
      if (other == com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest.getDefaultInstance()) return this;
      if (other.hasDocument()) {
        mergeDocument(other.getDocument());
      }
      if (other.getPageIndex() != 0) {
        setPageIndex(other.getPageIndex());
      }
      if (!other.getText().isEmpty()) {
        text_ = other.text_;
        onChanged();
      }
      if (other.hasParentText()) {
        bitField0_ |= 0x00000001;
        parentText_ = other.parentText_;
        onChanged();
      }
      if (other.hasPreviousText()) {
        bitField0_ |= 0x00000002;
        previousText_ = other.previousText_;
        onChanged();
      }
      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: {
              input.readMessage(
                  getDocumentFieldBuilder().getBuilder(),
                  extensionRegistry);

              break;
            } // case 10
            case 16: {
              pageIndex_ = input.readInt32();

              break;
            } // case 16
            case 26: {
              text_ = input.readStringRequireUtf8();

              break;
            } // case 26
            case 34: {
              parentText_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000001;
              break;
            } // case 34
            case 42: {
              previousText_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000002;
              break;
            } // case 42
            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 com.ironsoftware.ironpdf.internal.proto.PdfDocument document_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ironsoftware.ironpdf.internal.proto.PdfDocument, com.ironsoftware.ironpdf.internal.proto.PdfDocument.Builder, com.ironsoftware.ironpdf.internal.proto.PdfDocumentOrBuilder> documentBuilder_;
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     * @return Whether the document field is set.
     */
    public boolean hasDocument() {
      return documentBuilder_ != null || document_ != null;
    }
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     * @return The document.
     */
    public com.ironsoftware.ironpdf.internal.proto.PdfDocument getDocument() {
      if (documentBuilder_ == null) {
        return document_ == null ? com.ironsoftware.ironpdf.internal.proto.PdfDocument.getDefaultInstance() : document_;
      } else {
        return documentBuilder_.getMessage();
      }
    }
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     */
    public Builder setDocument(com.ironsoftware.ironpdf.internal.proto.PdfDocument value) {
      if (documentBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        document_ = value;
        onChanged();
      } else {
        documentBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     */
    public Builder setDocument(
        com.ironsoftware.ironpdf.internal.proto.PdfDocument.Builder builderForValue) {
      if (documentBuilder_ == null) {
        document_ = builderForValue.build();
        onChanged();
      } else {
        documentBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     */
    public Builder mergeDocument(com.ironsoftware.ironpdf.internal.proto.PdfDocument value) {
      if (documentBuilder_ == null) {
        if (document_ != null) {
          document_ =
            com.ironsoftware.ironpdf.internal.proto.PdfDocument.newBuilder(document_).mergeFrom(value).buildPartial();
        } else {
          document_ = value;
        }
        onChanged();
      } else {
        documentBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     */
    public Builder clearDocument() {
      if (documentBuilder_ == null) {
        document_ = null;
        onChanged();
      } else {
        document_ = null;
        documentBuilder_ = null;
      }

      return this;
    }
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     */
    public com.ironsoftware.ironpdf.internal.proto.PdfDocument.Builder getDocumentBuilder() {
      
      onChanged();
      return getDocumentFieldBuilder().getBuilder();
    }
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     */
    public com.ironsoftware.ironpdf.internal.proto.PdfDocumentOrBuilder getDocumentOrBuilder() {
      if (documentBuilder_ != null) {
        return documentBuilder_.getMessageOrBuilder();
      } else {
        return document_ == null ?
            com.ironsoftware.ironpdf.internal.proto.PdfDocument.getDefaultInstance() : document_;
      }
    }
    /**
     * .IronPdfEngine.Proto.PdfDocument document = 1;
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ironsoftware.ironpdf.internal.proto.PdfDocument, com.ironsoftware.ironpdf.internal.proto.PdfDocument.Builder, com.ironsoftware.ironpdf.internal.proto.PdfDocumentOrBuilder> 
        getDocumentFieldBuilder() {
      if (documentBuilder_ == null) {
        documentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ironsoftware.ironpdf.internal.proto.PdfDocument, com.ironsoftware.ironpdf.internal.proto.PdfDocument.Builder, com.ironsoftware.ironpdf.internal.proto.PdfDocumentOrBuilder>(
                getDocument(),
                getParentForChildren(),
                isClean());
        document_ = null;
      }
      return documentBuilder_;
    }

    private int pageIndex_ ;
    /**
     * int32 page_index = 2;
     * @return The pageIndex.
     */
    @java.lang.Override
    public int getPageIndex() {
      return pageIndex_;
    }
    /**
     * int32 page_index = 2;
     * @param value The pageIndex to set.
     * @return This builder for chaining.
     */
    public Builder setPageIndex(int value) {
      
      pageIndex_ = value;
      onChanged();
      return this;
    }
    /**
     * int32 page_index = 2;
     * @return This builder for chaining.
     */
    public Builder clearPageIndex() {
      
      pageIndex_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object text_ = "";
    /**
     * string text = 3;
     * @return The text.
     */
    public java.lang.String getText() {
      java.lang.Object ref = text_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        text_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * string text = 3;
     * @return The bytes for text.
     */
    public com.google.protobuf.ByteString
        getTextBytes() {
      java.lang.Object ref = text_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        text_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * string text = 3;
     * @param value The text to set.
     * @return This builder for chaining.
     */
    public Builder setText(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      text_ = value;
      onChanged();
      return this;
    }
    /**
     * string text = 3;
     * @return This builder for chaining.
     */
    public Builder clearText() {
      
      text_ = getDefaultInstance().getText();
      onChanged();
      return this;
    }
    /**
     * string text = 3;
     * @param value The bytes for text to set.
     * @return This builder for chaining.
     */
    public Builder setTextBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      text_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object parentText_ = "";
    /**
     * optional string parent_text = 4;
     * @return Whether the parentText field is set.
     */
    public boolean hasParentText() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * optional string parent_text = 4;
     * @return The parentText.
     */
    public java.lang.String getParentText() {
      java.lang.Object ref = parentText_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        parentText_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * optional string parent_text = 4;
     * @return The bytes for parentText.
     */
    public com.google.protobuf.ByteString
        getParentTextBytes() {
      java.lang.Object ref = parentText_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        parentText_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * optional string parent_text = 4;
     * @param value The parentText to set.
     * @return This builder for chaining.
     */
    public Builder setParentText(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
      parentText_ = value;
      onChanged();
      return this;
    }
    /**
     * optional string parent_text = 4;
     * @return This builder for chaining.
     */
    public Builder clearParentText() {
      bitField0_ = (bitField0_ & ~0x00000001);
      parentText_ = getDefaultInstance().getParentText();
      onChanged();
      return this;
    }
    /**
     * optional string parent_text = 4;
     * @param value The bytes for parentText to set.
     * @return This builder for chaining.
     */
    public Builder setParentTextBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000001;
      parentText_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object previousText_ = "";
    /**
     * optional string previous_text = 5;
     * @return Whether the previousText field is set.
     */
    public boolean hasPreviousText() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * optional string previous_text = 5;
     * @return The previousText.
     */
    public java.lang.String getPreviousText() {
      java.lang.Object ref = previousText_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        previousText_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * optional string previous_text = 5;
     * @return The bytes for previousText.
     */
    public com.google.protobuf.ByteString
        getPreviousTextBytes() {
      java.lang.Object ref = previousText_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        previousText_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * optional string previous_text = 5;
     * @param value The previousText to set.
     * @return This builder for chaining.
     */
    public Builder setPreviousText(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
      previousText_ = value;
      onChanged();
      return this;
    }
    /**
     * optional string previous_text = 5;
     * @return This builder for chaining.
     */
    public Builder clearPreviousText() {
      bitField0_ = (bitField0_ & ~0x00000002);
      previousText_ = getDefaultInstance().getPreviousText();
      onChanged();
      return this;
    }
    /**
     * optional string previous_text = 5;
     * @param value The bytes for previousText to set.
     * @return This builder for chaining.
     */
    public Builder setPreviousTextBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000002;
      previousText_ = value;
      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:IronPdfEngine.Proto.InsertBookmarkRequest)
  }

  // @@protoc_insertion_point(class_scope:IronPdfEngine.Proto.InsertBookmarkRequest)
  private static final com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest();
  }

  public static com.ironsoftware.ironpdf.internal.proto.InsertBookmarkRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy