net.sf.okapi.proto.textunitflat.Code Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: TextUnitFlat.proto
package net.sf.okapi.proto.textunitflat;
/**
* Protobuf type {@code Code}
*/
public final class Code extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:Code)
CodeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Code.newBuilder() to construct.
private Code(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Code() {
tagType_ = 0;
originalId_ = "";
codeType_ = "";
data_ = "";
outerData_ = "";
mergedData_ = "";
displayText_ = "";
properties_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Code();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Code(
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 8: {
int rawValue = input.readEnum();
tagType_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
originalId_ = s;
break;
}
case 24: {
id_ = input.readInt32();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
codeType_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
data_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
outerData_ = s;
break;
}
case 56: {
flag_ = input.readInt32();
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
mergedData_ = s;
break;
}
case 72: {
position_ = input.readInt32();
break;
}
case 80: {
isolated_ = input.readBool();
break;
}
case 88: {
added_ = input.readBool();
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
displayText_ = s;
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
properties_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
properties_.add(
input.readMessage(net.sf.okapi.proto.textunitflat.Property.parser(), extensionRegistry));
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 {
if (((mutable_bitField0_ & 0x00000010) != 0)) {
properties_ = java.util.Collections.unmodifiableList(properties_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Code_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Code_fieldAccessorTable
.ensureFieldAccessorsInitialized(
net.sf.okapi.proto.textunitflat.Code.class, net.sf.okapi.proto.textunitflat.Code.Builder.class);
}
private int bitField0_;
public static final int TAGTYPE_FIELD_NUMBER = 1;
private int tagType_;
/**
* .TextFragment.TagType tagType = 1;
* @return The enum numeric value on the wire for tagType.
*/
@java.lang.Override public int getTagTypeValue() {
return tagType_;
}
/**
* .TextFragment.TagType tagType = 1;
* @return The tagType.
*/
@java.lang.Override public net.sf.okapi.proto.textunitflat.TextFragment.TagType getTagType() {
@SuppressWarnings("deprecation")
net.sf.okapi.proto.textunitflat.TextFragment.TagType result = net.sf.okapi.proto.textunitflat.TextFragment.TagType.valueOf(tagType_);
return result == null ? net.sf.okapi.proto.textunitflat.TextFragment.TagType.UNRECOGNIZED : result;
}
public static final int ORIGINALID_FIELD_NUMBER = 2;
private volatile java.lang.Object originalId_;
/**
* optional string originalId = 2;
* @return Whether the originalId field is set.
*/
@java.lang.Override
public boolean hasOriginalId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string originalId = 2;
* @return The originalId.
*/
@java.lang.Override
public java.lang.String getOriginalId() {
java.lang.Object ref = originalId_;
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();
originalId_ = s;
return s;
}
}
/**
* optional string originalId = 2;
* @return The bytes for originalId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getOriginalIdBytes() {
java.lang.Object ref = originalId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
originalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 3;
private int id_;
/**
* int32 id = 3;
* @return The id.
*/
@java.lang.Override
public int getId() {
return id_;
}
public static final int CODETYPE_FIELD_NUMBER = 4;
private volatile java.lang.Object codeType_;
/**
* string codeType = 4;
* @return The codeType.
*/
@java.lang.Override
public java.lang.String getCodeType() {
java.lang.Object ref = codeType_;
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();
codeType_ = s;
return s;
}
}
/**
* string codeType = 4;
* @return The bytes for codeType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCodeTypeBytes() {
java.lang.Object ref = codeType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
codeType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DATA_FIELD_NUMBER = 5;
private volatile java.lang.Object data_;
/**
* string data = 5;
* @return The data.
*/
@java.lang.Override
public java.lang.String getData() {
java.lang.Object ref = data_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
data_ = s;
return s;
}
}
/**
* string data = 5;
* @return The bytes for data.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDataBytes() {
java.lang.Object ref = data_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
data_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OUTERDATA_FIELD_NUMBER = 6;
private volatile java.lang.Object outerData_;
/**
* optional string outerData = 6;
* @return Whether the outerData field is set.
*/
@java.lang.Override
public boolean hasOuterData() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string outerData = 6;
* @return The outerData.
*/
@java.lang.Override
public java.lang.String getOuterData() {
java.lang.Object ref = outerData_;
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();
outerData_ = s;
return s;
}
}
/**
* optional string outerData = 6;
* @return The bytes for outerData.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getOuterDataBytes() {
java.lang.Object ref = outerData_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
outerData_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FLAG_FIELD_NUMBER = 7;
private int flag_;
/**
* int32 flag = 7;
* @return The flag.
*/
@java.lang.Override
public int getFlag() {
return flag_;
}
public static final int MERGEDDATA_FIELD_NUMBER = 8;
private volatile java.lang.Object mergedData_;
/**
* optional string mergedData = 8;
* @return Whether the mergedData field is set.
*/
@java.lang.Override
public boolean hasMergedData() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional string mergedData = 8;
* @return The mergedData.
*/
@java.lang.Override
public java.lang.String getMergedData() {
java.lang.Object ref = mergedData_;
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();
mergedData_ = s;
return s;
}
}
/**
* optional string mergedData = 8;
* @return The bytes for mergedData.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMergedDataBytes() {
java.lang.Object ref = mergedData_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mergedData_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int POSITION_FIELD_NUMBER = 9;
private int position_;
/**
* int32 position = 9;
* @return The position.
*/
@java.lang.Override
public int getPosition() {
return position_;
}
public static final int ISOLATED_FIELD_NUMBER = 10;
private boolean isolated_;
/**
* bool isolated = 10;
* @return The isolated.
*/
@java.lang.Override
public boolean getIsolated() {
return isolated_;
}
public static final int ADDED_FIELD_NUMBER = 11;
private boolean added_;
/**
* bool added = 11;
* @return The added.
*/
@java.lang.Override
public boolean getAdded() {
return added_;
}
public static final int DISPLAYTEXT_FIELD_NUMBER = 12;
private volatile java.lang.Object displayText_;
/**
* optional string displayText = 12;
* @return Whether the displayText field is set.
*/
@java.lang.Override
public boolean hasDisplayText() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional string displayText = 12;
* @return The displayText.
*/
@java.lang.Override
public java.lang.String getDisplayText() {
java.lang.Object ref = displayText_;
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();
displayText_ = s;
return s;
}
}
/**
* optional string displayText = 12;
* @return The bytes for displayText.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDisplayTextBytes() {
java.lang.Object ref = displayText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROPERTIES_FIELD_NUMBER = 13;
private java.util.List properties_;
/**
* repeated .Property properties = 13;
*/
@java.lang.Override
public java.util.List getPropertiesList() {
return properties_;
}
/**
* repeated .Property properties = 13;
*/
@java.lang.Override
public java.util.List extends net.sf.okapi.proto.textunitflat.PropertyOrBuilder>
getPropertiesOrBuilderList() {
return properties_;
}
/**
* repeated .Property properties = 13;
*/
@java.lang.Override
public int getPropertiesCount() {
return properties_.size();
}
/**
* repeated .Property properties = 13;
*/
@java.lang.Override
public net.sf.okapi.proto.textunitflat.Property getProperties(int index) {
return properties_.get(index);
}
/**
* repeated .Property properties = 13;
*/
@java.lang.Override
public net.sf.okapi.proto.textunitflat.PropertyOrBuilder getPropertiesOrBuilder(
int index) {
return properties_.get(index);
}
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 (tagType_ != net.sf.okapi.proto.textunitflat.TextFragment.TagType.OPENING.getNumber()) {
output.writeEnum(1, tagType_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, originalId_);
}
if (id_ != 0) {
output.writeInt32(3, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(codeType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, codeType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, data_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, outerData_);
}
if (flag_ != 0) {
output.writeInt32(7, flag_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, mergedData_);
}
if (position_ != 0) {
output.writeInt32(9, position_);
}
if (isolated_ != false) {
output.writeBool(10, isolated_);
}
if (added_ != false) {
output.writeBool(11, added_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, displayText_);
}
for (int i = 0; i < properties_.size(); i++) {
output.writeMessage(13, properties_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (tagType_ != net.sf.okapi.proto.textunitflat.TextFragment.TagType.OPENING.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, tagType_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, originalId_);
}
if (id_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(codeType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, codeType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, data_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, outerData_);
}
if (flag_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(7, flag_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, mergedData_);
}
if (position_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(9, position_);
}
if (isolated_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(10, isolated_);
}
if (added_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(11, added_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, displayText_);
}
for (int i = 0; i < properties_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, properties_.get(i));
}
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.Code)) {
return super.equals(obj);
}
net.sf.okapi.proto.textunitflat.Code other = (net.sf.okapi.proto.textunitflat.Code) obj;
if (tagType_ != other.tagType_) return false;
if (hasOriginalId() != other.hasOriginalId()) return false;
if (hasOriginalId()) {
if (!getOriginalId()
.equals(other.getOriginalId())) return false;
}
if (getId()
!= other.getId()) return false;
if (!getCodeType()
.equals(other.getCodeType())) return false;
if (!getData()
.equals(other.getData())) return false;
if (hasOuterData() != other.hasOuterData()) return false;
if (hasOuterData()) {
if (!getOuterData()
.equals(other.getOuterData())) return false;
}
if (getFlag()
!= other.getFlag()) return false;
if (hasMergedData() != other.hasMergedData()) return false;
if (hasMergedData()) {
if (!getMergedData()
.equals(other.getMergedData())) return false;
}
if (getPosition()
!= other.getPosition()) return false;
if (getIsolated()
!= other.getIsolated()) return false;
if (getAdded()
!= other.getAdded()) return false;
if (hasDisplayText() != other.hasDisplayText()) return false;
if (hasDisplayText()) {
if (!getDisplayText()
.equals(other.getDisplayText())) return false;
}
if (!getPropertiesList()
.equals(other.getPropertiesList())) 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) + TAGTYPE_FIELD_NUMBER;
hash = (53 * hash) + tagType_;
if (hasOriginalId()) {
hash = (37 * hash) + ORIGINALID_FIELD_NUMBER;
hash = (53 * hash) + getOriginalId().hashCode();
}
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId();
hash = (37 * hash) + CODETYPE_FIELD_NUMBER;
hash = (53 * hash) + getCodeType().hashCode();
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().hashCode();
if (hasOuterData()) {
hash = (37 * hash) + OUTERDATA_FIELD_NUMBER;
hash = (53 * hash) + getOuterData().hashCode();
}
hash = (37 * hash) + FLAG_FIELD_NUMBER;
hash = (53 * hash) + getFlag();
if (hasMergedData()) {
hash = (37 * hash) + MERGEDDATA_FIELD_NUMBER;
hash = (53 * hash) + getMergedData().hashCode();
}
hash = (37 * hash) + POSITION_FIELD_NUMBER;
hash = (53 * hash) + getPosition();
hash = (37 * hash) + ISOLATED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsolated());
hash = (37 * hash) + ADDED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAdded());
if (hasDisplayText()) {
hash = (37 * hash) + DISPLAYTEXT_FIELD_NUMBER;
hash = (53 * hash) + getDisplayText().hashCode();
}
if (getPropertiesCount() > 0) {
hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + getPropertiesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static net.sf.okapi.proto.textunitflat.Code parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static net.sf.okapi.proto.textunitflat.Code 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.Code parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static net.sf.okapi.proto.textunitflat.Code 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.Code parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static net.sf.okapi.proto.textunitflat.Code 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.Code parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static net.sf.okapi.proto.textunitflat.Code 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.Code parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static net.sf.okapi.proto.textunitflat.Code 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.Code 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.Code 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.Code 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 Code}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:Code)
net.sf.okapi.proto.textunitflat.CodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Code_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Code_fieldAccessorTable
.ensureFieldAccessorsInitialized(
net.sf.okapi.proto.textunitflat.Code.class, net.sf.okapi.proto.textunitflat.Code.Builder.class);
}
// Construct using net.sf.okapi.proto.textunitflat.Code.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPropertiesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
tagType_ = 0;
originalId_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0;
codeType_ = "";
data_ = "";
outerData_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
flag_ = 0;
mergedData_ = "";
bitField0_ = (bitField0_ & ~0x00000004);
position_ = 0;
isolated_ = false;
added_ = false;
displayText_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
if (propertiesBuilder_ == null) {
properties_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
propertiesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return net.sf.okapi.proto.textunitflat.OkapiTextUnitFlatProtoMapping.internal_static_Code_descriptor;
}
@java.lang.Override
public net.sf.okapi.proto.textunitflat.Code getDefaultInstanceForType() {
return net.sf.okapi.proto.textunitflat.Code.getDefaultInstance();
}
@java.lang.Override
public net.sf.okapi.proto.textunitflat.Code build() {
net.sf.okapi.proto.textunitflat.Code result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public net.sf.okapi.proto.textunitflat.Code buildPartial() {
net.sf.okapi.proto.textunitflat.Code result = new net.sf.okapi.proto.textunitflat.Code(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.tagType_ = tagType_;
if (((from_bitField0_ & 0x00000001) != 0)) {
to_bitField0_ |= 0x00000001;
}
result.originalId_ = originalId_;
result.id_ = id_;
result.codeType_ = codeType_;
result.data_ = data_;
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.outerData_ = outerData_;
result.flag_ = flag_;
if (((from_bitField0_ & 0x00000004) != 0)) {
to_bitField0_ |= 0x00000004;
}
result.mergedData_ = mergedData_;
result.position_ = position_;
result.isolated_ = isolated_;
result.added_ = added_;
if (((from_bitField0_ & 0x00000008) != 0)) {
to_bitField0_ |= 0x00000008;
}
result.displayText_ = displayText_;
if (propertiesBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
properties_ = java.util.Collections.unmodifiableList(properties_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.properties_ = properties_;
} else {
result.properties_ = propertiesBuilder_.build();
}
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.Code) {
return mergeFrom((net.sf.okapi.proto.textunitflat.Code)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(net.sf.okapi.proto.textunitflat.Code other) {
if (other == net.sf.okapi.proto.textunitflat.Code.getDefaultInstance()) return this;
if (other.tagType_ != 0) {
setTagTypeValue(other.getTagTypeValue());
}
if (other.hasOriginalId()) {
bitField0_ |= 0x00000001;
originalId_ = other.originalId_;
onChanged();
}
if (other.getId() != 0) {
setId(other.getId());
}
if (!other.getCodeType().isEmpty()) {
codeType_ = other.codeType_;
onChanged();
}
if (!other.getData().isEmpty()) {
data_ = other.data_;
onChanged();
}
if (other.hasOuterData()) {
bitField0_ |= 0x00000002;
outerData_ = other.outerData_;
onChanged();
}
if (other.getFlag() != 0) {
setFlag(other.getFlag());
}
if (other.hasMergedData()) {
bitField0_ |= 0x00000004;
mergedData_ = other.mergedData_;
onChanged();
}
if (other.getPosition() != 0) {
setPosition(other.getPosition());
}
if (other.getIsolated() != false) {
setIsolated(other.getIsolated());
}
if (other.getAdded() != false) {
setAdded(other.getAdded());
}
if (other.hasDisplayText()) {
bitField0_ |= 0x00000008;
displayText_ = other.displayText_;
onChanged();
}
if (propertiesBuilder_ == null) {
if (!other.properties_.isEmpty()) {
if (properties_.isEmpty()) {
properties_ = other.properties_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensurePropertiesIsMutable();
properties_.addAll(other.properties_);
}
onChanged();
}
} else {
if (!other.properties_.isEmpty()) {
if (propertiesBuilder_.isEmpty()) {
propertiesBuilder_.dispose();
propertiesBuilder_ = null;
properties_ = other.properties_;
bitField0_ = (bitField0_ & ~0x00000010);
propertiesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPropertiesFieldBuilder() : null;
} else {
propertiesBuilder_.addAllMessages(other.properties_);
}
}
}
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.Code parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (net.sf.okapi.proto.textunitflat.Code) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int tagType_ = 0;
/**
* .TextFragment.TagType tagType = 1;
* @return The enum numeric value on the wire for tagType.
*/
@java.lang.Override public int getTagTypeValue() {
return tagType_;
}
/**
* .TextFragment.TagType tagType = 1;
* @param value The enum numeric value on the wire for tagType to set.
* @return This builder for chaining.
*/
public Builder setTagTypeValue(int value) {
tagType_ = value;
onChanged();
return this;
}
/**
* .TextFragment.TagType tagType = 1;
* @return The tagType.
*/
@java.lang.Override
public net.sf.okapi.proto.textunitflat.TextFragment.TagType getTagType() {
@SuppressWarnings("deprecation")
net.sf.okapi.proto.textunitflat.TextFragment.TagType result = net.sf.okapi.proto.textunitflat.TextFragment.TagType.valueOf(tagType_);
return result == null ? net.sf.okapi.proto.textunitflat.TextFragment.TagType.UNRECOGNIZED : result;
}
/**
* .TextFragment.TagType tagType = 1;
* @param value The tagType to set.
* @return This builder for chaining.
*/
public Builder setTagType(net.sf.okapi.proto.textunitflat.TextFragment.TagType value) {
if (value == null) {
throw new NullPointerException();
}
tagType_ = value.getNumber();
onChanged();
return this;
}
/**
* .TextFragment.TagType tagType = 1;
* @return This builder for chaining.
*/
public Builder clearTagType() {
tagType_ = 0;
onChanged();
return this;
}
private java.lang.Object originalId_ = "";
/**
* optional string originalId = 2;
* @return Whether the originalId field is set.
*/
public boolean hasOriginalId() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string originalId = 2;
* @return The originalId.
*/
public java.lang.String getOriginalId() {
java.lang.Object ref = originalId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
originalId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string originalId = 2;
* @return The bytes for originalId.
*/
public com.google.protobuf.ByteString
getOriginalIdBytes() {
java.lang.Object ref = originalId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
originalId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string originalId = 2;
* @param value The originalId to set.
* @return This builder for chaining.
*/
public Builder setOriginalId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
originalId_ = value;
onChanged();
return this;
}
/**
* optional string originalId = 2;
* @return This builder for chaining.
*/
public Builder clearOriginalId() {
bitField0_ = (bitField0_ & ~0x00000001);
originalId_ = getDefaultInstance().getOriginalId();
onChanged();
return this;
}
/**
* optional string originalId = 2;
* @param value The bytes for originalId to set.
* @return This builder for chaining.
*/
public Builder setOriginalIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000001;
originalId_ = value;
onChanged();
return this;
}
private int id_ ;
/**
* int32 id = 3;
* @return The id.
*/
@java.lang.Override
public int getId() {
return id_;
}
/**
* int32 id = 3;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(int value) {
id_ = value;
onChanged();
return this;
}
/**
* int32 id = 3;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = 0;
onChanged();
return this;
}
private java.lang.Object codeType_ = "";
/**
* string codeType = 4;
* @return The codeType.
*/
public java.lang.String getCodeType() {
java.lang.Object ref = codeType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
codeType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string codeType = 4;
* @return The bytes for codeType.
*/
public com.google.protobuf.ByteString
getCodeTypeBytes() {
java.lang.Object ref = codeType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
codeType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string codeType = 4;
* @param value The codeType to set.
* @return This builder for chaining.
*/
public Builder setCodeType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
codeType_ = value;
onChanged();
return this;
}
/**
* string codeType = 4;
* @return This builder for chaining.
*/
public Builder clearCodeType() {
codeType_ = getDefaultInstance().getCodeType();
onChanged();
return this;
}
/**
* string codeType = 4;
* @param value The bytes for codeType to set.
* @return This builder for chaining.
*/
public Builder setCodeTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
codeType_ = value;
onChanged();
return this;
}
private java.lang.Object data_ = "";
/**
* string data = 5;
* @return The data.
*/
public java.lang.String getData() {
java.lang.Object ref = data_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
data_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string data = 5;
* @return The bytes for data.
*/
public com.google.protobuf.ByteString
getDataBytes() {
java.lang.Object ref = data_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
data_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string data = 5;
* @param value The data to set.
* @return This builder for chaining.
*/
public Builder setData(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
return this;
}
/**
* string data = 5;
* @return This builder for chaining.
*/
public Builder clearData() {
data_ = getDefaultInstance().getData();
onChanged();
return this;
}
/**
* string data = 5;
* @param value The bytes for data to set.
* @return This builder for chaining.
*/
public Builder setDataBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
data_ = value;
onChanged();
return this;
}
private java.lang.Object outerData_ = "";
/**
* optional string outerData = 6;
* @return Whether the outerData field is set.
*/
public boolean hasOuterData() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string outerData = 6;
* @return The outerData.
*/
public java.lang.String getOuterData() {
java.lang.Object ref = outerData_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
outerData_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string outerData = 6;
* @return The bytes for outerData.
*/
public com.google.protobuf.ByteString
getOuterDataBytes() {
java.lang.Object ref = outerData_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
outerData_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string outerData = 6;
* @param value The outerData to set.
* @return This builder for chaining.
*/
public Builder setOuterData(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
outerData_ = value;
onChanged();
return this;
}
/**
* optional string outerData = 6;
* @return This builder for chaining.
*/
public Builder clearOuterData() {
bitField0_ = (bitField0_ & ~0x00000002);
outerData_ = getDefaultInstance().getOuterData();
onChanged();
return this;
}
/**
* optional string outerData = 6;
* @param value The bytes for outerData to set.
* @return This builder for chaining.
*/
public Builder setOuterDataBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000002;
outerData_ = value;
onChanged();
return this;
}
private int flag_ ;
/**
* int32 flag = 7;
* @return The flag.
*/
@java.lang.Override
public int getFlag() {
return flag_;
}
/**
* int32 flag = 7;
* @param value The flag to set.
* @return This builder for chaining.
*/
public Builder setFlag(int value) {
flag_ = value;
onChanged();
return this;
}
/**
* int32 flag = 7;
* @return This builder for chaining.
*/
public Builder clearFlag() {
flag_ = 0;
onChanged();
return this;
}
private java.lang.Object mergedData_ = "";
/**
* optional string mergedData = 8;
* @return Whether the mergedData field is set.
*/
public boolean hasMergedData() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional string mergedData = 8;
* @return The mergedData.
*/
public java.lang.String getMergedData() {
java.lang.Object ref = mergedData_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mergedData_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string mergedData = 8;
* @return The bytes for mergedData.
*/
public com.google.protobuf.ByteString
getMergedDataBytes() {
java.lang.Object ref = mergedData_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mergedData_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string mergedData = 8;
* @param value The mergedData to set.
* @return This builder for chaining.
*/
public Builder setMergedData(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
mergedData_ = value;
onChanged();
return this;
}
/**
* optional string mergedData = 8;
* @return This builder for chaining.
*/
public Builder clearMergedData() {
bitField0_ = (bitField0_ & ~0x00000004);
mergedData_ = getDefaultInstance().getMergedData();
onChanged();
return this;
}
/**
* optional string mergedData = 8;
* @param value The bytes for mergedData to set.
* @return This builder for chaining.
*/
public Builder setMergedDataBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000004;
mergedData_ = value;
onChanged();
return this;
}
private int position_ ;
/**
* int32 position = 9;
* @return The position.
*/
@java.lang.Override
public int getPosition() {
return position_;
}
/**
* int32 position = 9;
* @param value The position to set.
* @return This builder for chaining.
*/
public Builder setPosition(int value) {
position_ = value;
onChanged();
return this;
}
/**
* int32 position = 9;
* @return This builder for chaining.
*/
public Builder clearPosition() {
position_ = 0;
onChanged();
return this;
}
private boolean isolated_ ;
/**
* bool isolated = 10;
* @return The isolated.
*/
@java.lang.Override
public boolean getIsolated() {
return isolated_;
}
/**
* bool isolated = 10;
* @param value The isolated to set.
* @return This builder for chaining.
*/
public Builder setIsolated(boolean value) {
isolated_ = value;
onChanged();
return this;
}
/**
* bool isolated = 10;
* @return This builder for chaining.
*/
public Builder clearIsolated() {
isolated_ = false;
onChanged();
return this;
}
private boolean added_ ;
/**
* bool added = 11;
* @return The added.
*/
@java.lang.Override
public boolean getAdded() {
return added_;
}
/**
* bool added = 11;
* @param value The added to set.
* @return This builder for chaining.
*/
public Builder setAdded(boolean value) {
added_ = value;
onChanged();
return this;
}
/**
* bool added = 11;
* @return This builder for chaining.
*/
public Builder clearAdded() {
added_ = false;
onChanged();
return this;
}
private java.lang.Object displayText_ = "";
/**
* optional string displayText = 12;
* @return Whether the displayText field is set.
*/
public boolean hasDisplayText() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional string displayText = 12;
* @return The displayText.
*/
public java.lang.String getDisplayText() {
java.lang.Object ref = displayText_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayText_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string displayText = 12;
* @return The bytes for displayText.
*/
public com.google.protobuf.ByteString
getDisplayTextBytes() {
java.lang.Object ref = displayText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string displayText = 12;
* @param value The displayText to set.
* @return This builder for chaining.
*/
public Builder setDisplayText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
displayText_ = value;
onChanged();
return this;
}
/**
* optional string displayText = 12;
* @return This builder for chaining.
*/
public Builder clearDisplayText() {
bitField0_ = (bitField0_ & ~0x00000008);
displayText_ = getDefaultInstance().getDisplayText();
onChanged();
return this;
}
/**
* optional string displayText = 12;
* @param value The bytes for displayText to set.
* @return This builder for chaining.
*/
public Builder setDisplayTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bitField0_ |= 0x00000008;
displayText_ = value;
onChanged();
return this;
}
private java.util.List properties_ =
java.util.Collections.emptyList();
private void ensurePropertiesIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
properties_ = new java.util.ArrayList(properties_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
net.sf.okapi.proto.textunitflat.Property, net.sf.okapi.proto.textunitflat.Property.Builder, net.sf.okapi.proto.textunitflat.PropertyOrBuilder> propertiesBuilder_;
/**
* repeated .Property properties = 13;
*/
public java.util.List getPropertiesList() {
if (propertiesBuilder_ == null) {
return java.util.Collections.unmodifiableList(properties_);
} else {
return propertiesBuilder_.getMessageList();
}
}
/**
* repeated .Property properties = 13;
*/
public int getPropertiesCount() {
if (propertiesBuilder_ == null) {
return properties_.size();
} else {
return propertiesBuilder_.getCount();
}
}
/**
* repeated .Property properties = 13;
*/
public net.sf.okapi.proto.textunitflat.Property getProperties(int index) {
if (propertiesBuilder_ == null) {
return properties_.get(index);
} else {
return propertiesBuilder_.getMessage(index);
}
}
/**
* repeated .Property properties = 13;
*/
public Builder setProperties(
int index, net.sf.okapi.proto.textunitflat.Property value) {
if (propertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePropertiesIsMutable();
properties_.set(index, value);
onChanged();
} else {
propertiesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public Builder setProperties(
int index, net.sf.okapi.proto.textunitflat.Property.Builder builderForValue) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.set(index, builderForValue.build());
onChanged();
} else {
propertiesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public Builder addProperties(net.sf.okapi.proto.textunitflat.Property value) {
if (propertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePropertiesIsMutable();
properties_.add(value);
onChanged();
} else {
propertiesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public Builder addProperties(
int index, net.sf.okapi.proto.textunitflat.Property value) {
if (propertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePropertiesIsMutable();
properties_.add(index, value);
onChanged();
} else {
propertiesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public Builder addProperties(
net.sf.okapi.proto.textunitflat.Property.Builder builderForValue) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.add(builderForValue.build());
onChanged();
} else {
propertiesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public Builder addProperties(
int index, net.sf.okapi.proto.textunitflat.Property.Builder builderForValue) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.add(index, builderForValue.build());
onChanged();
} else {
propertiesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public Builder addAllProperties(
java.lang.Iterable extends net.sf.okapi.proto.textunitflat.Property> values) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, properties_);
onChanged();
} else {
propertiesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public Builder clearProperties() {
if (propertiesBuilder_ == null) {
properties_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
propertiesBuilder_.clear();
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public Builder removeProperties(int index) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.remove(index);
onChanged();
} else {
propertiesBuilder_.remove(index);
}
return this;
}
/**
* repeated .Property properties = 13;
*/
public net.sf.okapi.proto.textunitflat.Property.Builder getPropertiesBuilder(
int index) {
return getPropertiesFieldBuilder().getBuilder(index);
}
/**
* repeated .Property properties = 13;
*/
public net.sf.okapi.proto.textunitflat.PropertyOrBuilder getPropertiesOrBuilder(
int index) {
if (propertiesBuilder_ == null) {
return properties_.get(index); } else {
return propertiesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .Property properties = 13;
*/
public java.util.List extends net.sf.okapi.proto.textunitflat.PropertyOrBuilder>
getPropertiesOrBuilderList() {
if (propertiesBuilder_ != null) {
return propertiesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(properties_);
}
}
/**
* repeated .Property properties = 13;
*/
public net.sf.okapi.proto.textunitflat.Property.Builder addPropertiesBuilder() {
return getPropertiesFieldBuilder().addBuilder(
net.sf.okapi.proto.textunitflat.Property.getDefaultInstance());
}
/**
* repeated .Property properties = 13;
*/
public net.sf.okapi.proto.textunitflat.Property.Builder addPropertiesBuilder(
int index) {
return getPropertiesFieldBuilder().addBuilder(
index, net.sf.okapi.proto.textunitflat.Property.getDefaultInstance());
}
/**
* repeated .Property properties = 13;
*/
public java.util.List
getPropertiesBuilderList() {
return getPropertiesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
net.sf.okapi.proto.textunitflat.Property, net.sf.okapi.proto.textunitflat.Property.Builder, net.sf.okapi.proto.textunitflat.PropertyOrBuilder>
getPropertiesFieldBuilder() {
if (propertiesBuilder_ == null) {
propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
net.sf.okapi.proto.textunitflat.Property, net.sf.okapi.proto.textunitflat.Property.Builder, net.sf.okapi.proto.textunitflat.PropertyOrBuilder>(
properties_,
((bitField0_ & 0x00000010) != 0),
getParentForChildren(),
isClean());
properties_ = null;
}
return propertiesBuilder_;
}
@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:Code)
}
// @@protoc_insertion_point(class_scope:Code)
private static final net.sf.okapi.proto.textunitflat.Code DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new net.sf.okapi.proto.textunitflat.Code();
}
public static net.sf.okapi.proto.textunitflat.Code getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Code parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Code(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.Code getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy