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

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

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

package net.sf.okapi.proto.textunitflat;

/**
 * Protobuf type {@code Property}
 */
public final class Property extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:Property)
    PropertyOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Property.newBuilder() to construct.
  private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private Property() {
    name_ = "";
    value_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private Property(
      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();

            name_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000001;
            value_ = s;
            break;
          }
          case 24: {
            bitField0_ |= 0x00000002;
            readOnly_ = input.readBool();
            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_Property_descriptor;
  }

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

  /**
   * Protobuf enum {@code Property.PropName}
   */
  public enum PropName
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * ENCODING = 0;
     */
    ENCODING(0),
    /**
     * LANGUAGE = 1;
     */
    LANGUAGE(1),
    /**
     * APPROVED = 2;
     */
    APPROVED(2),
    /**
     * NOTE = 3;
     */
    NOTE(3),
    /**
     * TRANSNOTE = 4;
     */
    TRANSNOTE(4),
    /**
     * COORDINATES = 5;
     */
    COORDINATES(5),
    /**
     * STATE_QUALIFIER = 6;
     */
    STATE_QUALIFIER(6),
    /**
     * STATE = 7;
     */
    STATE(7),
    /**
     * ITS_LQI = 8;
     */
    ITS_LQI(8),
    /**
     * ITS_PROV = 9;
     */
    ITS_PROV(9),
    /**
     * ITS_MTCONFIDENCE = 10;
     */
    ITS_MTCONFIDENCE(10),
    /**
     * XLIFF_TOOL = 11;
     */
    XLIFF_TOOL(11),
    /**
     * XLIFF_PHASE = 12;
     */
    XLIFF_PHASE(12),
    /**
     * MAX_WIDTH = 13;
     */
    MAX_WIDTH(13),
    /**
     * MAX_HEIGHT = 14;
     */
    MAX_HEIGHT(14),
    /**
     * SIZE_UNIT = 15;
     */
    SIZE_UNIT(15),
    /**
     * 
     **
     * For TMX filter - may be used by {@link TMXWriter} or {@link TMXFilterWriter}
     * 
* * TMX_i = 16; */ TMX_i(16), /** * TMX_hi = 17; */ TMX_hi(17), /** * TMX_x = 18; */ TMX_x(18), UNRECOGNIZED(-1), ; /** * ENCODING = 0; */ public static final int ENCODING_VALUE = 0; /** * LANGUAGE = 1; */ public static final int LANGUAGE_VALUE = 1; /** * APPROVED = 2; */ public static final int APPROVED_VALUE = 2; /** * NOTE = 3; */ public static final int NOTE_VALUE = 3; /** * TRANSNOTE = 4; */ public static final int TRANSNOTE_VALUE = 4; /** * COORDINATES = 5; */ public static final int COORDINATES_VALUE = 5; /** * STATE_QUALIFIER = 6; */ public static final int STATE_QUALIFIER_VALUE = 6; /** * STATE = 7; */ public static final int STATE_VALUE = 7; /** * ITS_LQI = 8; */ public static final int ITS_LQI_VALUE = 8; /** * ITS_PROV = 9; */ public static final int ITS_PROV_VALUE = 9; /** * ITS_MTCONFIDENCE = 10; */ public static final int ITS_MTCONFIDENCE_VALUE = 10; /** * XLIFF_TOOL = 11; */ public static final int XLIFF_TOOL_VALUE = 11; /** * XLIFF_PHASE = 12; */ public static final int XLIFF_PHASE_VALUE = 12; /** * MAX_WIDTH = 13; */ public static final int MAX_WIDTH_VALUE = 13; /** * MAX_HEIGHT = 14; */ public static final int MAX_HEIGHT_VALUE = 14; /** * SIZE_UNIT = 15; */ public static final int SIZE_UNIT_VALUE = 15; /** *
     **
     * For TMX filter - may be used by {@link TMXWriter} or {@link TMXFilterWriter}
     * 
* * TMX_i = 16; */ public static final int TMX_i_VALUE = 16; /** * TMX_hi = 17; */ public static final int TMX_hi_VALUE = 17; /** * TMX_x = 18; */ public static final int TMX_x_VALUE = 18; 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 PropName 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 PropName forNumber(int value) { switch (value) { case 0: return ENCODING; case 1: return LANGUAGE; case 2: return APPROVED; case 3: return NOTE; case 4: return TRANSNOTE; case 5: return COORDINATES; case 6: return STATE_QUALIFIER; case 7: return STATE; case 8: return ITS_LQI; case 9: return ITS_PROV; case 10: return ITS_MTCONFIDENCE; case 11: return XLIFF_TOOL; case 12: return XLIFF_PHASE; case 13: return MAX_WIDTH; case 14: return MAX_HEIGHT; case 15: return SIZE_UNIT; case 16: return TMX_i; case 17: return TMX_hi; case 18: return TMX_x; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< PropName> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public PropName findValueByNumber(int number) { return PropName.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.Property.getDescriptor().getEnumTypes().get(0); } private static final PropName[] VALUES = values(); public static PropName 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 PropName(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:Property.PropName) } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** * string name = 1; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; 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(); name_ = s; return s; } } /** * string name = 1; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VALUE_FIELD_NUMBER = 2; private volatile java.lang.Object value_; /** * optional string value = 2; * @return Whether the value field is set. */ @java.lang.Override public boolean hasValue() { return ((bitField0_ & 0x00000001) != 0); } /** * optional string value = 2; * @return The value. */ @java.lang.Override public java.lang.String getValue() { java.lang.Object ref = value_; 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(); value_ = s; return s; } } /** * optional string value = 2; * @return The bytes for value. */ @java.lang.Override public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int READONLY_FIELD_NUMBER = 3; private boolean readOnly_; /** * optional bool readOnly = 3; * @return Whether the readOnly field is set. */ @java.lang.Override public boolean hasReadOnly() { return ((bitField0_ & 0x00000002) != 0); } /** * optional bool readOnly = 3; * @return The readOnly. */ @java.lang.Override public boolean getReadOnly() { return readOnly_; } 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(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(3, readOnly_); } 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(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, readOnly_); } 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.Property)) { return super.equals(obj); } net.sf.okapi.proto.textunitflat.Property other = (net.sf.okapi.proto.textunitflat.Property) obj; if (!getName() .equals(other.getName())) return false; if (hasValue() != other.hasValue()) return false; if (hasValue()) { if (!getValue() .equals(other.getValue())) return false; } if (hasReadOnly() != other.hasReadOnly()) return false; if (hasReadOnly()) { if (getReadOnly() != other.getReadOnly()) 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) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } if (hasReadOnly()) { hash = (37 * hash) + READONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getReadOnly()); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static net.sf.okapi.proto.textunitflat.Property parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static net.sf.okapi.proto.textunitflat.Property 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.Property parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static net.sf.okapi.proto.textunitflat.Property 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.Property parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static net.sf.okapi.proto.textunitflat.Property 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.Property parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static net.sf.okapi.proto.textunitflat.Property 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.Property parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static net.sf.okapi.proto.textunitflat.Property 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.Property 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.Property 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.Property 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 Property} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:Property) net.sf.okapi.proto.textunitflat.PropertyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Property_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Property_fieldAccessorTable .ensureFieldAccessorsInitialized( net.sf.okapi.proto.textunitflat.Property.class, net.sf.okapi.proto.textunitflat.Property.Builder.class); } // Construct using net.sf.okapi.proto.textunitflat.Property.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(); name_ = ""; value_ = ""; bitField0_ = (bitField0_ & ~0x00000001); readOnly_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Property_descriptor; } @java.lang.Override public net.sf.okapi.proto.textunitflat.Property getDefaultInstanceForType() { return net.sf.okapi.proto.textunitflat.Property.getDefaultInstance(); } @java.lang.Override public net.sf.okapi.proto.textunitflat.Property build() { net.sf.okapi.proto.textunitflat.Property result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public net.sf.okapi.proto.textunitflat.Property buildPartial() { net.sf.okapi.proto.textunitflat.Property result = new net.sf.okapi.proto.textunitflat.Property(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; if (((from_bitField0_ & 0x00000001) != 0)) { to_bitField0_ |= 0x00000001; } result.value_ = value_; if (((from_bitField0_ & 0x00000002) != 0)) { result.readOnly_ = readOnly_; to_bitField0_ |= 0x00000002; } 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.Property) { return mergeFrom((net.sf.okapi.proto.textunitflat.Property)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(net.sf.okapi.proto.textunitflat.Property other) { if (other == net.sf.okapi.proto.textunitflat.Property.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.hasValue()) { bitField0_ |= 0x00000001; value_ = other.value_; onChanged(); } if (other.hasReadOnly()) { setReadOnly(other.getReadOnly()); } 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.Property parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (net.sf.okapi.proto.textunitflat.Property) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * string name = 1; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * string name = 1; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string name = 1; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * string name = 1; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** * string name = 1; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.lang.Object value_ = ""; /** * optional string value = 2; * @return Whether the value field is set. */ public boolean hasValue() { return ((bitField0_ & 0x00000001) != 0); } /** * optional string value = 2; * @return The value. */ public java.lang.String getValue() { java.lang.Object ref = value_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); value_ = s; return s; } else { return (java.lang.String) ref; } } /** * optional string value = 2; * @return The bytes for value. */ public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * optional string value = 2; * @param value The value to set. * @return This builder for chaining. */ public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; value_ = value; onChanged(); return this; } /** * optional string value = 2; * @return This builder for chaining. */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000001); value_ = getDefaultInstance().getValue(); onChanged(); return this; } /** * optional string value = 2; * @param value The bytes for value to set. * @return This builder for chaining. */ public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); bitField0_ |= 0x00000001; value_ = value; onChanged(); return this; } private boolean readOnly_ ; /** * optional bool readOnly = 3; * @return Whether the readOnly field is set. */ @java.lang.Override public boolean hasReadOnly() { return ((bitField0_ & 0x00000002) != 0); } /** * optional bool readOnly = 3; * @return The readOnly. */ @java.lang.Override public boolean getReadOnly() { return readOnly_; } /** * optional bool readOnly = 3; * @param value The readOnly to set. * @return This builder for chaining. */ public Builder setReadOnly(boolean value) { bitField0_ |= 0x00000002; readOnly_ = value; onChanged(); return this; } /** * optional bool readOnly = 3; * @return This builder for chaining. */ public Builder clearReadOnly() { bitField0_ = (bitField0_ & ~0x00000002); readOnly_ = false; 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:Property) } // @@protoc_insertion_point(class_scope:Property) private static final net.sf.okapi.proto.textunitflat.Property DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new net.sf.okapi.proto.textunitflat.Property(); } public static net.sf.okapi.proto.textunitflat.Property getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Property parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Property(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.Property getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy