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

net.sf.okapi.proto.textunitflat.Note Maven / Gradle / Ivy

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

package net.sf.okapi.proto.textunitflat;

/**
 * Protobuf type {@code Note}
 */
public final class Note extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:Note)
    NoteOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Note.newBuilder() to construct.
  private Note(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Note() {
    note_ = "";
    xmlLang_ = "";
    from_ = "";
    priority_ = 0;
    annotates_ = 0;
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Note(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            note_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000001;
            xmlLang_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000002;
            from_ = s;
            break;
          }
          case 32: {
            int rawValue = input.readEnum();
            bitField0_ |= 0x00000004;
            priority_ = rawValue;
            break;
          }
          case 40: {
            int rawValue = input.readEnum();
            bitField0_ |= 0x00000008;
            annotates_ = rawValue;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (com.google.protobuf.UninitializedMessageException e) {
      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Note_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Note_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            net.sf.okapi.proto.textunitflat.Note.class, net.sf.okapi.proto.textunitflat.Note.Builder.class);
  }

  /**
   * Protobuf enum {@code Note.Priority}
   */
  public enum Priority
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * ONE = 0;
     */
    ONE(0),
    /**
     * TWO = 1;
     */
    TWO(1),
    /**
     * THREE = 2;
     */
    THREE(2),
    /**
     * FOUR = 3;
     */
    FOUR(3),
    /**
     * FIVE = 4;
     */
    FIVE(4),
    /**
     * SIX = 5;
     */
    SIX(5),
    /**
     * SEVEN = 6;
     */
    SEVEN(6),
    /**
     * EIGHT = 7;
     */
    EIGHT(7),
    /**
     * NINE = 8;
     */
    NINE(8),
    /**
     * TEN = 9;
     */
    TEN(9),
    UNRECOGNIZED(-1),
    ;

    /**
     * ONE = 0;
     */
    public static final int ONE_VALUE = 0;
    /**
     * TWO = 1;
     */
    public static final int TWO_VALUE = 1;
    /**
     * THREE = 2;
     */
    public static final int THREE_VALUE = 2;
    /**
     * FOUR = 3;
     */
    public static final int FOUR_VALUE = 3;
    /**
     * FIVE = 4;
     */
    public static final int FIVE_VALUE = 4;
    /**
     * SIX = 5;
     */
    public static final int SIX_VALUE = 5;
    /**
     * SEVEN = 6;
     */
    public static final int SEVEN_VALUE = 6;
    /**
     * EIGHT = 7;
     */
    public static final int EIGHT_VALUE = 7;
    /**
     * NINE = 8;
     */
    public static final int NINE_VALUE = 8;
    /**
     * TEN = 9;
     */
    public static final int TEN_VALUE = 9;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Priority valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Priority forNumber(int value) {
      switch (value) {
        case 0: return ONE;
        case 1: return TWO;
        case 2: return THREE;
        case 3: return FOUR;
        case 4: return FIVE;
        case 5: return SIX;
        case 6: return SEVEN;
        case 7: return EIGHT;
        case 8: return NINE;
        case 9: return TEN;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        Priority> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            public Priority findValueByNumber(int number) {
              return Priority.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return net.sf.okapi.proto.textunitflat.Note.getDescriptor().getEnumTypes().get(0);
    }

    private static final Priority[] VALUES = values();

    public static Priority valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Priority(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:Note.Priority)
  }

  /**
   * Protobuf enum {@code Note.Annotates}
   */
  public enum Annotates
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * SOURCE = 0;
     */
    SOURCE(0),
    /**
     * TARGET = 1;
     */
    TARGET(1),
    /**
     * GENERAL = 2;
     */
    GENERAL(2),
    UNRECOGNIZED(-1),
    ;

    /**
     * SOURCE = 0;
     */
    public static final int SOURCE_VALUE = 0;
    /**
     * TARGET = 1;
     */
    public static final int TARGET_VALUE = 1;
    /**
     * GENERAL = 2;
     */
    public static final int GENERAL_VALUE = 2;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Annotates valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Annotates forNumber(int value) {
      switch (value) {
        case 0: return SOURCE;
        case 1: return TARGET;
        case 2: return GENERAL;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        Annotates> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap() {
            public Annotates findValueByNumber(int number) {
              return Annotates.forNumber(number);
            }
          };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
        getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }
    public final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptorForType() {
      return getDescriptor();
    }
    public static final com.google.protobuf.Descriptors.EnumDescriptor
        getDescriptor() {
      return net.sf.okapi.proto.textunitflat.Note.getDescriptor().getEnumTypes().get(1);
    }

    private static final Annotates[] VALUES = values();

    public static Annotates valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Annotates(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:Note.Annotates)
  }

  private int bitField0_;
  public static final int NOTE_FIELD_NUMBER = 1;
  private volatile java.lang.Object note_;
  /**
   * 
   * Required
   * 
* * string note = 1; * @return The note. */ @java.lang.Override public java.lang.String getNote() { java.lang.Object ref = note_; 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(); note_ = s; return s; } } /** *
   * Required
   * 
* * string note = 1; * @return The bytes for note. */ @java.lang.Override public com.google.protobuf.ByteString getNoteBytes() { java.lang.Object ref = note_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); note_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int XMLLANG_FIELD_NUMBER = 2; private volatile java.lang.Object xmlLang_; /** *
   * optional
   * 
* * optional string xmlLang = 2; * @return Whether the xmlLang field is set. */ @java.lang.Override public boolean hasXmlLang() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * optional
   * 
* * optional string xmlLang = 2; * @return The xmlLang. */ @java.lang.Override public java.lang.String getXmlLang() { java.lang.Object ref = xmlLang_; 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(); xmlLang_ = s; return s; } } /** *
   * optional
   * 
* * optional string xmlLang = 2; * @return The bytes for xmlLang. */ @java.lang.Override public com.google.protobuf.ByteString getXmlLangBytes() { java.lang.Object ref = xmlLang_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); xmlLang_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FROM_FIELD_NUMBER = 3; private volatile java.lang.Object from_; /** * optional string from = 3; * @return Whether the from field is set. */ @java.lang.Override public boolean hasFrom() { return ((bitField0_ & 0x00000002) != 0); } /** * optional string from = 3; * @return The from. */ @java.lang.Override public java.lang.String getFrom() { java.lang.Object ref = from_; 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(); from_ = s; return s; } } /** * optional string from = 3; * @return The bytes for from. */ @java.lang.Override public com.google.protobuf.ByteString getFromBytes() { java.lang.Object ref = from_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); from_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PRIORITY_FIELD_NUMBER = 4; private int priority_; /** * optional .Note.Priority priority = 4; * @return Whether the priority field is set. */ @java.lang.Override public boolean hasPriority() { return ((bitField0_ & 0x00000004) != 0); } /** * optional .Note.Priority priority = 4; * @return The enum numeric value on the wire for priority. */ @java.lang.Override public int getPriorityValue() { return priority_; } /** * optional .Note.Priority priority = 4; * @return The priority. */ @java.lang.Override public net.sf.okapi.proto.textunitflat.Note.Priority getPriority() { @SuppressWarnings("deprecation") net.sf.okapi.proto.textunitflat.Note.Priority result = net.sf.okapi.proto.textunitflat.Note.Priority.valueOf(priority_); return result == null ? net.sf.okapi.proto.textunitflat.Note.Priority.UNRECOGNIZED : result; } public static final int ANNOTATES_FIELD_NUMBER = 5; private int annotates_; /** * optional .Note.Annotates annotates = 5; * @return Whether the annotates field is set. */ @java.lang.Override public boolean hasAnnotates() { return ((bitField0_ & 0x00000008) != 0); } /** * optional .Note.Annotates annotates = 5; * @return The enum numeric value on the wire for annotates. */ @java.lang.Override public int getAnnotatesValue() { return annotates_; } /** * optional .Note.Annotates annotates = 5; * @return The annotates. */ @java.lang.Override public net.sf.okapi.proto.textunitflat.Note.Annotates getAnnotates() { @SuppressWarnings("deprecation") net.sf.okapi.proto.textunitflat.Note.Annotates result = net.sf.okapi.proto.textunitflat.Note.Annotates.valueOf(annotates_); return result == null ? net.sf.okapi.proto.textunitflat.Note.Annotates.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, note_); } if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, xmlLang_); } if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, from_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeEnum(4, priority_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeEnum(5, annotates_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, note_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, xmlLang_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, from_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, priority_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(5, annotates_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof net.sf.okapi.proto.textunitflat.Note)) { return super.equals(obj); } net.sf.okapi.proto.textunitflat.Note other = (net.sf.okapi.proto.textunitflat.Note) obj; if (!getNote() .equals(other.getNote())) return false; if (hasXmlLang() != other.hasXmlLang()) return false; if (hasXmlLang()) { if (!getXmlLang() .equals(other.getXmlLang())) return false; } if (hasFrom() != other.hasFrom()) return false; if (hasFrom()) { if (!getFrom() .equals(other.getFrom())) return false; } if (hasPriority() != other.hasPriority()) return false; if (hasPriority()) { if (priority_ != other.priority_) return false; } if (hasAnnotates() != other.hasAnnotates()) return false; if (hasAnnotates()) { if (annotates_ != other.annotates_) return false; } if (!unknownFields.equals(other.unknownFields)) 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) + NOTE_FIELD_NUMBER; hash = (53 * hash) + getNote().hashCode(); if (hasXmlLang()) { hash = (37 * hash) + XMLLANG_FIELD_NUMBER; hash = (53 * hash) + getXmlLang().hashCode(); } if (hasFrom()) { hash = (37 * hash) + FROM_FIELD_NUMBER; hash = (53 * hash) + getFrom().hashCode(); } if (hasPriority()) { hash = (37 * hash) + PRIORITY_FIELD_NUMBER; hash = (53 * hash) + priority_; } if (hasAnnotates()) { hash = (37 * hash) + ANNOTATES_FIELD_NUMBER; hash = (53 * hash) + annotates_; } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static net.sf.okapi.proto.textunitflat.Note parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static net.sf.okapi.proto.textunitflat.Note parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static net.sf.okapi.proto.textunitflat.Note parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static net.sf.okapi.proto.textunitflat.Note parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static net.sf.okapi.proto.textunitflat.Note parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static net.sf.okapi.proto.textunitflat.Note parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static net.sf.okapi.proto.textunitflat.Note parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static net.sf.okapi.proto.textunitflat.Note 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 net.sf.okapi.proto.textunitflat.Note parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static net.sf.okapi.proto.textunitflat.Note 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 net.sf.okapi.proto.textunitflat.Note parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static net.sf.okapi.proto.textunitflat.Note 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(net.sf.okapi.proto.textunitflat.Note 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 Note} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:Note) net.sf.okapi.proto.textunitflat.NoteOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Note_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Note_fieldAccessorTable .ensureFieldAccessorsInitialized( net.sf.okapi.proto.textunitflat.Note.class, net.sf.okapi.proto.textunitflat.Note.Builder.class); } // Construct using net.sf.okapi.proto.textunitflat.Note.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); note_ = ""; xmlLang_ = ""; bitField0_ = (bitField0_ & ~0x00000001); from_ = ""; bitField0_ = (bitField0_ & ~0x00000002); priority_ = 0; bitField0_ = (bitField0_ & ~0x00000004); annotates_ = 0; bitField0_ = (bitField0_ & ~0x00000008); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Note_descriptor; } @java.lang.Override public net.sf.okapi.proto.textunitflat.Note getDefaultInstanceForType() { return net.sf.okapi.proto.textunitflat.Note.getDefaultInstance(); } @java.lang.Override public net.sf.okapi.proto.textunitflat.Note build() { net.sf.okapi.proto.textunitflat.Note result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public net.sf.okapi.proto.textunitflat.Note buildPartial() { net.sf.okapi.proto.textunitflat.Note result = new net.sf.okapi.proto.textunitflat.Note(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.note_ = note_; if (((from_bitField0_ & 0x00000001) != 0)) { to_bitField0_ |= 0x00000001; } result.xmlLang_ = xmlLang_; if (((from_bitField0_ & 0x00000002) != 0)) { to_bitField0_ |= 0x00000002; } result.from_ = from_; if (((from_bitField0_ & 0x00000004) != 0)) { to_bitField0_ |= 0x00000004; } result.priority_ = priority_; if (((from_bitField0_ & 0x00000008) != 0)) { to_bitField0_ |= 0x00000008; } result.annotates_ = annotates_; 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 net.sf.okapi.proto.textunitflat.Note) { return mergeFrom((net.sf.okapi.proto.textunitflat.Note)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(net.sf.okapi.proto.textunitflat.Note other) { if (other == net.sf.okapi.proto.textunitflat.Note.getDefaultInstance()) return this; if (!other.getNote().isEmpty()) { note_ = other.note_; onChanged(); } if (other.hasXmlLang()) { bitField0_ |= 0x00000001; xmlLang_ = other.xmlLang_; onChanged(); } if (other.hasFrom()) { bitField0_ |= 0x00000002; from_ = other.from_; onChanged(); } if (other.hasPriority()) { setPriority(other.getPriority()); } if (other.hasAnnotates()) { setAnnotates(other.getAnnotates()); } this.mergeUnknownFields(other.unknownFields); 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 { net.sf.okapi.proto.textunitflat.Note parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.sf.okapi.proto.textunitflat.Note) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object note_ = ""; /** *
     * Required
     * 
* * string note = 1; * @return The note. */ public java.lang.String getNote() { java.lang.Object ref = note_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); note_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Required
     * 
* * string note = 1; * @return The bytes for note. */ public com.google.protobuf.ByteString getNoteBytes() { java.lang.Object ref = note_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); note_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Required
     * 
* * string note = 1; * @param value The note to set. * @return This builder for chaining. */ public Builder setNote( java.lang.String value) { if (value == null) { throw new NullPointerException(); } note_ = value; onChanged(); return this; } /** *
     * Required
     * 
* * string note = 1; * @return This builder for chaining. */ public Builder clearNote() { note_ = getDefaultInstance().getNote(); onChanged(); return this; } /** *
     * Required
     * 
* * string note = 1; * @param value The bytes for note to set. * @return This builder for chaining. */ public Builder setNoteBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); note_ = value; onChanged(); return this; } private java.lang.Object xmlLang_ = ""; /** *
     * optional
     * 
* * optional string xmlLang = 2; * @return Whether the xmlLang field is set. */ public boolean hasXmlLang() { return ((bitField0_ & 0x00000001) != 0); } /** *
     * optional
     * 
* * optional string xmlLang = 2; * @return The xmlLang. */ public java.lang.String getXmlLang() { java.lang.Object ref = xmlLang_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); xmlLang_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * optional
     * 
* * optional string xmlLang = 2; * @return The bytes for xmlLang. */ public com.google.protobuf.ByteString getXmlLangBytes() { java.lang.Object ref = xmlLang_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); xmlLang_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * optional
     * 
* * optional string xmlLang = 2; * @param value The xmlLang to set. * @return This builder for chaining. */ public Builder setXmlLang( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; xmlLang_ = value; onChanged(); return this; } /** *
     * optional
     * 
* * optional string xmlLang = 2; * @return This builder for chaining. */ public Builder clearXmlLang() { bitField0_ = (bitField0_ & ~0x00000001); xmlLang_ = getDefaultInstance().getXmlLang(); onChanged(); return this; } /** *
     * optional
     * 
* * optional string xmlLang = 2; * @param value The bytes for xmlLang to set. * @return This builder for chaining. */ public Builder setXmlLangBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); bitField0_ |= 0x00000001; xmlLang_ = value; onChanged(); return this; } private java.lang.Object from_ = ""; /** * optional string from = 3; * @return Whether the from field is set. */ public boolean hasFrom() { return ((bitField0_ & 0x00000002) != 0); } /** * optional string from = 3; * @return The from. */ public java.lang.String getFrom() { java.lang.Object ref = from_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); from_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string from = 3; * @return The bytes for from. */ public com.google.protobuf.ByteString getFromBytes() { java.lang.Object ref = from_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); from_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string from = 3; * @param value The from to set. * @return This builder for chaining. */ public Builder setFrom( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; from_ = value; onChanged(); return this; } /** * optional string from = 3; * @return This builder for chaining. */ public Builder clearFrom() { bitField0_ = (bitField0_ & ~0x00000002); from_ = getDefaultInstance().getFrom(); onChanged(); return this; } /** * optional string from = 3; * @param value The bytes for from to set. * @return This builder for chaining. */ public Builder setFromBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); bitField0_ |= 0x00000002; from_ = value; onChanged(); return this; } private int priority_ = 0; /** * optional .Note.Priority priority = 4; * @return Whether the priority field is set. */ @java.lang.Override public boolean hasPriority() { return ((bitField0_ & 0x00000004) != 0); } /** * optional .Note.Priority priority = 4; * @return The enum numeric value on the wire for priority. */ @java.lang.Override public int getPriorityValue() { return priority_; } /** * optional .Note.Priority priority = 4; * @param value The enum numeric value on the wire for priority to set. * @return This builder for chaining. */ public Builder setPriorityValue(int value) { bitField0_ |= 0x00000004; priority_ = value; onChanged(); return this; } /** * optional .Note.Priority priority = 4; * @return The priority. */ @java.lang.Override public net.sf.okapi.proto.textunitflat.Note.Priority getPriority() { @SuppressWarnings("deprecation") net.sf.okapi.proto.textunitflat.Note.Priority result = net.sf.okapi.proto.textunitflat.Note.Priority.valueOf(priority_); return result == null ? net.sf.okapi.proto.textunitflat.Note.Priority.UNRECOGNIZED : result; } /** * optional .Note.Priority priority = 4; * @param value The priority to set. * @return This builder for chaining. */ public Builder setPriority(net.sf.okapi.proto.textunitflat.Note.Priority value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; priority_ = value.getNumber(); onChanged(); return this; } /** * optional .Note.Priority priority = 4; * @return This builder for chaining. */ public Builder clearPriority() { bitField0_ = (bitField0_ & ~0x00000004); priority_ = 0; onChanged(); return this; } private int annotates_ = 0; /** * optional .Note.Annotates annotates = 5; * @return Whether the annotates field is set. */ @java.lang.Override public boolean hasAnnotates() { return ((bitField0_ & 0x00000008) != 0); } /** * optional .Note.Annotates annotates = 5; * @return The enum numeric value on the wire for annotates. */ @java.lang.Override public int getAnnotatesValue() { return annotates_; } /** * optional .Note.Annotates annotates = 5; * @param value The enum numeric value on the wire for annotates to set. * @return This builder for chaining. */ public Builder setAnnotatesValue(int value) { bitField0_ |= 0x00000008; annotates_ = value; onChanged(); return this; } /** * optional .Note.Annotates annotates = 5; * @return The annotates. */ @java.lang.Override public net.sf.okapi.proto.textunitflat.Note.Annotates getAnnotates() { @SuppressWarnings("deprecation") net.sf.okapi.proto.textunitflat.Note.Annotates result = net.sf.okapi.proto.textunitflat.Note.Annotates.valueOf(annotates_); return result == null ? net.sf.okapi.proto.textunitflat.Note.Annotates.UNRECOGNIZED : result; } /** * optional .Note.Annotates annotates = 5; * @param value The annotates to set. * @return This builder for chaining. */ public Builder setAnnotates(net.sf.okapi.proto.textunitflat.Note.Annotates value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; annotates_ = value.getNumber(); onChanged(); return this; } /** * optional .Note.Annotates annotates = 5; * @return This builder for chaining. */ public Builder clearAnnotates() { bitField0_ = (bitField0_ & ~0x00000008); annotates_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:Note) } // @@protoc_insertion_point(class_scope:Note) private static final net.sf.okapi.proto.textunitflat.Note DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new net.sf.okapi.proto.textunitflat.Note(); } public static net.sf.okapi.proto.textunitflat.Note getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Note parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Note(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public net.sf.okapi.proto.textunitflat.Note getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy