From 399f6c100092eff8eef6f99b7bfb8051af2d4f68 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 20 Jul 2015 00:22:54 +0200 Subject: SONAR-6703 load common rule parameters from batch report --- sonar-batch-protocol/pom.xml | 4 + .../sonar/batch/protocol/output/BatchReport.java | 19656 +++++++++---------- .../org/sonar/batch/protocol/ProtobufUtil.java | 69 +- .../batch/protocol/output/BatchReportReader.java | 69 +- .../batch/protocol/output/BatchReportWriter.java | 35 +- .../sonar/batch/protocol/output/FileStructure.java | 4 + .../src/main/protobuf/batch_report.proto | 44 +- .../org/sonar/batch/protocol/ProtobufUtilTest.java | 37 + .../protocol/output/BatchReportReaderTest.java | 71 +- .../protocol/output/BatchReportWriterTest.java | 43 +- 10 files changed, 9217 insertions(+), 10815 deletions(-) (limited to 'sonar-batch-protocol') diff --git a/sonar-batch-protocol/pom.xml b/sonar-batch-protocol/pom.xml index 9cba80bc7d9..4766df2a574 100644 --- a/sonar-batch-protocol/pom.xml +++ b/sonar-batch-protocol/pom.xml @@ -34,6 +34,10 @@ commons-io commons-io + + org.codehaus.sonar + sonar-core + diff --git a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java index 93549a0163f..f3ffae7e8fe 100644 --- a/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java +++ b/sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java @@ -69,49 +69,6 @@ public final class BatchReport { * optional int32 root_component_ref = 4; */ int getRootComponentRef(); - - /** - * repeated string active_rule_key = 5; - * - *
-     *Keys of the rules that were enabled in Quality profiles.
-     *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-     *"{repository}:{subKey}", for instance "java:NullDereference".
-     * 
- */ - com.google.protobuf.ProtocolStringList - getActiveRuleKeyList(); - /** - * repeated string active_rule_key = 5; - * - *
-     *Keys of the rules that were enabled in Quality profiles.
-     *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-     *"{repository}:{subKey}", for instance "java:NullDereference".
-     * 
- */ - int getActiveRuleKeyCount(); - /** - * repeated string active_rule_key = 5; - * - *
-     *Keys of the rules that were enabled in Quality profiles.
-     *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-     *"{repository}:{subKey}", for instance "java:NullDereference".
-     * 
- */ - java.lang.String getActiveRuleKey(int index); - /** - * repeated string active_rule_key = 5; - * - *
-     *Keys of the rules that were enabled in Quality profiles.
-     *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-     *"{repository}:{subKey}", for instance "java:NullDereference".
-     * 
- */ - com.google.protobuf.ByteString - getActiveRuleKeyBytes(int index); } /** * Protobuf type {@code Metadata} @@ -187,15 +144,6 @@ public final class BatchReport { rootComponentRef_ = input.readInt32(); break; } - case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - activeRuleKey_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - activeRuleKey_.add(bs); - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -204,9 +152,6 @@ public final class BatchReport { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - activeRuleKey_ = activeRuleKey_.getUnmodifiableView(); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -365,65 +310,11 @@ public final class BatchReport { return rootComponentRef_; } - public static final int ACTIVE_RULE_KEY_FIELD_NUMBER = 5; - private com.google.protobuf.LazyStringList activeRuleKey_; - /** - * repeated string active_rule_key = 5; - * - *
-     *Keys of the rules that were enabled in Quality profiles.
-     *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-     *"{repository}:{subKey}", for instance "java:NullDereference".
-     * 
- */ - public com.google.protobuf.ProtocolStringList - getActiveRuleKeyList() { - return activeRuleKey_; - } - /** - * repeated string active_rule_key = 5; - * - *
-     *Keys of the rules that were enabled in Quality profiles.
-     *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-     *"{repository}:{subKey}", for instance "java:NullDereference".
-     * 
- */ - public int getActiveRuleKeyCount() { - return activeRuleKey_.size(); - } - /** - * repeated string active_rule_key = 5; - * - *
-     *Keys of the rules that were enabled in Quality profiles.
-     *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-     *"{repository}:{subKey}", for instance "java:NullDereference".
-     * 
- */ - public java.lang.String getActiveRuleKey(int index) { - return activeRuleKey_.get(index); - } - /** - * repeated string active_rule_key = 5; - * - *
-     *Keys of the rules that were enabled in Quality profiles.
-     *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-     *"{repository}:{subKey}", for instance "java:NullDereference".
-     * 
- */ - public com.google.protobuf.ByteString - getActiveRuleKeyBytes(int index) { - return activeRuleKey_.getByteString(index); - } - private void initFields() { analysisDate_ = 0L; projectKey_ = ""; branch_ = ""; rootComponentRef_ = 0; - activeRuleKey_ = com.google.protobuf.LazyStringArrayList.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -450,9 +341,6 @@ public final class BatchReport { if (((bitField0_ & 0x00000008) == 0x00000008)) { output.writeInt32(4, rootComponentRef_); } - for (int i = 0; i < activeRuleKey_.size(); i++) { - output.writeBytes(5, activeRuleKey_.getByteString(i)); - } getUnknownFields().writeTo(output); } @@ -478,15 +366,6 @@ public final class BatchReport { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, rootComponentRef_); } - { - int dataSize = 0; - for (int i = 0; i < activeRuleKey_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(activeRuleKey_.getByteString(i)); - } - size += dataSize; - size += 1 * getActiveRuleKeyList().size(); - } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -612,8 +491,6 @@ public final class BatchReport { bitField0_ = (bitField0_ & ~0x00000004); rootComponentRef_ = 0; bitField0_ = (bitField0_ & ~0x00000008); - activeRuleKey_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -658,11 +535,6 @@ public final class BatchReport { to_bitField0_ |= 0x00000008; } result.rootComponentRef_ = rootComponentRef_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - activeRuleKey_ = activeRuleKey_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.activeRuleKey_ = activeRuleKey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -695,16 +567,6 @@ public final class BatchReport { if (other.hasRootComponentRef()) { setRootComponentRef(other.getRootComponentRef()); } - if (!other.activeRuleKey_.isEmpty()) { - if (activeRuleKey_.isEmpty()) { - activeRuleKey_ = other.activeRuleKey_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureActiveRuleKeyIsMutable(); - activeRuleKey_.addAll(other.activeRuleKey_); - } - onChanged(); - } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -972,153 +834,6 @@ public final class BatchReport { return this; } - private com.google.protobuf.LazyStringList activeRuleKey_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureActiveRuleKeyIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - activeRuleKey_ = new com.google.protobuf.LazyStringArrayList(activeRuleKey_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public com.google.protobuf.ProtocolStringList - getActiveRuleKeyList() { - return activeRuleKey_.getUnmodifiableView(); - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public int getActiveRuleKeyCount() { - return activeRuleKey_.size(); - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public java.lang.String getActiveRuleKey(int index) { - return activeRuleKey_.get(index); - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public com.google.protobuf.ByteString - getActiveRuleKeyBytes(int index) { - return activeRuleKey_.getByteString(index); - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public Builder setActiveRuleKey( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActiveRuleKeyIsMutable(); - activeRuleKey_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public Builder addActiveRuleKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActiveRuleKeyIsMutable(); - activeRuleKey_.add(value); - onChanged(); - return this; - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public Builder addAllActiveRuleKey( - java.lang.Iterable values) { - ensureActiveRuleKeyIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, activeRuleKey_); - onChanged(); - return this; - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public Builder clearActiveRuleKey() { - activeRuleKey_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - /** - * repeated string active_rule_key = 5; - * - *
-       *Keys of the rules that were enabled in Quality profiles.
-       *A key is a string composed of the repository and the subKey, specific to the repository. Format is
-       *"{repository}:{subKey}", for instance "java:NullDereference".
-       * 
- */ - public Builder addActiveRuleKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActiveRuleKeyIsMutable(); - activeRuleKey_.add(value); - onChanged(); - return this; - } - // @@protoc_insertion_point(builder_scope:Metadata) } @@ -1130,53 +845,91 @@ public final class BatchReport { // @@protoc_insertion_point(class_scope:Metadata) } - public interface ComponentLinkOrBuilder extends - // @@protoc_insertion_point(interface_extends:ComponentLink) + public interface ActiveRuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:ActiveRule) com.google.protobuf.MessageOrBuilder { /** - * optional .ComponentLinkType type = 1; + * optional string rule_repository = 1; */ - boolean hasType(); + boolean hasRuleRepository(); /** - * optional .ComponentLinkType type = 1; + * optional string rule_repository = 1; */ - org.sonar.batch.protocol.Constants.ComponentLinkType getType(); + java.lang.String getRuleRepository(); + /** + * optional string rule_repository = 1; + */ + com.google.protobuf.ByteString + getRuleRepositoryBytes(); /** - * optional string href = 2; + * optional string rule_key = 2; */ - boolean hasHref(); + boolean hasRuleKey(); /** - * optional string href = 2; + * optional string rule_key = 2; */ - java.lang.String getHref(); + java.lang.String getRuleKey(); /** - * optional string href = 2; + * optional string rule_key = 2; */ com.google.protobuf.ByteString - getHrefBytes(); + getRuleKeyBytes(); + + /** + * optional .Severity severity = 3; + */ + boolean hasSeverity(); + /** + * optional .Severity severity = 3; + */ + org.sonar.batch.protocol.Constants.Severity getSeverity(); + + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + java.util.List + getParamList(); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam getParam(int index); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + int getParamCount(); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + java.util.List + getParamOrBuilderList(); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParamOrBuilder getParamOrBuilder( + int index); } /** - * Protobuf type {@code ComponentLink} + * Protobuf type {@code ActiveRule} */ - public static final class ComponentLink extends + public static final class ActiveRule extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:ComponentLink) - ComponentLinkOrBuilder { - // Use ComponentLink.newBuilder() to construct. - private ComponentLink(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:ActiveRule) + ActiveRuleOrBuilder { + // Use ActiveRule.newBuilder() to construct. + private ActiveRule(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private ComponentLink(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private ActiveRule(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final ComponentLink defaultInstance; - public static ComponentLink getDefaultInstance() { + private static final ActiveRule defaultInstance; + public static ActiveRule getDefaultInstance() { return defaultInstance; } - public ComponentLink getDefaultInstanceForType() { + public ActiveRule getDefaultInstanceForType() { return defaultInstance; } @@ -1186,7 +939,7 @@ public final class BatchReport { getUnknownFields() { return this.unknownFields; } - private ComponentLink( + private ActiveRule( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1209,21 +962,35 @@ public final class BatchReport { } break; } - case 8: { + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + ruleRepository_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + ruleKey_ = bs; + break; + } + case 24: { int rawValue = input.readEnum(); - org.sonar.batch.protocol.Constants.ComponentLinkType value = org.sonar.batch.protocol.Constants.ComponentLinkType.valueOf(rawValue); + org.sonar.batch.protocol.Constants.Severity value = org.sonar.batch.protocol.Constants.Severity.valueOf(rawValue); if (value == null) { - unknownFields.mergeVarintField(1, rawValue); + unknownFields.mergeVarintField(3, rawValue); } else { - bitField0_ |= 0x00000001; - type_ = value; + bitField0_ |= 0x00000004; + severity_ = value; } break; } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - href_ = bs; + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + param_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + param_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.PARSER, extensionRegistry)); break; } } @@ -1234,890 +1001,737 @@ public final class BatchReport { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + param_ = java.util.Collections.unmodifiableList(param_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.ComponentLink.class, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder.class); + org.sonar.batch.protocol.output.BatchReport.ActiveRule.class, org.sonar.batch.protocol.output.BatchReport.ActiveRule.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ComponentLink parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ActiveRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ComponentLink(input, extensionRegistry); + return new ActiveRule(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } - private int bitField0_; - public static final int TYPE_FIELD_NUMBER = 1; - private org.sonar.batch.protocol.Constants.ComponentLinkType type_; - /** - * optional .ComponentLinkType type = 1; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .ComponentLinkType type = 1; - */ - public org.sonar.batch.protocol.Constants.ComponentLinkType getType() { - return type_; - } + public interface ActiveRuleParamOrBuilder extends + // @@protoc_insertion_point(interface_extends:ActiveRule.ActiveRuleParam) + com.google.protobuf.MessageOrBuilder { - public static final int HREF_FIELD_NUMBER = 2; - private java.lang.Object href_; - /** - * optional string href = 2; - */ - public boolean hasHref() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string href = 2; - */ - public java.lang.String getHref() { - java.lang.Object ref = href_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - href_ = s; - } - return s; - } + /** + * optional string key = 1; + */ + boolean hasKey(); + /** + * optional string key = 1; + */ + java.lang.String getKey(); + /** + * optional string key = 1; + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * optional string value = 2; + */ + boolean hasValue(); + /** + * optional string value = 2; + */ + java.lang.String getValue(); + /** + * optional string value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); } /** - * optional string href = 2; + * Protobuf type {@code ActiveRule.ActiveRuleParam} + * + *
+     * TODO replace by map
+     * 
*/ - public com.google.protobuf.ByteString - getHrefBytes() { - java.lang.Object ref = href_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - href_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class ActiveRuleParam extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:ActiveRule.ActiveRuleParam) + ActiveRuleParamOrBuilder { + // Use ActiveRuleParam.newBuilder() to construct. + private ActiveRuleParam(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); } - } - - private void initFields() { - type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; - href_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } + private ActiveRuleParam(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, type_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getHrefBytes()); + private static final ActiveRuleParam defaultInstance; + public static ActiveRuleParam getDefaultInstance() { + return defaultInstance; } - getUnknownFields().writeTo(output); - } - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; + public ActiveRuleParam getDefaultInstanceForType() { + return defaultInstance; + } - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, type_.getNumber()); + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getHrefBytes()); + private ActiveRuleParam( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + key_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + value_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.ComponentLink prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code ComponentLink} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:ComponentLink) - org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_ActiveRuleParam_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_ActiveRuleParam_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.ComponentLink.class, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder.class); + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.class, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder.class); } - // Construct using org.sonar.batch.protocol.output.BatchReport.ComponentLink.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ActiveRuleParam parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ActiveRuleParam(input, extensionRegistry); + } + }; - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; - bitField0_ = (bitField0_ & ~0x00000001); - href_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; - } - - public org.sonar.batch.protocol.output.BatchReport.ComponentLink getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance(); - } - - public org.sonar.batch.protocol.output.BatchReport.ComponentLink build() { - org.sonar.batch.protocol.output.BatchReport.ComponentLink result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.sonar.batch.protocol.output.BatchReport.ComponentLink buildPartial() { - org.sonar.batch.protocol.output.BatchReport.ComponentLink result = new org.sonar.batch.protocol.output.BatchReport.ComponentLink(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.href_ = href_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.ComponentLink) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.ComponentLink)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.ComponentLink other) { - if (other == org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()) return this; - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasHref()) { - bitField0_ |= 0x00000002; - href_ = other.href_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.ComponentLink parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.ComponentLink) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } private int bitField0_; - - private org.sonar.batch.protocol.Constants.ComponentLinkType type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; /** - * optional .ComponentLinkType type = 1; + * optional string key = 1; */ - public boolean hasType() { + public boolean hasKey() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .ComponentLinkType type = 1; - */ - public org.sonar.batch.protocol.Constants.ComponentLinkType getType() { - return type_; - } - /** - * optional .ComponentLinkType type = 1; + * optional string key = 1; */ - public Builder setType(org.sonar.batch.protocol.Constants.ComponentLinkType value) { - if (value == null) { - throw new NullPointerException(); + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; } - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); - return this; } /** - * optional .ComponentLinkType type = 1; + * optional string key = 1; */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; - onChanged(); - return this; + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - private java.lang.Object href_ = ""; + public static final int VALUE_FIELD_NUMBER = 2; + private java.lang.Object value_; /** - * optional string href = 2; + * optional string value = 2; */ - public boolean hasHref() { + public boolean hasValue() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string href = 2; + * optional string value = 2; */ - public java.lang.String getHref() { - java.lang.Object ref = href_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = + 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(); if (bs.isValidUtf8()) { - href_ = s; + value_ = s; } return s; - } else { - return (java.lang.String) ref; } } /** - * optional string href = 2; + * optional string value = 2; */ public com.google.protobuf.ByteString - getHrefBytes() { - java.lang.Object ref = href_; - if (ref instanceof String) { + 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); - href_ = b; + value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - /** - * optional string href = 2; - */ - public Builder setHref( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - href_ = value; - onChanged(); - return this; - } - /** - * optional string href = 2; - */ - public Builder clearHref() { - bitField0_ = (bitField0_ & ~0x00000002); - href_ = getDefaultInstance().getHref(); - onChanged(); - return this; + + private void initFields() { + key_ = ""; + value_ = ""; } - /** - * optional string href = 2; - */ - public Builder setHrefBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - href_ = value; - onChanged(); - return this; + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; } - // @@protoc_insertion_point(builder_scope:ComponentLink) - } + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getValueBytes()); + } + getUnknownFields().writeTo(output); + } - static { - defaultInstance = new ComponentLink(true); - defaultInstance.initFields(); - } + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; - // @@protoc_insertion_point(class_scope:ComponentLink) - } + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getValueBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } - public interface ComponentOrBuilder extends - // @@protoc_insertion_point(interface_extends:Component) - com.google.protobuf.MessageOrBuilder { + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } - /** - * optional int32 ref = 1; - */ - boolean hasRef(); - /** - * optional int32 ref = 1; - */ - int getRef(); + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } - /** - * optional string path = 2; - */ - boolean hasPath(); - /** - * optional string path = 2; - */ - java.lang.String getPath(); - /** - * optional string path = 2; - */ - com.google.protobuf.ByteString - getPathBytes(); + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } - /** - * optional string name = 3; - */ - boolean hasName(); - /** - * optional string name = 3; - */ - java.lang.String getName(); - /** - * optional string name = 3; - */ - com.google.protobuf.ByteString - getNameBytes(); + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code ActiveRule.ActiveRuleParam} + * + *
+       * TODO replace by map
+       * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:ActiveRule.ActiveRuleParam) + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParamOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_ActiveRuleParam_descriptor; + } - /** - * optional .ComponentType type = 4; - */ - boolean hasType(); - /** - * optional .ComponentType type = 4; - */ - org.sonar.batch.protocol.Constants.ComponentType getType(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_ActiveRuleParam_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.class, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder.class); + } - /** - * optional bool is_test = 5; - */ - boolean hasIsTest(); - /** - * optional bool is_test = 5; - */ - boolean getIsTest(); + // Construct using org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * optional string language = 6; - */ - boolean hasLanguage(); - /** - * optional string language = 6; - */ - java.lang.String getLanguage(); - /** - * optional string language = 6; - */ - com.google.protobuf.ByteString - getLanguageBytes(); + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - java.util.List getChildRefList(); - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - int getChildRefCount(); - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - int getChildRef(int index); + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } - /** - * repeated .ComponentLink link = 8; - */ - java.util.List - getLinkList(); - /** - * repeated .ComponentLink link = 8; - */ - org.sonar.batch.protocol.output.BatchReport.ComponentLink getLink(int index); - /** - * repeated .ComponentLink link = 8; - */ - int getLinkCount(); - /** - * repeated .ComponentLink link = 8; - */ - java.util.List - getLinkOrBuilderList(); - /** - * repeated .ComponentLink link = 8; - */ - org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinkOrBuilder( - int index); + public Builder clone() { + return create().mergeFrom(buildPartial()); + } - /** - * optional string version = 9; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
- */ - boolean hasVersion(); - /** - * optional string version = 9; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
- */ - java.lang.String getVersion(); - /** - * optional string version = 9; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
- */ - com.google.protobuf.ByteString - getVersionBytes(); + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_ActiveRuleParam_descriptor; + } - /** - * optional string key = 10; - * - *
-     * Only available on PROJECT and MODULE types
-     * TODO rename this property -> batchKey ? moduleKey ?
-     * 
- */ - boolean hasKey(); - /** - * optional string key = 10; - * - *
-     * Only available on PROJECT and MODULE types
-     * TODO rename this property -> batchKey ? moduleKey ?
-     * 
- */ - java.lang.String getKey(); - /** - * optional string key = 10; - * - *
-     * Only available on PROJECT and MODULE types
-     * TODO rename this property -> batchKey ? moduleKey ?
-     * 
- */ - com.google.protobuf.ByteString - getKeyBytes(); + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.getDefaultInstance(); + } - /** - * optional int32 lines = 11; - * - *
-     * Only available on FILE type
-     * 
- */ - boolean hasLines(); - /** - * optional int32 lines = 11; - * - *
-     * Only available on FILE type
-     * 
- */ - int getLines(); + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam build() { + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam buildPartial() { + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam result = new org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam other) { + if (other == org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasValue()) { + bitField0_ |= 0x00000002; + value_ = other.value_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * optional string key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string key = 1; + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + /** + * optional string key = 1; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * optional string key = 1; + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object value_ = ""; + /** + * optional string value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string value = 2; + */ + 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(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string value = 2; + */ + 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; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * optional string value = 2; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ActiveRule.ActiveRuleParam) + } + + static { + defaultInstance = new ActiveRuleParam(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:ActiveRule.ActiveRuleParam) + } + private int bitField0_; + public static final int RULE_REPOSITORY_FIELD_NUMBER = 1; + private java.lang.Object ruleRepository_; /** - * optional string description = 12; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
+ * optional string rule_repository = 1; */ - boolean hasDescription(); + public boolean hasRuleRepository() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } /** - * optional string description = 12; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
+ * optional string rule_repository = 1; */ - java.lang.String getDescription(); + public java.lang.String getRuleRepository() { + java.lang.Object ref = ruleRepository_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleRepository_ = s; + } + return s; + } + } /** - * optional string description = 12; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
+ * optional string rule_repository = 1; */ - com.google.protobuf.ByteString - getDescriptionBytes(); - } - /** - * Protobuf type {@code Component} - */ - public static final class Component extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Component) - ComponentOrBuilder { - // Use Component.newBuilder() to construct. - private Component(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); + public com.google.protobuf.ByteString + getRuleRepositoryBytes() { + java.lang.Object ref = ruleRepository_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ruleRepository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - private Component(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Component defaultInstance; - public static Component getDefaultInstance() { - return defaultInstance; - } - - public Component getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Component( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - ref_ = input.readInt32(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - path_ = bs; - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - name_ = bs; - break; - } - case 32: { - int rawValue = input.readEnum(); - org.sonar.batch.protocol.Constants.ComponentType value = org.sonar.batch.protocol.Constants.ComponentType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(4, rawValue); - } else { - bitField0_ |= 0x00000008; - type_ = value; - } - break; - } - case 40: { - bitField0_ |= 0x00000010; - isTest_ = input.readBool(); - break; - } - case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000020; - language_ = bs; - break; - } - case 56: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - childRef_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - childRef_.add(input.readInt32()); - break; - } - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) { - childRef_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - while (input.getBytesUntilLimit() > 0) { - childRef_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - link_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - link_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.ComponentLink.PARSER, extensionRegistry)); - break; - } - case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000040; - version_ = bs; - break; - } - case 82: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000080; - key_ = bs; - break; - } - case 88: { - bitField0_ |= 0x00000100; - lines_ = input.readInt32(); - break; - } - case 98: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000200; - description_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - childRef_ = java.util.Collections.unmodifiableList(childRef_); - } - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - link_ = java.util.Collections.unmodifiableList(link_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Component.class, org.sonar.batch.protocol.output.BatchReport.Component.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Component parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Component(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int REF_FIELD_NUMBER = 1; - private int ref_; - /** - * optional int32 ref = 1; - */ - public boolean hasRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 ref = 1; - */ - public int getRef() { - return ref_; - } - - public static final int PATH_FIELD_NUMBER = 2; - private java.lang.Object path_; - /** - * optional string path = 2; - */ - public boolean hasPath() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public static final int RULE_KEY_FIELD_NUMBER = 2; + private java.lang.Object ruleKey_; + /** + * optional string rule_key = 2; + */ + public boolean hasRuleKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string path = 2; + * optional string rule_key = 2; */ - public java.lang.String getPath() { - java.lang.Object ref = path_; + public java.lang.String getRuleKey() { + java.lang.Object ref = ruleKey_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -2125,1530 +1739,1327 @@ public final class BatchReport { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - path_ = s; + ruleKey_ = s; } return s; } } /** - * optional string path = 2; + * optional string rule_key = 2; */ public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; + getRuleKeyBytes() { + java.lang.Object ref = ruleKey_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - path_ = b; + ruleKey_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int NAME_FIELD_NUMBER = 3; - private java.lang.Object name_; + public static final int SEVERITY_FIELD_NUMBER = 3; + private org.sonar.batch.protocol.Constants.Severity severity_; /** - * optional string name = 3; + * optional .Severity severity = 3; */ - public boolean hasName() { + public boolean hasSeverity() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional string name = 3; + * optional .Severity severity = 3; */ - 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(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } + public org.sonar.batch.protocol.Constants.Severity getSeverity() { + return severity_; } + + public static final int PARAM_FIELD_NUMBER = 4; + private java.util.List param_; /** - * optional string name = 3; + * repeated .ActiveRule.ActiveRuleParam param = 4; */ - 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 java.util.List getParamList() { + return param_; } - - public static final int TYPE_FIELD_NUMBER = 4; - private org.sonar.batch.protocol.Constants.ComponentType type_; /** - * optional .ComponentType type = 4; + * repeated .ActiveRule.ActiveRuleParam param = 4; */ - public boolean hasType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + public java.util.List + getParamOrBuilderList() { + return param_; } /** - * optional .ComponentType type = 4; + * repeated .ActiveRule.ActiveRuleParam param = 4; */ - public org.sonar.batch.protocol.Constants.ComponentType getType() { - return type_; + public int getParamCount() { + return param_.size(); } - - public static final int IS_TEST_FIELD_NUMBER = 5; - private boolean isTest_; /** - * optional bool is_test = 5; + * repeated .ActiveRule.ActiveRuleParam param = 4; */ - public boolean hasIsTest() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam getParam(int index) { + return param_.get(index); } /** - * optional bool is_test = 5; + * repeated .ActiveRule.ActiveRuleParam param = 4; */ - public boolean getIsTest() { - return isTest_; + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParamOrBuilder getParamOrBuilder( + int index) { + return param_.get(index); } - public static final int LANGUAGE_FIELD_NUMBER = 6; - private java.lang.Object language_; - /** - * optional string language = 6; - */ - public boolean hasLanguage() { - return ((bitField0_ & 0x00000020) == 0x00000020); + private void initFields() { + ruleRepository_ = ""; + ruleKey_ = ""; + severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + param_ = java.util.Collections.emptyList(); } - /** - * optional string language = 6; - */ - public java.lang.String getLanguage() { - java.lang.Object ref = language_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - language_ = s; - } - return s; + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getRuleRepositoryBytes()); } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getRuleKeyBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, severity_.getNumber()); + } + for (int i = 0; i < param_.size(); i++) { + output.writeMessage(4, param_.get(i)); + } + getUnknownFields().writeTo(output); } - /** - * optional string language = 6; - */ - public com.google.protobuf.ByteString - getLanguageBytes() { - java.lang.Object ref = language_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - language_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getRuleRepositoryBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getRuleKeyBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, severity_.getNumber()); + } + for (int i = 0; i < param_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, param_.get(i)); } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; } - public static final int CHILD_REF_FIELD_NUMBER = 7; - private java.util.List childRef_; - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public java.util.List - getChildRefList() { - return childRef_; + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public int getChildRefCount() { - return childRef_.size(); + + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public int getChildRef(int index) { - return childRef_.get(index); + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - private int childRefMemoizedSerializedSize = -1; - - public static final int LINK_FIELD_NUMBER = 8; - private java.util.List link_; - /** - * repeated .ComponentLink link = 8; - */ - public java.util.List getLinkList() { - return link_; + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * repeated .ComponentLink link = 8; - */ - public java.util.List - getLinkOrBuilderList() { - return link_; + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * repeated .ComponentLink link = 8; - */ - public int getLinkCount() { - return link_.size(); + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); } - /** - * repeated .ComponentLink link = 8; - */ - public org.sonar.batch.protocol.output.BatchReport.ComponentLink getLink(int index) { - return link_.get(index); + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); } - /** - * repeated .ComponentLink link = 8; - */ - public org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinkOrBuilder( - int index) { - return link_.get(index); + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.ActiveRule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); } - public static final int VERSION_FIELD_NUMBER = 9; - private java.lang.Object version_; - /** - * optional string version = 9; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
- */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000040) == 0x00000040); + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.ActiveRule prototype) { + return newBuilder().mergeFrom(prototype); } - /** - * optional string version = 9; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
- */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - version_ = s; - } - return s; - } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** - * optional string version = 9; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
+ * Protobuf type {@code ActiveRule} */ - public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - version_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:ActiveRule) + org.sonar.batch.protocol.output.BatchReport.ActiveRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_descriptor; } - } - public static final int KEY_FIELD_NUMBER = 10; - private java.lang.Object key_; - /** - * optional string key = 10; - * - *
-     * Only available on PROJECT and MODULE types
-     * TODO rename this property -> batchKey ? moduleKey ?
-     * 
- */ - public boolean hasKey() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional string key = 10; - * - *
-     * Only available on PROJECT and MODULE types
-     * TODO rename this property -> batchKey ? moduleKey ?
-     * 
- */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } - return s; - } - } - /** - * optional string key = 10; - * - *
-     * Only available on PROJECT and MODULE types
-     * TODO rename this property -> batchKey ? moduleKey ?
-     * 
- */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.ActiveRule.class, org.sonar.batch.protocol.output.BatchReport.ActiveRule.Builder.class); } - } - public static final int LINES_FIELD_NUMBER = 11; - private int lines_; - /** - * optional int32 lines = 11; - * - *
-     * Only available on FILE type
-     * 
- */ - public boolean hasLines() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional int32 lines = 11; - * - *
-     * Only available on FILE type
-     * 
- */ - public int getLines() { - return lines_; - } + // Construct using org.sonar.batch.protocol.output.BatchReport.ActiveRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - public static final int DESCRIPTION_FIELD_NUMBER = 12; - private java.lang.Object description_; - /** - * optional string description = 12; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
- */ - public boolean hasDescription() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional string description = 12; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - description_ = s; + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getParamFieldBuilder(); } - return s; } - } - /** - * optional string description = 12; - * - *
-     * Only available on PROJECT and MODULE types
-     * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private static Builder create() { + return new Builder(); } - } - - private void initFields() { - ref_ = 0; - path_ = ""; - name_ = ""; - type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; - isTest_ = false; - language_ = ""; - childRef_ = java.util.Collections.emptyList(); - link_ = java.util.Collections.emptyList(); - version_ = ""; - key_ = ""; - lines_ = 0; - description_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, ref_); + public Builder clear() { + super.clear(); + ruleRepository_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + ruleKey_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + bitField0_ = (bitField0_ & ~0x00000004); + if (paramBuilder_ == null) { + param_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + paramBuilder_.clear(); + } + return this; } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getPathBytes()); + + public Builder clone() { + return create().mergeFrom(buildPartial()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getNameBytes()); + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ActiveRule_descriptor; } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeEnum(4, type_.getNumber()); + + public org.sonar.batch.protocol.output.BatchReport.ActiveRule getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.ActiveRule.getDefaultInstance(); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBool(5, isTest_); + + public org.sonar.batch.protocol.output.BatchReport.ActiveRule build() { + org.sonar.batch.protocol.output.BatchReport.ActiveRule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(6, getLanguageBytes()); + + public org.sonar.batch.protocol.output.BatchReport.ActiveRule buildPartial() { + org.sonar.batch.protocol.output.BatchReport.ActiveRule result = new org.sonar.batch.protocol.output.BatchReport.ActiveRule(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.ruleRepository_ = ruleRepository_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.ruleKey_ = ruleKey_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.severity_ = severity_; + if (paramBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + param_ = java.util.Collections.unmodifiableList(param_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.param_ = param_; + } else { + result.param_ = paramBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; } - if (getChildRefList().size() > 0) { - output.writeRawVarint32(58); - output.writeRawVarint32(childRefMemoizedSerializedSize); + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonar.batch.protocol.output.BatchReport.ActiveRule) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.ActiveRule)other); + } else { + super.mergeFrom(other); + return this; + } } - for (int i = 0; i < childRef_.size(); i++) { - output.writeInt32NoTag(childRef_.get(i)); + + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.ActiveRule other) { + if (other == org.sonar.batch.protocol.output.BatchReport.ActiveRule.getDefaultInstance()) return this; + if (other.hasRuleRepository()) { + bitField0_ |= 0x00000001; + ruleRepository_ = other.ruleRepository_; + onChanged(); + } + if (other.hasRuleKey()) { + bitField0_ |= 0x00000002; + ruleKey_ = other.ruleKey_; + onChanged(); + } + if (other.hasSeverity()) { + setSeverity(other.getSeverity()); + } + if (paramBuilder_ == null) { + if (!other.param_.isEmpty()) { + if (param_.isEmpty()) { + param_ = other.param_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureParamIsMutable(); + param_.addAll(other.param_); + } + onChanged(); + } + } else { + if (!other.param_.isEmpty()) { + if (paramBuilder_.isEmpty()) { + paramBuilder_.dispose(); + paramBuilder_ = null; + param_ = other.param_; + bitField0_ = (bitField0_ & ~0x00000008); + paramBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getParamFieldBuilder() : null; + } else { + paramBuilder_.addAllMessages(other.param_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; } - for (int i = 0; i < link_.size(); i++) { - output.writeMessage(8, link_.get(i)); + + public final boolean isInitialized() { + return true; } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(9, getVersionBytes()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(10, getKeyBytes()); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeInt32(11, lines_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeBytes(12, getDescriptionBytes()); - } - getUnknownFields().writeTo(output); - } - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.ActiveRule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.ActiveRule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, ref_); + private java.lang.Object ruleRepository_ = ""; + /** + * optional string rule_repository = 1; + */ + public boolean hasRuleRepository() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getPathBytes()); + /** + * optional string rule_repository = 1; + */ + public java.lang.String getRuleRepository() { + java.lang.Object ref = ruleRepository_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleRepository_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getNameBytes()); + /** + * optional string rule_repository = 1; + */ + public com.google.protobuf.ByteString + getRuleRepositoryBytes() { + java.lang.Object ref = ruleRepository_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ruleRepository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(4, type_.getNumber()); + /** + * optional string rule_repository = 1; + */ + public Builder setRuleRepository( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + ruleRepository_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(5, isTest_); + /** + * optional string rule_repository = 1; + */ + public Builder clearRuleRepository() { + bitField0_ = (bitField0_ & ~0x00000001); + ruleRepository_ = getDefaultInstance().getRuleRepository(); + onChanged(); + return this; } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getLanguageBytes()); + /** + * optional string rule_repository = 1; + */ + public Builder setRuleRepositoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + ruleRepository_ = value; + onChanged(); + return this; } - { - int dataSize = 0; - for (int i = 0; i < childRef_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(childRef_.get(i)); + + private java.lang.Object ruleKey_ = ""; + /** + * optional string rule_key = 2; + */ + public boolean hasRuleKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string rule_key = 2; + */ + public java.lang.String getRuleKey() { + java.lang.Object ref = ruleKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; } - size += dataSize; - if (!getChildRefList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); + } + /** + * optional string rule_key = 2; + */ + public com.google.protobuf.ByteString + getRuleKeyBytes() { + java.lang.Object ref = ruleKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ruleKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - childRefMemoizedSerializedSize = dataSize; } - for (int i = 0; i < link_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, link_.get(i)); + /** + * optional string rule_key = 2; + */ + public Builder setRuleKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + ruleKey_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(9, getVersionBytes()); + /** + * optional string rule_key = 2; + */ + public Builder clearRuleKey() { + bitField0_ = (bitField0_ & ~0x00000002); + ruleKey_ = getDefaultInstance().getRuleKey(); + onChanged(); + return this; } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, getKeyBytes()); + /** + * optional string rule_key = 2; + */ + public Builder setRuleKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + ruleKey_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(11, lines_); + + private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + /** + * optional .Severity severity = 3; + */ + public boolean hasSeverity() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(12, getDescriptionBytes()); + /** + * optional .Severity severity = 3; + */ + public org.sonar.batch.protocol.Constants.Severity getSeverity() { + return severity_; + } + /** + * optional .Severity severity = 3; + */ + public Builder setSeverity(org.sonar.batch.protocol.Constants.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + severity_ = value; + onChanged(); + return this; + } + /** + * optional .Severity severity = 3; + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000004); + severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + onChanged(); + return this; } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Component prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code Component} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Component) - org.sonar.batch.protocol.output.BatchReport.ComponentOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Component.class, org.sonar.batch.protocol.output.BatchReport.Component.Builder.class); + private java.util.List param_ = + java.util.Collections.emptyList(); + private void ensureParamIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + param_ = new java.util.ArrayList(param_); + bitField0_ |= 0x00000008; + } } - // Construct using org.sonar.batch.protocol.output.BatchReport.Component.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParamOrBuilder> paramBuilder_; - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public java.util.List getParamList() { + if (paramBuilder_ == null) { + return java.util.Collections.unmodifiableList(param_); + } else { + return paramBuilder_.getMessageList(); + } } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getLinkFieldBuilder(); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public int getParamCount() { + if (paramBuilder_ == null) { + return param_.size(); + } else { + return paramBuilder_.getCount(); } } - private static Builder create() { - return new Builder(); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam getParam(int index) { + if (paramBuilder_ == null) { + return param_.get(index); + } else { + return paramBuilder_.getMessage(index); + } } - - public Builder clear() { - super.clear(); - ref_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - path_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; - bitField0_ = (bitField0_ & ~0x00000008); - isTest_ = false; - bitField0_ = (bitField0_ & ~0x00000010); - language_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); - childRef_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - if (linkBuilder_ == null) { - link_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder setParam( + int index, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam value) { + if (paramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.set(index, value); + onChanged(); } else { - linkBuilder_.clear(); + paramBuilder_.setMessage(index, value); } - version_ = ""; - bitField0_ = (bitField0_ & ~0x00000100); - key_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); - lines_ = 0; - bitField0_ = (bitField0_ & ~0x00000400); - description_ = ""; - bitField0_ = (bitField0_ & ~0x00000800); return this; } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder setParam( + int index, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder builderForValue) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + param_.set(index, builderForValue.build()); + onChanged(); + } else { + paramBuilder_.setMessage(index, builderForValue.build()); + } + return this; } - - public org.sonar.batch.protocol.output.BatchReport.Component getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Component.getDefaultInstance(); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder addParam(org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam value) { + if (paramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.add(value); + onChanged(); + } else { + paramBuilder_.addMessage(value); + } + return this; } - - public org.sonar.batch.protocol.output.BatchReport.Component build() { - org.sonar.batch.protocol.output.BatchReport.Component result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder addParam( + int index, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam value) { + if (paramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParamIsMutable(); + param_.add(index, value); + onChanged(); + } else { + paramBuilder_.addMessage(index, value); } - return result; + return this; } - - public org.sonar.batch.protocol.output.BatchReport.Component buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Component result = new org.sonar.batch.protocol.output.BatchReport.Component(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder addParam( + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder builderForValue) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + param_.add(builderForValue.build()); + onChanged(); + } else { + paramBuilder_.addMessage(builderForValue.build()); } - result.ref_ = ref_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + return this; + } + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder addParam( + int index, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder builderForValue) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + param_.add(index, builderForValue.build()); + onChanged(); + } else { + paramBuilder_.addMessage(index, builderForValue.build()); } - result.path_ = path_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + return this; + } + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder addAllParam( + java.lang.Iterable values) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, param_); + onChanged(); + } else { + paramBuilder_.addAllMessages(values); } - result.name_ = name_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; + return this; + } + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder clearParam() { + if (paramBuilder_ == null) { + param_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + paramBuilder_.clear(); } - result.type_ = type_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; + return this; + } + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public Builder removeParam(int index) { + if (paramBuilder_ == null) { + ensureParamIsMutable(); + param_.remove(index); + onChanged(); + } else { + paramBuilder_.remove(index); } - result.isTest_ = isTest_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; + return this; + } + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder getParamBuilder( + int index) { + return getParamFieldBuilder().getBuilder(index); + } + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParamOrBuilder getParamOrBuilder( + int index) { + if (paramBuilder_ == null) { + return param_.get(index); } else { + return paramBuilder_.getMessageOrBuilder(index); } - result.language_ = language_; - if (((bitField0_ & 0x00000040) == 0x00000040)) { - childRef_ = java.util.Collections.unmodifiableList(childRef_); - bitField0_ = (bitField0_ & ~0x00000040); + } + /** + * repeated .ActiveRule.ActiveRuleParam param = 4; + */ + public java.util.List + getParamOrBuilderList() { + if (paramBuilder_ != null) { + return paramBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(param_); } - result.childRef_ = childRef_; - if (linkBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { - link_ = java.util.Collections.unmodifiableList(link_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.link_ = link_; - } else { - result.link_ = linkBuilder_.build(); - } - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000040; - } - result.version_ = version_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000080; - } - result.key_ = key_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000100; - } - result.lines_ = lines_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000200; - } - result.description_ = description_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Component) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Component)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Component other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Component.getDefaultInstance()) return this; - if (other.hasRef()) { - setRef(other.getRef()); - } - if (other.hasPath()) { - bitField0_ |= 0x00000002; - path_ = other.path_; - onChanged(); - } - if (other.hasName()) { - bitField0_ |= 0x00000004; - name_ = other.name_; - onChanged(); - } - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasIsTest()) { - setIsTest(other.getIsTest()); - } - if (other.hasLanguage()) { - bitField0_ |= 0x00000020; - language_ = other.language_; - onChanged(); - } - if (!other.childRef_.isEmpty()) { - if (childRef_.isEmpty()) { - childRef_ = other.childRef_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureChildRefIsMutable(); - childRef_.addAll(other.childRef_); - } - onChanged(); - } - if (linkBuilder_ == null) { - if (!other.link_.isEmpty()) { - if (link_.isEmpty()) { - link_ = other.link_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureLinkIsMutable(); - link_.addAll(other.link_); - } - onChanged(); - } - } else { - if (!other.link_.isEmpty()) { - if (linkBuilder_.isEmpty()) { - linkBuilder_.dispose(); - linkBuilder_ = null; - link_ = other.link_; - bitField0_ = (bitField0_ & ~0x00000080); - linkBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLinkFieldBuilder() : null; - } else { - linkBuilder_.addAllMessages(other.link_); - } - } - } - if (other.hasVersion()) { - bitField0_ |= 0x00000100; - version_ = other.version_; - onChanged(); - } - if (other.hasKey()) { - bitField0_ |= 0x00000200; - key_ = other.key_; - onChanged(); - } - if (other.hasLines()) { - setLines(other.getLines()); - } - if (other.hasDescription()) { - bitField0_ |= 0x00000800; - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Component parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Component) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int ref_ ; - /** - * optional int32 ref = 1; - */ - public boolean hasRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 ref = 1; - */ - public int getRef() { - return ref_; - } - /** - * optional int32 ref = 1; - */ - public Builder setRef(int value) { - bitField0_ |= 0x00000001; - ref_ = value; - onChanged(); - return this; } /** - * optional int32 ref = 1; + * repeated .ActiveRule.ActiveRuleParam param = 4; */ - public Builder clearRef() { - bitField0_ = (bitField0_ & ~0x00000001); - ref_ = 0; - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder addParamBuilder() { + return getParamFieldBuilder().addBuilder( + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.getDefaultInstance()); } - - private java.lang.Object path_ = ""; /** - * optional string path = 2; + * repeated .ActiveRule.ActiveRuleParam param = 4; */ - public boolean hasPath() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder addParamBuilder( + int index) { + return getParamFieldBuilder().addBuilder( + index, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.getDefaultInstance()); } /** - * optional string path = 2; + * repeated .ActiveRule.ActiveRuleParam param = 4; */ - public java.lang.String getPath() { - java.lang.Object ref = path_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - path_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } + public java.util.List + getParamBuilderList() { + return getParamFieldBuilder().getBuilderList(); } - /** - * optional string path = 2; - */ - public com.google.protobuf.ByteString - getPathBytes() { - java.lang.Object ref = path_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - path_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParamOrBuilder> + getParamFieldBuilder() { + if (paramBuilder_ == null) { + paramBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParam.Builder, org.sonar.batch.protocol.output.BatchReport.ActiveRule.ActiveRuleParamOrBuilder>( + param_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + param_ = null; } + return paramBuilder_; } - /** - * optional string path = 2; - */ - public Builder setPath( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - path_ = value; - onChanged(); - return this; - } - /** - * optional string path = 2; - */ - public Builder clearPath() { - bitField0_ = (bitField0_ & ~0x00000002); - path_ = getDefaultInstance().getPath(); - onChanged(); - return this; - } - /** - * optional string path = 2; - */ - public Builder setPathBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + + // @@protoc_insertion_point(builder_scope:ActiveRule) + } + + static { + defaultInstance = new ActiveRule(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:ActiveRule) } - bitField0_ |= 0x00000002; - path_ = value; - onChanged(); - return this; - } - private java.lang.Object name_ = ""; - /** - * optional string name = 3; - */ - public boolean hasName() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string name = 3; - */ - 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(); - if (bs.isValidUtf8()) { - name_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string name = 3; - */ - 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; - } - } - /** - * optional string name = 3; - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - name_ = value; - onChanged(); - return this; - } - /** - * optional string name = 3; - */ - public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000004); - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * optional string name = 3; - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public interface ComponentLinkOrBuilder extends + // @@protoc_insertion_point(interface_extends:ComponentLink) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .ComponentLinkType type = 1; + */ + boolean hasType(); + /** + * optional .ComponentLinkType type = 1; + */ + org.sonar.batch.protocol.Constants.ComponentLinkType getType(); + + /** + * optional string href = 2; + */ + boolean hasHref(); + /** + * optional string href = 2; + */ + java.lang.String getHref(); + /** + * optional string href = 2; + */ + com.google.protobuf.ByteString + getHrefBytes(); } - bitField0_ |= 0x00000004; - name_ = value; - onChanged(); - return this; - } + /** + * Protobuf type {@code ComponentLink} + */ + public static final class ComponentLink extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:ComponentLink) + ComponentLinkOrBuilder { + // Use ComponentLink.newBuilder() to construct. + private ComponentLink(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ComponentLink(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private org.sonar.batch.protocol.Constants.ComponentType type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; - /** - * optional .ComponentType type = 4; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional .ComponentType type = 4; - */ - public org.sonar.batch.protocol.Constants.ComponentType getType() { - return type_; - } - /** - * optional .ComponentType type = 4; - */ - public Builder setType(org.sonar.batch.protocol.Constants.ComponentType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - type_ = value; - onChanged(); - return this; - } - /** - * optional .ComponentType type = 4; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000008); - type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; - onChanged(); - return this; - } + private static final ComponentLink defaultInstance; + public static ComponentLink getDefaultInstance() { + return defaultInstance; + } - private boolean isTest_ ; - /** - * optional bool is_test = 5; - */ - public boolean hasIsTest() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional bool is_test = 5; - */ - public boolean getIsTest() { - return isTest_; - } - /** - * optional bool is_test = 5; - */ - public Builder setIsTest(boolean value) { - bitField0_ |= 0x00000010; - isTest_ = value; - onChanged(); - return this; - } - /** - * optional bool is_test = 5; - */ - public Builder clearIsTest() { - bitField0_ = (bitField0_ & ~0x00000010); - isTest_ = false; - onChanged(); - return this; - } + public ComponentLink getDefaultInstanceForType() { + return defaultInstance; + } - private java.lang.Object language_ = ""; - /** - * optional string language = 6; - */ - public boolean hasLanguage() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional string language = 6; - */ - public java.lang.String getLanguage() { - java.lang.Object ref = language_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - language_ = s; + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ComponentLink( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + org.sonar.batch.protocol.Constants.ComponentLinkType value = org.sonar.batch.protocol.Constants.ComponentLinkType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = value; + } + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + href_ = bs; + break; + } } - return s; - } else { - return (java.lang.String) ref; } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); } - /** - * optional string language = 6; - */ - public com.google.protobuf.ByteString - getLanguageBytes() { - java.lang.Object ref = language_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - language_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string language = 6; - */ - public Builder setLanguage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - language_ = value; - onChanged(); - return this; - } - /** - * optional string language = 6; - */ - public Builder clearLanguage() { - bitField0_ = (bitField0_ & ~0x00000020); - language_ = getDefaultInstance().getLanguage(); - onChanged(); - return this; - } - /** - * optional string language = 6; - */ - public Builder setLanguageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - language_ = value; - onChanged(); - return this; - } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; + } - private java.util.List childRef_ = java.util.Collections.emptyList(); - private void ensureChildRefIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - childRef_ = new java.util.ArrayList(childRef_); - bitField0_ |= 0x00000040; - } - } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public java.util.List - getChildRefList() { - return java.util.Collections.unmodifiableList(childRef_); - } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public int getChildRefCount() { - return childRef_.size(); - } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public int getChildRef(int index) { - return childRef_.get(index); - } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public Builder setChildRef( - int index, int value) { - ensureChildRefIsMutable(); - childRef_.set(index, value); - onChanged(); - return this; - } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public Builder addChildRef(int value) { - ensureChildRefIsMutable(); - childRef_.add(value); - onChanged(); - return this; + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.ComponentLink.class, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ComponentLink parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ComponentLink(input, extensionRegistry); } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public Builder addAllChildRef( - java.lang.Iterable values) { - ensureChildRefIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, childRef_); - onChanged(); - return this; + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private org.sonar.batch.protocol.Constants.ComponentLinkType type_; + /** + * optional .ComponentLinkType type = 1; + */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .ComponentLinkType type = 1; + */ + public org.sonar.batch.protocol.Constants.ComponentLinkType getType() { + return type_; + } + + public static final int HREF_FIELD_NUMBER = 2; + private java.lang.Object href_; + /** + * optional string href = 2; + */ + public boolean hasHref() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string href = 2; + */ + public java.lang.String getHref() { + java.lang.Object ref = href_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + href_ = s; + } + return s; } - /** - * repeated int32 child_ref = 7 [packed = true]; - */ - public Builder clearChildRef() { - childRef_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; + } + /** + * optional string href = 2; + */ + public com.google.protobuf.ByteString + getHrefBytes() { + java.lang.Object ref = href_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + href_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - private java.util.List link_ = - java.util.Collections.emptyList(); - private void ensureLinkIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - link_ = new java.util.ArrayList(link_); - bitField0_ |= 0x00000080; - } + private void initFields() { + type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + href_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_.getNumber()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getHrefBytes()); } + getUnknownFields().writeTo(output); + } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.ComponentLink, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder, org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder> linkBuilder_; + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; - /** - * repeated .ComponentLink link = 8; - */ - public java.util.List getLinkList() { - if (linkBuilder_ == null) { - return java.util.Collections.unmodifiableList(link_); - } else { - return linkBuilder_.getMessageList(); - } + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_.getNumber()); } - /** - * repeated .ComponentLink link = 8; - */ - public int getLinkCount() { - if (linkBuilder_ == null) { - return link_.size(); - } else { - return linkBuilder_.getCount(); - } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getHrefBytes()); } - /** - * repeated .ComponentLink link = 8; - */ - public org.sonar.batch.protocol.output.BatchReport.ComponentLink getLink(int index) { - if (linkBuilder_ == null) { - return link_.get(index); - } else { - return linkBuilder_.getMessage(index); - } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.ComponentLink parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.ComponentLink prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code ComponentLink} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:ComponentLink) + org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; } - /** - * repeated .ComponentLink link = 8; - */ - public Builder setLink( - int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { - if (linkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIsMutable(); - link_.set(index, value); - onChanged(); - } else { - linkBuilder_.setMessage(index, value); + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.ComponentLink.class, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder.class); + } + + // Construct using org.sonar.batch.protocol.output.BatchReport.ComponentLink.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + bitField0_ = (bitField0_ & ~0x00000001); + href_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * repeated .ComponentLink link = 8; - */ - public Builder setLink( - int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { - if (linkBuilder_ == null) { - ensureLinkIsMutable(); - link_.set(index, builderForValue.build()); - onChanged(); + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor; + } + + public org.sonar.batch.protocol.output.BatchReport.ComponentLink getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance(); + } + + public org.sonar.batch.protocol.output.BatchReport.ComponentLink build() { + org.sonar.batch.protocol.output.BatchReport.ComponentLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonar.batch.protocol.output.BatchReport.ComponentLink buildPartial() { + org.sonar.batch.protocol.output.BatchReport.ComponentLink result = new org.sonar.batch.protocol.output.BatchReport.ComponentLink(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.href_ = href_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonar.batch.protocol.output.BatchReport.ComponentLink) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.ComponentLink)other); } else { - linkBuilder_.setMessage(index, builderForValue.build()); + super.mergeFrom(other); + return this; } - return this; } - /** - * repeated .ComponentLink link = 8; - */ - public Builder addLink(org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { - if (linkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLinkIsMutable(); - link_.add(value); + + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.ComponentLink other) { + if (other == org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasHref()) { + bitField0_ |= 0x00000002; + href_ = other.href_; onChanged(); - } else { - linkBuilder_.addMessage(value); } + this.mergeUnknownFields(other.getUnknownFields()); return this; } - /** - * repeated .ComponentLink link = 8; - */ - public Builder addLink( - int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { - if (linkBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.ComponentLink parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.ComponentLink) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); } - ensureLinkIsMutable(); - link_.add(index, value); - onChanged(); - } else { - linkBuilder_.addMessage(index, value); } return this; } + private int bitField0_; + + private org.sonar.batch.protocol.Constants.ComponentLinkType type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; /** - * repeated .ComponentLink link = 8; + * optional .ComponentLinkType type = 1; */ - public Builder addLink( - org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { - if (linkBuilder_ == null) { - ensureLinkIsMutable(); - link_.add(builderForValue.build()); - onChanged(); - } else { - linkBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .ComponentLink link = 8; - */ - public Builder addLink( - int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { - if (linkBuilder_ == null) { - ensureLinkIsMutable(); - link_.add(index, builderForValue.build()); - onChanged(); - } else { - linkBuilder_.addMessage(index, builderForValue.build()); - } - return this; + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * repeated .ComponentLink link = 8; + * optional .ComponentLinkType type = 1; */ - public Builder addAllLink( - java.lang.Iterable values) { - if (linkBuilder_ == null) { - ensureLinkIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, link_); - onChanged(); - } else { - linkBuilder_.addAllMessages(values); - } - return this; + public org.sonar.batch.protocol.Constants.ComponentLinkType getType() { + return type_; } /** - * repeated .ComponentLink link = 8; + * optional .ComponentLinkType type = 1; */ - public Builder clearLink() { - if (linkBuilder_ == null) { - link_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - linkBuilder_.clear(); + public Builder setType(org.sonar.batch.protocol.Constants.ComponentLinkType value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000001; + type_ = value; + onChanged(); return this; } /** - * repeated .ComponentLink link = 8; + * optional .ComponentLinkType type = 1; */ - public Builder removeLink(int index) { - if (linkBuilder_ == null) { - ensureLinkIsMutable(); - link_.remove(index); - onChanged(); - } else { - linkBuilder_.remove(index); - } + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME; + onChanged(); return this; } - /** - * repeated .ComponentLink link = 8; - */ - public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder getLinkBuilder( - int index) { - return getLinkFieldBuilder().getBuilder(index); - } - /** - * repeated .ComponentLink link = 8; - */ - public org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinkOrBuilder( - int index) { - if (linkBuilder_ == null) { - return link_.get(index); } else { - return linkBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .ComponentLink link = 8; - */ - public java.util.List - getLinkOrBuilderList() { - if (linkBuilder_ != null) { - return linkBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(link_); - } - } - /** - * repeated .ComponentLink link = 8; - */ - public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder addLinkBuilder() { - return getLinkFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()); - } - /** - * repeated .ComponentLink link = 8; - */ - public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder addLinkBuilder( - int index) { - return getLinkFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()); - } - /** - * repeated .ComponentLink link = 8; - */ - public java.util.List - getLinkBuilderList() { - return getLinkFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.ComponentLink, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder, org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder> - getLinkFieldBuilder() { - if (linkBuilder_ == null) { - linkBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.ComponentLink, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder, org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder>( - link_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); - link_ = null; - } - return linkBuilder_; - } - private java.lang.Object version_ = ""; + private java.lang.Object href_ = ""; /** - * optional string version = 9; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
+ * optional string href = 2; */ - public boolean hasVersion() { - return ((bitField0_ & 0x00000100) == 0x00000100); + public boolean hasHref() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string version = 9; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
+ * optional string href = 2; */ - public java.lang.String getVersion() { - java.lang.Object ref = version_; + public java.lang.String getHref() { + java.lang.Object ref = href_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - version_ = s; + href_ = s; } return s; } else { @@ -3656,523 +3067,296 @@ public final class BatchReport { } } /** - * optional string version = 9; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
+ * optional string href = 2; */ public com.google.protobuf.ByteString - getVersionBytes() { - java.lang.Object ref = version_; + getHrefBytes() { + java.lang.Object ref = href_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - version_ = b; + href_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string version = 9; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
+ * optional string href = 2; */ - public Builder setVersion( + public Builder setHref( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000100; - version_ = value; + bitField0_ |= 0x00000002; + href_ = value; onChanged(); return this; } /** - * optional string version = 9; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
+ * optional string href = 2; */ - public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000100); - version_ = getDefaultInstance().getVersion(); + public Builder clearHref() { + bitField0_ = (bitField0_ & ~0x00000002); + href_ = getDefaultInstance().getHref(); onChanged(); return this; } /** - * optional string version = 9; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
+ * optional string href = 2; */ - public Builder setVersionBytes( + public Builder setHrefBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000100; - version_ = value; + bitField0_ |= 0x00000002; + href_ = value; onChanged(); return this; } - private java.lang.Object key_ = ""; - /** - * optional string key = 10; - * - *
-       * Only available on PROJECT and MODULE types
-       * TODO rename this property -> batchKey ? moduleKey ?
-       * 
- */ - public boolean hasKey() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional string key = 10; - * - *
-       * Only available on PROJECT and MODULE types
-       * TODO rename this property -> batchKey ? moduleKey ?
-       * 
- */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - key_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string key = 10; - * - *
-       * Only available on PROJECT and MODULE types
-       * TODO rename this property -> batchKey ? moduleKey ?
-       * 
- */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string key = 10; - * - *
-       * Only available on PROJECT and MODULE types
-       * TODO rename this property -> batchKey ? moduleKey ?
-       * 
- */ - public Builder setKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - key_ = value; - onChanged(); - return this; - } - /** - * optional string key = 10; - * - *
-       * Only available on PROJECT and MODULE types
-       * TODO rename this property -> batchKey ? moduleKey ?
-       * 
- */ - public Builder clearKey() { - bitField0_ = (bitField0_ & ~0x00000200); - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - * optional string key = 10; - * - *
-       * Only available on PROJECT and MODULE types
-       * TODO rename this property -> batchKey ? moduleKey ?
-       * 
- */ - public Builder setKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - key_ = value; - onChanged(); - return this; - } - - private int lines_ ; - /** - * optional int32 lines = 11; - * - *
-       * Only available on FILE type
-       * 
- */ - public boolean hasLines() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional int32 lines = 11; - * - *
-       * Only available on FILE type
-       * 
- */ - public int getLines() { - return lines_; - } - /** - * optional int32 lines = 11; - * - *
-       * Only available on FILE type
-       * 
- */ - public Builder setLines(int value) { - bitField0_ |= 0x00000400; - lines_ = value; - onChanged(); - return this; - } - /** - * optional int32 lines = 11; - * - *
-       * Only available on FILE type
-       * 
- */ - public Builder clearLines() { - bitField0_ = (bitField0_ & ~0x00000400); - lines_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * optional string description = 12; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
- */ - public boolean hasDescription() { - return ((bitField0_ & 0x00000800) == 0x00000800); - } - /** - * optional string description = 12; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
- */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - description_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string description = 12; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
- */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string description = 12; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
- */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - description_ = value; - onChanged(); - return this; - } - /** - * optional string description = 12; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
- */ - public Builder clearDescription() { - bitField0_ = (bitField0_ & ~0x00000800); - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * optional string description = 12; - * - *
-       * Only available on PROJECT and MODULE types
-       * 
- */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000800; - description_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:Component) + // @@protoc_insertion_point(builder_scope:ComponentLink) } static { - defaultInstance = new Component(true); + defaultInstance = new ComponentLink(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:Component) + // @@protoc_insertion_point(class_scope:ComponentLink) } - public interface MeasureOrBuilder extends - // @@protoc_insertion_point(interface_extends:Measure) + public interface ComponentOrBuilder extends + // @@protoc_insertion_point(interface_extends:Component) com.google.protobuf.MessageOrBuilder { /** - * optional .MeasureValueType value_type = 1; + * optional int32 ref = 1; */ - boolean hasValueType(); + boolean hasRef(); /** - * optional .MeasureValueType value_type = 1; + * optional int32 ref = 1; */ - org.sonar.batch.protocol.Constants.MeasureValueType getValueType(); + int getRef(); /** - * optional bool boolean_value = 2; - * - *
-     * all values may be unset for "new_xxx" measures (only variations are populated)
-     * 
+ * optional string path = 2; */ - boolean hasBooleanValue(); + boolean hasPath(); /** - * optional bool boolean_value = 2; - * - *
-     * all values may be unset for "new_xxx" measures (only variations are populated)
-     * 
+ * optional string path = 2; */ - boolean getBooleanValue(); - + java.lang.String getPath(); /** - * optional int32 int_value = 3; + * optional string path = 2; */ - boolean hasIntValue(); + com.google.protobuf.ByteString + getPathBytes(); + /** - * optional int32 int_value = 3; + * optional string name = 3; */ - int getIntValue(); - + boolean hasName(); /** - * optional int64 long_value = 4; + * optional string name = 3; */ - boolean hasLongValue(); + java.lang.String getName(); /** - * optional int64 long_value = 4; + * optional string name = 3; */ - long getLongValue(); + com.google.protobuf.ByteString + getNameBytes(); /** - * optional double double_value = 5; + * optional .ComponentType type = 4; */ - boolean hasDoubleValue(); + boolean hasType(); /** - * optional double double_value = 5; + * optional .ComponentType type = 4; */ - double getDoubleValue(); + org.sonar.batch.protocol.Constants.ComponentType getType(); /** - * optional string string_value = 6; + * optional bool is_test = 5; */ - boolean hasStringValue(); + boolean hasIsTest(); /** - * optional string string_value = 6; + * optional bool is_test = 5; */ - java.lang.String getStringValue(); + boolean getIsTest(); + /** - * optional string string_value = 6; + * optional string language = 6; + */ + boolean hasLanguage(); + /** + * optional string language = 6; + */ + java.lang.String getLanguage(); + /** + * optional string language = 6; */ com.google.protobuf.ByteString - getStringValueBytes(); + getLanguageBytes(); /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - boolean hasMetricKey(); + java.util.List getChildRefList(); /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - java.lang.String getMetricKey(); + int getChildRefCount(); /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - com.google.protobuf.ByteString - getMetricKeyBytes(); + int getChildRef(int index); /** - * optional string description = 9; + * repeated .ComponentLink link = 8; + */ + java.util.List + getLinkList(); + /** + * repeated .ComponentLink link = 8; + */ + org.sonar.batch.protocol.output.BatchReport.ComponentLink getLink(int index); + /** + * repeated .ComponentLink link = 8; + */ + int getLinkCount(); + /** + * repeated .ComponentLink link = 8; + */ + java.util.List + getLinkOrBuilderList(); + /** + * repeated .ComponentLink link = 8; + */ + org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinkOrBuilder( + int index); + + /** + * optional string version = 9; * *
-     * temporary fields during development of computation stack
+     * Only available on PROJECT and MODULE types
      * 
*/ - boolean hasDescription(); + boolean hasVersion(); /** - * optional string description = 9; + * optional string version = 9; * *
-     * temporary fields during development of computation stack
+     * Only available on PROJECT and MODULE types
      * 
*/ - java.lang.String getDescription(); + java.lang.String getVersion(); /** - * optional string description = 9; + * optional string version = 9; * *
-     * temporary fields during development of computation stack
+     * Only available on PROJECT and MODULE types
      * 
*/ com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * optional double variation_value_1 = 14; - */ - boolean hasVariationValue1(); - /** - * optional double variation_value_1 = 14; - */ - double getVariationValue1(); + getVersionBytes(); /** - * optional double variation_value_2 = 15; - */ - boolean hasVariationValue2(); - /** - * optional double variation_value_2 = 15; + * optional string key = 10; + * + *
+     * Only available on PROJECT and MODULE types
+     * TODO rename this property -> batchKey ? moduleKey ?
+     * 
*/ - double getVariationValue2(); - + boolean hasKey(); /** - * optional double variation_value_3 = 16; + * optional string key = 10; + * + *
+     * Only available on PROJECT and MODULE types
+     * TODO rename this property -> batchKey ? moduleKey ?
+     * 
*/ - boolean hasVariationValue3(); + java.lang.String getKey(); /** - * optional double variation_value_3 = 16; + * optional string key = 10; + * + *
+     * Only available on PROJECT and MODULE types
+     * TODO rename this property -> batchKey ? moduleKey ?
+     * 
*/ - double getVariationValue3(); + com.google.protobuf.ByteString + getKeyBytes(); /** - * optional double variation_value_4 = 17; + * optional int32 lines = 11; + * + *
+     * Only available on FILE type
+     * 
*/ - boolean hasVariationValue4(); + boolean hasLines(); /** - * optional double variation_value_4 = 17; + * optional int32 lines = 11; + * + *
+     * Only available on FILE type
+     * 
*/ - double getVariationValue4(); + int getLines(); /** - * optional double variation_value_5 = 18; - */ - boolean hasVariationValue5(); - /** - * optional double variation_value_5 = 18; + * optional string description = 12; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
*/ - double getVariationValue5(); - + boolean hasDescription(); /** - * optional int32 person_id = 20; + * optional string description = 12; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
*/ - boolean hasPersonId(); + java.lang.String getDescription(); /** - * optional int32 person_id = 20; + * optional string description = 12; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
*/ - int getPersonId(); + com.google.protobuf.ByteString + getDescriptionBytes(); } /** - * Protobuf type {@code Measure} + * Protobuf type {@code Component} */ - public static final class Measure extends + public static final class Component extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Measure) - MeasureOrBuilder { - // Use Measure.newBuilder() to construct. - private Measure(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:Component) + ComponentOrBuilder { + // Use Component.newBuilder() to construct. + private Component(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Measure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private Component(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Measure defaultInstance; - public static Measure getDefaultInstance() { + private static final Component defaultInstance; + public static Component getDefaultInstance() { return defaultInstance; } - public Measure getDefaultInstanceForType() { + public Component getDefaultInstanceForType() { return defaultInstance; } @@ -4182,7 +3366,7 @@ public final class BatchReport { getUnknownFields() { return this.unknownFields; } - private Measure( + private Component( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4206,82 +3390,94 @@ public final class BatchReport { break; } case 8: { - int rawValue = input.readEnum(); - org.sonar.batch.protocol.Constants.MeasureValueType value = org.sonar.batch.protocol.Constants.MeasureValueType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - valueType_ = value; - } + bitField0_ |= 0x00000001; + ref_ = input.readInt32(); break; } - case 16: { + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - booleanValue_ = input.readBool(); + path_ = bs; break; } - case 24: { + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - intValue_ = input.readInt32(); + name_ = bs; break; } case 32: { - bitField0_ |= 0x00000008; - longValue_ = input.readInt64(); + int rawValue = input.readEnum(); + org.sonar.batch.protocol.Constants.ComponentType value = org.sonar.batch.protocol.Constants.ComponentType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(4, rawValue); + } else { + bitField0_ |= 0x00000008; + type_ = value; + } break; } - case 41: { + case 40: { bitField0_ |= 0x00000010; - doubleValue_ = input.readDouble(); + isTest_ = input.readBool(); break; } case 50: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; - stringValue_ = bs; + language_ = bs; break; } - case 58: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000040; - metricKey_ = bs; + case 56: { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + childRef_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + childRef_.add(input.readInt32()); break; } - case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000080; - description_ = bs; + case 58: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) { + childRef_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000040; + } + while (input.getBytesUntilLimit() > 0) { + childRef_.add(input.readInt32()); + } + input.popLimit(limit); break; } - case 113: { - bitField0_ |= 0x00000100; - variationValue1_ = input.readDouble(); - break; - } - case 121: { - bitField0_ |= 0x00000200; - variationValue2_ = input.readDouble(); + case 66: { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + link_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000080; + } + link_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.ComponentLink.PARSER, extensionRegistry)); break; } - case 129: { - bitField0_ |= 0x00000400; - variationValue3_ = input.readDouble(); + case 74: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000040; + version_ = bs; break; } - case 137: { - bitField0_ |= 0x00000800; - variationValue4_ = input.readDouble(); + case 82: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000080; + key_ = bs; break; } - case 145: { - bitField0_ |= 0x00001000; - variationValue5_ = input.readDouble(); + case 88: { + bitField0_ |= 0x00000100; + lines_ = input.readInt32(); break; } - case 160: { - bitField0_ |= 0x00002000; - personId_ = input.readInt32(); + case 98: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000200; + description_ = bs; break; } } @@ -4292,134 +3488,72 @@ public final class BatchReport { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + childRef_ = java.util.Collections.unmodifiableList(childRef_); + } + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + link_ = java.util.Collections.unmodifiableList(link_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Measure.class, org.sonar.batch.protocol.output.BatchReport.Measure.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Component.class, org.sonar.batch.protocol.output.BatchReport.Component.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Measure parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Component parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Measure(input, extensionRegistry); + return new Component(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; - public static final int VALUE_TYPE_FIELD_NUMBER = 1; - private org.sonar.batch.protocol.Constants.MeasureValueType valueType_; + public static final int REF_FIELD_NUMBER = 1; + private int ref_; /** - * optional .MeasureValueType value_type = 1; + * optional int32 ref = 1; */ - public boolean hasValueType() { + public boolean hasRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .MeasureValueType value_type = 1; + * optional int32 ref = 1; */ - public org.sonar.batch.protocol.Constants.MeasureValueType getValueType() { - return valueType_; + public int getRef() { + return ref_; } - public static final int BOOLEAN_VALUE_FIELD_NUMBER = 2; - private boolean booleanValue_; + public static final int PATH_FIELD_NUMBER = 2; + private java.lang.Object path_; /** - * optional bool boolean_value = 2; - * - *
-     * all values may be unset for "new_xxx" measures (only variations are populated)
-     * 
+ * optional string path = 2; */ - public boolean hasBooleanValue() { + public boolean hasPath() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool boolean_value = 2; - * - *
-     * all values may be unset for "new_xxx" measures (only variations are populated)
-     * 
- */ - public boolean getBooleanValue() { - return booleanValue_; - } - - public static final int INT_VALUE_FIELD_NUMBER = 3; - private int intValue_; - /** - * optional int32 int_value = 3; - */ - public boolean hasIntValue() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 int_value = 3; - */ - public int getIntValue() { - return intValue_; - } - - public static final int LONG_VALUE_FIELD_NUMBER = 4; - private long longValue_; - /** - * optional int64 long_value = 4; - */ - public boolean hasLongValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int64 long_value = 4; - */ - public long getLongValue() { - return longValue_; - } - - public static final int DOUBLE_VALUE_FIELD_NUMBER = 5; - private double doubleValue_; - /** - * optional double double_value = 5; - */ - public boolean hasDoubleValue() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional double double_value = 5; - */ - public double getDoubleValue() { - return doubleValue_; - } - - public static final int STRING_VALUE_FIELD_NUMBER = 6; - private java.lang.Object stringValue_; - /** - * optional string string_value = 6; - */ - public boolean hasStringValue() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional string string_value = 6; + * optional string path = 2; */ - public java.lang.String getStringValue() { - java.lang.Object ref = stringValue_; + public java.lang.String getPath() { + java.lang.Object ref = path_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -4427,41 +3561,41 @@ public final class BatchReport { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - stringValue_ = s; + path_ = s; } return s; } } /** - * optional string string_value = 6; + * optional string path = 2; */ public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; + getPathBytes() { + java.lang.Object ref = path_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - stringValue_ = b; + path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int METRIC_KEY_FIELD_NUMBER = 7; - private java.lang.Object metricKey_; + public static final int NAME_FIELD_NUMBER = 3; + private java.lang.Object name_; /** - * optional string metric_key = 7; + * optional string name = 3; */ - public boolean hasMetricKey() { - return ((bitField0_ & 0x00000040) == 0x00000040); + public boolean hasName() { + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional string metric_key = 7; + * optional string name = 3; */ - public java.lang.String getMetricKey() { - java.lang.Object ref = metricKey_; + public java.lang.String getName() { + java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -4469,49 +3603,71 @@ public final class BatchReport { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - metricKey_ = s; + name_ = s; } return s; } } /** - * optional string metric_key = 7; + * optional string name = 3; */ public com.google.protobuf.ByteString - getMetricKeyBytes() { - java.lang.Object ref = metricKey_; + 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); - metricKey_ = b; + name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int DESCRIPTION_FIELD_NUMBER = 9; - private java.lang.Object description_; + public static final int TYPE_FIELD_NUMBER = 4; + private org.sonar.batch.protocol.Constants.ComponentType type_; /** - * optional string description = 9; - * - *
-     * temporary fields during development of computation stack
-     * 
+ * optional .ComponentType type = 4; */ - public boolean hasDescription() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public boolean hasType() { + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional string description = 9; - * - *
-     * temporary fields during development of computation stack
-     * 
+ * optional .ComponentType type = 4; */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; + public org.sonar.batch.protocol.Constants.ComponentType getType() { + return type_; + } + + public static final int IS_TEST_FIELD_NUMBER = 5; + private boolean isTest_; + /** + * optional bool is_test = 5; + */ + public boolean hasIsTest() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bool is_test = 5; + */ + public boolean getIsTest() { + return isTest_; + } + + public static final int LANGUAGE_FIELD_NUMBER = 6; + private java.lang.Object language_; + /** + * optional string language = 6; + */ + public boolean hasLanguage() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string language = 6; + */ + public java.lang.String getLanguage() { + java.lang.Object ref = language_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -4519,192 +3675,340 @@ public final class BatchReport { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - description_ = s; + language_ = s; } return s; } } /** - * optional string description = 9; - * - *
-     * temporary fields during development of computation stack
-     * 
+ * optional string language = 6; */ public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; + getLanguageBytes() { + java.lang.Object ref = language_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - description_ = b; + language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int VARIATION_VALUE_1_FIELD_NUMBER = 14; - private double variationValue1_; + public static final int CHILD_REF_FIELD_NUMBER = 7; + private java.util.List childRef_; /** - * optional double variation_value_1 = 14; + * repeated int32 child_ref = 7 [packed = true]; */ - public boolean hasVariationValue1() { - return ((bitField0_ & 0x00000100) == 0x00000100); + public java.util.List + getChildRefList() { + return childRef_; } /** - * optional double variation_value_1 = 14; + * repeated int32 child_ref = 7 [packed = true]; */ - public double getVariationValue1() { - return variationValue1_; + public int getChildRefCount() { + return childRef_.size(); } - - public static final int VARIATION_VALUE_2_FIELD_NUMBER = 15; - private double variationValue2_; /** - * optional double variation_value_2 = 15; + * repeated int32 child_ref = 7 [packed = true]; */ - public boolean hasVariationValue2() { - return ((bitField0_ & 0x00000200) == 0x00000200); + public int getChildRef(int index) { + return childRef_.get(index); } + private int childRefMemoizedSerializedSize = -1; + + public static final int LINK_FIELD_NUMBER = 8; + private java.util.List link_; /** - * optional double variation_value_2 = 15; + * repeated .ComponentLink link = 8; */ - public double getVariationValue2() { - return variationValue2_; + public java.util.List getLinkList() { + return link_; } - - public static final int VARIATION_VALUE_3_FIELD_NUMBER = 16; - private double variationValue3_; /** - * optional double variation_value_3 = 16; + * repeated .ComponentLink link = 8; */ - public boolean hasVariationValue3() { - return ((bitField0_ & 0x00000400) == 0x00000400); + public java.util.List + getLinkOrBuilderList() { + return link_; } /** - * optional double variation_value_3 = 16; + * repeated .ComponentLink link = 8; */ - public double getVariationValue3() { - return variationValue3_; + public int getLinkCount() { + return link_.size(); } - - public static final int VARIATION_VALUE_4_FIELD_NUMBER = 17; - private double variationValue4_; /** - * optional double variation_value_4 = 17; + * repeated .ComponentLink link = 8; */ - public boolean hasVariationValue4() { - return ((bitField0_ & 0x00000800) == 0x00000800); + public org.sonar.batch.protocol.output.BatchReport.ComponentLink getLink(int index) { + return link_.get(index); } /** - * optional double variation_value_4 = 17; + * repeated .ComponentLink link = 8; */ - public double getVariationValue4() { - return variationValue4_; + public org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinkOrBuilder( + int index) { + return link_.get(index); } - public static final int VARIATION_VALUE_5_FIELD_NUMBER = 18; - private double variationValue5_; + public static final int VERSION_FIELD_NUMBER = 9; + private java.lang.Object version_; /** - * optional double variation_value_5 = 18; + * optional string version = 9; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
*/ - public boolean hasVariationValue5() { - return ((bitField0_ & 0x00001000) == 0x00001000); + public boolean hasVersion() { + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional double variation_value_5 = 18; + * optional string version = 9; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
*/ - public double getVariationValue5() { - return variationValue5_; + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + version_ = s; + } + return s; + } + } + /** + * optional string version = 9; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
+ */ + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public static final int PERSON_ID_FIELD_NUMBER = 20; - private int personId_; + public static final int KEY_FIELD_NUMBER = 10; + private java.lang.Object key_; /** - * optional int32 person_id = 20; + * optional string key = 10; + * + *
+     * Only available on PROJECT and MODULE types
+     * TODO rename this property -> batchKey ? moduleKey ?
+     * 
*/ - public boolean hasPersonId() { - return ((bitField0_ & 0x00002000) == 0x00002000); + public boolean hasKey() { + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * optional int32 person_id = 20; + * optional string key = 10; + * + *
+     * Only available on PROJECT and MODULE types
+     * TODO rename this property -> batchKey ? moduleKey ?
+     * 
*/ - public int getPersonId() { - return personId_; + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } } - - private void initFields() { - valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; - booleanValue_ = false; - intValue_ = 0; - longValue_ = 0L; - doubleValue_ = 0D; - stringValue_ = ""; - metricKey_ = ""; - description_ = ""; - variationValue1_ = 0D; - variationValue2_ = 0D; - variationValue3_ = 0D; - variationValue4_ = 0D; - variationValue5_ = 0D; - personId_ = 0; + /** + * optional string key = 10; + * + *
+     * Only available on PROJECT and MODULE types
+     * TODO rename this property -> batchKey ? moduleKey ?
+     * 
+ */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - memoizedIsInitialized = 1; - return true; + public static final int LINES_FIELD_NUMBER = 11; + private int lines_; + /** + * optional int32 lines = 11; + * + *
+     * Only available on FILE type
+     * 
+ */ + public boolean hasLines() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional int32 lines = 11; + * + *
+     * Only available on FILE type
+     * 
+ */ + public int getLines() { + return lines_; } - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, valueType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBool(2, booleanValue_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, intValue_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(4, longValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeDouble(5, doubleValue_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(6, getStringValueBytes()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(7, getMetricKeyBytes()); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(9, getDescriptionBytes()); + public static final int DESCRIPTION_FIELD_NUMBER = 12; + private java.lang.Object description_; + /** + * optional string description = 12; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
+ */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional string description = 12; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + description_ = s; + } + return s; } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeDouble(14, variationValue1_); + } + /** + * optional string description = 12; + * + *
+     * Only available on PROJECT and MODULE types
+     * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeDouble(15, variationValue2_); + } + + private void initFields() { + ref_ = 0; + path_ = ""; + name_ = ""; + type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; + isTest_ = false; + language_ = ""; + childRef_ = java.util.Collections.emptyList(); + link_ = java.util.Collections.emptyList(); + version_ = ""; + key_ = ""; + lines_ = 0; + description_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, ref_); } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeDouble(16, variationValue3_); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getPathBytes()); } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeDouble(17, variationValue4_); + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getNameBytes()); } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - output.writeDouble(18, variationValue5_); + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeEnum(4, type_.getNumber()); } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - output.writeInt32(20, personId_); + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBool(5, isTest_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, getLanguageBytes()); + } + if (getChildRefList().size() > 0) { + output.writeRawVarint32(58); + output.writeRawVarint32(childRefMemoizedSerializedSize); + } + for (int i = 0; i < childRef_.size(); i++) { + output.writeInt32NoTag(childRef_.get(i)); + } + for (int i = 0; i < link_.size(); i++) { + output.writeMessage(8, link_.get(i)); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBytes(9, getVersionBytes()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBytes(10, getKeyBytes()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeInt32(11, lines_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeBytes(12, getDescriptionBytes()); } getUnknownFields().writeTo(output); } @@ -4717,59 +4021,61 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, valueType_.getNumber()); + .computeInt32Size(1, ref_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(2, booleanValue_); + .computeBytesSize(2, getPathBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, intValue_); + .computeBytesSize(3, getNameBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(4, longValue_); + .computeEnumSize(4, type_.getNumber()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(5, doubleValue_); + .computeBoolSize(5, isTest_); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getStringValueBytes()); + .computeBytesSize(6, getLanguageBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < childRef_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(childRef_.get(i)); + } + size += dataSize; + if (!getChildRefList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + childRefMemoizedSerializedSize = dataSize; + } + for (int i = 0; i < link_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, link_.get(i)); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, getMetricKeyBytes()); + .computeBytesSize(9, getVersionBytes()); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(9, getDescriptionBytes()); + .computeBytesSize(10, getKeyBytes()); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(14, variationValue1_); + .computeInt32Size(11, lines_); } if (((bitField0_ & 0x00000200) == 0x00000200)) { size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(15, variationValue2_); - } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(16, variationValue3_); - } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(17, variationValue4_); - } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(18, variationValue5_); - } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(20, personId_); + .computeBytesSize(12, getDescriptionBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -4783,53 +4089,53 @@ public final class BatchReport { return super.writeReplace(); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom(byte[] data) + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Component parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseDelimitedFrom( + public static org.sonar.batch.protocol.output.BatchReport.Component parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Component parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4838,7 +4144,7 @@ public final class BatchReport { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Measure prototype) { + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Component prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -4850,25 +4156,25 @@ public final class BatchReport { return builder; } /** - * Protobuf type {@code Measure} + * Protobuf type {@code Component} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Measure) - org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder { + // @@protoc_insertion_point(builder_implements:Component) + org.sonar.batch.protocol.output.BatchReport.ComponentOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Measure.class, org.sonar.batch.protocol.output.BatchReport.Measure.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Component.class, org.sonar.batch.protocol.output.BatchReport.Component.Builder.class); } - // Construct using org.sonar.batch.protocol.output.BatchReport.Measure.newBuilder() + // Construct using org.sonar.batch.protocol.output.BatchReport.Component.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -4880,6 +4186,7 @@ public final class BatchReport { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLinkFieldBuilder(); } } private static Builder create() { @@ -4888,34 +4195,34 @@ public final class BatchReport { public Builder clear() { super.clear(); - valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + ref_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - booleanValue_ = false; + path_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - intValue_ = 0; + name_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - longValue_ = 0L; + type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; bitField0_ = (bitField0_ & ~0x00000008); - doubleValue_ = 0D; + isTest_ = false; bitField0_ = (bitField0_ & ~0x00000010); - stringValue_ = ""; + language_ = ""; bitField0_ = (bitField0_ & ~0x00000020); - metricKey_ = ""; + childRef_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000040); - description_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - variationValue1_ = 0D; + if (linkBuilder_ == null) { + link_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + } else { + linkBuilder_.clear(); + } + version_ = ""; bitField0_ = (bitField0_ & ~0x00000100); - variationValue2_ = 0D; + key_ = ""; bitField0_ = (bitField0_ & ~0x00000200); - variationValue3_ = 0D; + lines_ = 0; bitField0_ = (bitField0_ & ~0x00000400); - variationValue4_ = 0D; + description_ = ""; bitField0_ = (bitField0_ & ~0x00000800); - variationValue5_ = 0D; - bitField0_ = (bitField0_ & ~0x00001000); - personId_ = 0; - bitField0_ = (bitField0_ & ~0x00002000); return this; } @@ -4925,144 +4232,172 @@ public final class BatchReport { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor; } - public org.sonar.batch.protocol.output.BatchReport.Measure getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Measure.getDefaultInstance(); - } + public org.sonar.batch.protocol.output.BatchReport.Component getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Component.getDefaultInstance(); + } - public org.sonar.batch.protocol.output.BatchReport.Measure build() { - org.sonar.batch.protocol.output.BatchReport.Measure result = buildPartial(); + public org.sonar.batch.protocol.output.BatchReport.Component build() { + org.sonar.batch.protocol.output.BatchReport.Component result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.batch.protocol.output.BatchReport.Measure buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Measure result = new org.sonar.batch.protocol.output.BatchReport.Measure(this); + public org.sonar.batch.protocol.output.BatchReport.Component buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Component result = new org.sonar.batch.protocol.output.BatchReport.Component(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.valueType_ = valueType_; + result.ref_ = ref_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.booleanValue_ = booleanValue_; + result.path_ = path_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.intValue_ = intValue_; + result.name_ = name_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.longValue_ = longValue_; + result.type_ = type_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } - result.doubleValue_ = doubleValue_; + result.isTest_ = isTest_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } - result.stringValue_ = stringValue_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; + result.language_ = language_; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + childRef_ = java.util.Collections.unmodifiableList(childRef_); + bitField0_ = (bitField0_ & ~0x00000040); } - result.metricKey_ = metricKey_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; + result.childRef_ = childRef_; + if (linkBuilder_ == null) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { + link_ = java.util.Collections.unmodifiableList(link_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.link_ = link_; + } else { + result.link_ = linkBuilder_.build(); } - result.description_ = description_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; + to_bitField0_ |= 0x00000040; } - result.variationValue1_ = variationValue1_; + result.version_ = version_; if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; + to_bitField0_ |= 0x00000080; } - result.variationValue2_ = variationValue2_; + result.key_ = key_; if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; + to_bitField0_ |= 0x00000100; } - result.variationValue3_ = variationValue3_; + result.lines_ = lines_; if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000800; - } - result.variationValue4_ = variationValue4_; - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00001000; - } - result.variationValue5_ = variationValue5_; - if (((from_bitField0_ & 0x00002000) == 0x00002000)) { - to_bitField0_ |= 0x00002000; + to_bitField0_ |= 0x00000200; } - result.personId_ = personId_; + result.description_ = description_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Measure) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Measure)other); + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Component) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Component)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Measure other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Measure.getDefaultInstance()) return this; - if (other.hasValueType()) { - setValueType(other.getValueType()); + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Component other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Component.getDefaultInstance()) return this; + if (other.hasRef()) { + setRef(other.getRef()); } - if (other.hasBooleanValue()) { - setBooleanValue(other.getBooleanValue()); + if (other.hasPath()) { + bitField0_ |= 0x00000002; + path_ = other.path_; + onChanged(); } - if (other.hasIntValue()) { - setIntValue(other.getIntValue()); + if (other.hasName()) { + bitField0_ |= 0x00000004; + name_ = other.name_; + onChanged(); } - if (other.hasLongValue()) { - setLongValue(other.getLongValue()); + if (other.hasType()) { + setType(other.getType()); } - if (other.hasDoubleValue()) { - setDoubleValue(other.getDoubleValue()); + if (other.hasIsTest()) { + setIsTest(other.getIsTest()); } - if (other.hasStringValue()) { + if (other.hasLanguage()) { bitField0_ |= 0x00000020; - stringValue_ = other.stringValue_; - onChanged(); - } - if (other.hasMetricKey()) { - bitField0_ |= 0x00000040; - metricKey_ = other.metricKey_; + language_ = other.language_; onChanged(); } - if (other.hasDescription()) { - bitField0_ |= 0x00000080; - description_ = other.description_; + if (!other.childRef_.isEmpty()) { + if (childRef_.isEmpty()) { + childRef_ = other.childRef_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensureChildRefIsMutable(); + childRef_.addAll(other.childRef_); + } onChanged(); } - if (other.hasVariationValue1()) { - setVariationValue1(other.getVariationValue1()); - } - if (other.hasVariationValue2()) { - setVariationValue2(other.getVariationValue2()); + if (linkBuilder_ == null) { + if (!other.link_.isEmpty()) { + if (link_.isEmpty()) { + link_ = other.link_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureLinkIsMutable(); + link_.addAll(other.link_); + } + onChanged(); + } + } else { + if (!other.link_.isEmpty()) { + if (linkBuilder_.isEmpty()) { + linkBuilder_.dispose(); + linkBuilder_ = null; + link_ = other.link_; + bitField0_ = (bitField0_ & ~0x00000080); + linkBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLinkFieldBuilder() : null; + } else { + linkBuilder_.addAllMessages(other.link_); + } + } } - if (other.hasVariationValue3()) { - setVariationValue3(other.getVariationValue3()); + if (other.hasVersion()) { + bitField0_ |= 0x00000100; + version_ = other.version_; + onChanged(); } - if (other.hasVariationValue4()) { - setVariationValue4(other.getVariationValue4()); + if (other.hasKey()) { + bitField0_ |= 0x00000200; + key_ = other.key_; + onChanged(); } - if (other.hasVariationValue5()) { - setVariationValue5(other.getVariationValue5()); + if (other.hasLines()) { + setLines(other.getLines()); } - if (other.hasPersonId()) { - setPersonId(other.getPersonId()); + if (other.hasDescription()) { + bitField0_ |= 0x00000800; + description_ = other.description_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -5076,11 +4411,11 @@ public final class BatchReport { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Measure parsedMessage = null; + org.sonar.batch.protocol.output.BatchReport.Component parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Measure) e.getUnfinishedMessage(); + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Component) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -5091,203 +4426,275 @@ public final class BatchReport { } private int bitField0_; - private org.sonar.batch.protocol.Constants.MeasureValueType valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + private int ref_ ; /** - * optional .MeasureValueType value_type = 1; + * optional int32 ref = 1; */ - public boolean hasValueType() { + public boolean hasRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .MeasureValueType value_type = 1; + * optional int32 ref = 1; */ - public org.sonar.batch.protocol.Constants.MeasureValueType getValueType() { - return valueType_; + public int getRef() { + return ref_; } /** - * optional .MeasureValueType value_type = 1; + * optional int32 ref = 1; */ - public Builder setValueType(org.sonar.batch.protocol.Constants.MeasureValueType value) { - if (value == null) { - throw new NullPointerException(); - } + public Builder setRef(int value) { bitField0_ |= 0x00000001; - valueType_ = value; + ref_ = value; onChanged(); return this; } /** - * optional .MeasureValueType value_type = 1; + * optional int32 ref = 1; */ - public Builder clearValueType() { + public Builder clearRef() { bitField0_ = (bitField0_ & ~0x00000001); - valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + ref_ = 0; onChanged(); return this; } - private boolean booleanValue_ ; + private java.lang.Object path_ = ""; /** - * optional bool boolean_value = 2; - * - *
-       * all values may be unset for "new_xxx" measures (only variations are populated)
-       * 
+ * optional string path = 2; */ - public boolean hasBooleanValue() { + public boolean hasPath() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional bool boolean_value = 2; - * - *
-       * all values may be unset for "new_xxx" measures (only variations are populated)
-       * 
+ * optional string path = 2; */ - public boolean getBooleanValue() { - return booleanValue_; + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + path_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional bool boolean_value = 2; - * - *
-       * all values may be unset for "new_xxx" measures (only variations are populated)
-       * 
+ * optional string path = 2; */ - public Builder setBooleanValue(boolean value) { - bitField0_ |= 0x00000002; - booleanValue_ = value; - onChanged(); - return this; + public com.google.protobuf.ByteString + getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** - * optional bool boolean_value = 2; - * - *
-       * all values may be unset for "new_xxx" measures (only variations are populated)
-       * 
+ * optional string path = 2; */ - public Builder clearBooleanValue() { + public Builder setPath( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + path_ = value; + onChanged(); + return this; + } + /** + * optional string path = 2; + */ + public Builder clearPath() { bitField0_ = (bitField0_ & ~0x00000002); - booleanValue_ = false; + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** + * optional string path = 2; + */ + public Builder setPathBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + path_ = value; onChanged(); return this; } - private int intValue_ ; + private java.lang.Object name_ = ""; /** - * optional int32 int_value = 3; + * optional string name = 3; */ - public boolean hasIntValue() { + public boolean hasName() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional int32 int_value = 3; + * optional string name = 3; */ - public int getIntValue() { - return intValue_; + 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(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional int32 int_value = 3; + * optional string name = 3; */ - public Builder setIntValue(int value) { - bitField0_ |= 0x00000004; - intValue_ = value; + 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; + } + } + /** + * optional string name = 3; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + name_ = value; onChanged(); return this; } /** - * optional int32 int_value = 3; + * optional string name = 3; */ - public Builder clearIntValue() { + public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000004); - intValue_ = 0; + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 3; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + name_ = value; onChanged(); return this; } - private long longValue_ ; + private org.sonar.batch.protocol.Constants.ComponentType type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; /** - * optional int64 long_value = 4; + * optional .ComponentType type = 4; */ - public boolean hasLongValue() { + public boolean hasType() { return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional int64 long_value = 4; + * optional .ComponentType type = 4; */ - public long getLongValue() { - return longValue_; + public org.sonar.batch.protocol.Constants.ComponentType getType() { + return type_; } /** - * optional int64 long_value = 4; + * optional .ComponentType type = 4; */ - public Builder setLongValue(long value) { + public Builder setType(org.sonar.batch.protocol.Constants.ComponentType value) { + if (value == null) { + throw new NullPointerException(); + } bitField0_ |= 0x00000008; - longValue_ = value; + type_ = value; onChanged(); return this; } /** - * optional int64 long_value = 4; + * optional .ComponentType type = 4; */ - public Builder clearLongValue() { + public Builder clearType() { bitField0_ = (bitField0_ & ~0x00000008); - longValue_ = 0L; + type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT; onChanged(); return this; } - private double doubleValue_ ; + private boolean isTest_ ; /** - * optional double double_value = 5; + * optional bool is_test = 5; */ - public boolean hasDoubleValue() { + public boolean hasIsTest() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional double double_value = 5; + * optional bool is_test = 5; */ - public double getDoubleValue() { - return doubleValue_; + public boolean getIsTest() { + return isTest_; } /** - * optional double double_value = 5; + * optional bool is_test = 5; */ - public Builder setDoubleValue(double value) { + public Builder setIsTest(boolean value) { bitField0_ |= 0x00000010; - doubleValue_ = value; + isTest_ = value; onChanged(); return this; } /** - * optional double double_value = 5; + * optional bool is_test = 5; */ - public Builder clearDoubleValue() { + public Builder clearIsTest() { bitField0_ = (bitField0_ & ~0x00000010); - doubleValue_ = 0D; + isTest_ = false; onChanged(); return this; } - private java.lang.Object stringValue_ = ""; + private java.lang.Object language_ = ""; /** - * optional string string_value = 6; + * optional string language = 6; */ - public boolean hasStringValue() { + public boolean hasLanguage() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional string string_value = 6; + * optional string language = 6; */ - public java.lang.String getStringValue() { - java.lang.Object ref = stringValue_; + public java.lang.String getLanguage() { + java.lang.Object ref = language_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - stringValue_ = s; + language_ = s; } return s; } else { @@ -5295,507 +4702,923 @@ public final class BatchReport { } } /** - * optional string string_value = 6; + * optional string language = 6; */ public com.google.protobuf.ByteString - getStringValueBytes() { - java.lang.Object ref = stringValue_; + getLanguageBytes() { + java.lang.Object ref = language_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - stringValue_ = b; + language_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string string_value = 6; + * optional string language = 6; */ - public Builder setStringValue( + public Builder setLanguage( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; - stringValue_ = value; + language_ = value; onChanged(); return this; } /** - * optional string string_value = 6; + * optional string language = 6; */ - public Builder clearStringValue() { + public Builder clearLanguage() { bitField0_ = (bitField0_ & ~0x00000020); - stringValue_ = getDefaultInstance().getStringValue(); + language_ = getDefaultInstance().getLanguage(); onChanged(); return this; } /** - * optional string string_value = 6; + * optional string language = 6; */ - public Builder setStringValueBytes( + public Builder setLanguageBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; - stringValue_ = value; + language_ = value; onChanged(); return this; } - private java.lang.Object metricKey_ = ""; + private java.util.List childRef_ = java.util.Collections.emptyList(); + private void ensureChildRefIsMutable() { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { + childRef_ = new java.util.ArrayList(childRef_); + bitField0_ |= 0x00000040; + } + } /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - public boolean hasMetricKey() { - return ((bitField0_ & 0x00000040) == 0x00000040); + public java.util.List + getChildRefList() { + return java.util.Collections.unmodifiableList(childRef_); } /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - public java.lang.String getMetricKey() { - java.lang.Object ref = metricKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - metricKey_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } + public int getChildRefCount() { + return childRef_.size(); } /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - public com.google.protobuf.ByteString - getMetricKeyBytes() { - java.lang.Object ref = metricKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - metricKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public int getChildRef(int index) { + return childRef_.get(index); } /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - public Builder setMetricKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - metricKey_ = value; + public Builder setChildRef( + int index, int value) { + ensureChildRefIsMutable(); + childRef_.set(index, value); onChanged(); return this; } /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - public Builder clearMetricKey() { - bitField0_ = (bitField0_ & ~0x00000040); - metricKey_ = getDefaultInstance().getMetricKey(); + public Builder addChildRef(int value) { + ensureChildRefIsMutable(); + childRef_.add(value); onChanged(); return this; } /** - * optional string metric_key = 7; + * repeated int32 child_ref = 7 [packed = true]; */ - public Builder setMetricKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000040; - metricKey_ = value; + public Builder addAllChildRef( + java.lang.Iterable values) { + ensureChildRefIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, childRef_); onChanged(); return this; } - - private java.lang.Object description_ = ""; /** - * optional string description = 9; - * - *
-       * temporary fields during development of computation stack
-       * 
+ * repeated int32 child_ref = 7 [packed = true]; */ - public boolean hasDescription() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public Builder clearChildRef() { + childRef_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + + private java.util.List link_ = + java.util.Collections.emptyList(); + private void ensureLinkIsMutable() { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { + link_ = new java.util.ArrayList(link_); + bitField0_ |= 0x00000080; + } } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.ComponentLink, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder, org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder> linkBuilder_; + /** - * optional string description = 9; - * - *
-       * temporary fields during development of computation stack
-       * 
+ * repeated .ComponentLink link = 8; */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - description_ = s; - } - return s; + public java.util.List getLinkList() { + if (linkBuilder_ == null) { + return java.util.Collections.unmodifiableList(link_); } else { - return (java.lang.String) ref; + return linkBuilder_.getMessageList(); } } /** - * optional string description = 9; - * - *
-       * temporary fields during development of computation stack
-       * 
+ * repeated .ComponentLink link = 8; */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; + public int getLinkCount() { + if (linkBuilder_ == null) { + return link_.size(); } else { - return (com.google.protobuf.ByteString) ref; + return linkBuilder_.getCount(); } } /** - * optional string description = 9; - * - *
-       * temporary fields during development of computation stack
-       * 
+ * repeated .ComponentLink link = 8; */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - description_ = value; - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.ComponentLink getLink(int index) { + if (linkBuilder_ == null) { + return link_.get(index); + } else { + return linkBuilder_.getMessage(index); + } } /** - * optional string description = 9; - * - *
-       * temporary fields during development of computation stack
-       * 
+ * repeated .ComponentLink link = 8; */ - public Builder clearDescription() { - bitField0_ = (bitField0_ & ~0x00000080); - description_ = getDefaultInstance().getDescription(); - onChanged(); + public Builder setLink( + int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { + if (linkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIsMutable(); + link_.set(index, value); + onChanged(); + } else { + linkBuilder_.setMessage(index, value); + } return this; } /** - * optional string description = 9; - * - *
-       * temporary fields during development of computation stack
-       * 
+ * repeated .ComponentLink link = 8; */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - description_ = value; - onChanged(); + public Builder setLink( + int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.set(index, builderForValue.build()); + onChanged(); + } else { + linkBuilder_.setMessage(index, builderForValue.build()); + } return this; } - - private double variationValue1_ ; /** - * optional double variation_value_1 = 14; + * repeated .ComponentLink link = 8; */ - public boolean hasVariationValue1() { - return ((bitField0_ & 0x00000100) == 0x00000100); + public Builder addLink(org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { + if (linkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIsMutable(); + link_.add(value); + onChanged(); + } else { + linkBuilder_.addMessage(value); + } + return this; } /** - * optional double variation_value_1 = 14; + * repeated .ComponentLink link = 8; */ - public double getVariationValue1() { - return variationValue1_; + public Builder addLink( + int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink value) { + if (linkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLinkIsMutable(); + link_.add(index, value); + onChanged(); + } else { + linkBuilder_.addMessage(index, value); + } + return this; } /** - * optional double variation_value_1 = 14; + * repeated .ComponentLink link = 8; */ - public Builder setVariationValue1(double value) { - bitField0_ |= 0x00000100; - variationValue1_ = value; - onChanged(); + public Builder addLink( + org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.add(builderForValue.build()); + onChanged(); + } else { + linkBuilder_.addMessage(builderForValue.build()); + } return this; } /** - * optional double variation_value_1 = 14; + * repeated .ComponentLink link = 8; */ - public Builder clearVariationValue1() { - bitField0_ = (bitField0_ & ~0x00000100); - variationValue1_ = 0D; - onChanged(); + public Builder addLink( + int index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder builderForValue) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.add(index, builderForValue.build()); + onChanged(); + } else { + linkBuilder_.addMessage(index, builderForValue.build()); + } return this; } - - private double variationValue2_ ; /** - * optional double variation_value_2 = 15; + * repeated .ComponentLink link = 8; */ - public boolean hasVariationValue2() { - return ((bitField0_ & 0x00000200) == 0x00000200); + public Builder addAllLink( + java.lang.Iterable values) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, link_); + onChanged(); + } else { + linkBuilder_.addAllMessages(values); + } + return this; } /** - * optional double variation_value_2 = 15; + * repeated .ComponentLink link = 8; */ - public double getVariationValue2() { - return variationValue2_; + public Builder clearLink() { + if (linkBuilder_ == null) { + link_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + linkBuilder_.clear(); + } + return this; } /** - * optional double variation_value_2 = 15; + * repeated .ComponentLink link = 8; */ - public Builder setVariationValue2(double value) { - bitField0_ |= 0x00000200; - variationValue2_ = value; - onChanged(); + public Builder removeLink(int index) { + if (linkBuilder_ == null) { + ensureLinkIsMutable(); + link_.remove(index); + onChanged(); + } else { + linkBuilder_.remove(index); + } return this; } /** - * optional double variation_value_2 = 15; + * repeated .ComponentLink link = 8; */ - public Builder clearVariationValue2() { - bitField0_ = (bitField0_ & ~0x00000200); - variationValue2_ = 0D; - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder getLinkBuilder( + int index) { + return getLinkFieldBuilder().getBuilder(index); } - - private double variationValue3_ ; /** - * optional double variation_value_3 = 16; + * repeated .ComponentLink link = 8; */ - public boolean hasVariationValue3() { - return ((bitField0_ & 0x00000400) == 0x00000400); + public org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinkOrBuilder( + int index) { + if (linkBuilder_ == null) { + return link_.get(index); } else { + return linkBuilder_.getMessageOrBuilder(index); + } } /** - * optional double variation_value_3 = 16; + * repeated .ComponentLink link = 8; */ - public double getVariationValue3() { - return variationValue3_; + public java.util.List + getLinkOrBuilderList() { + if (linkBuilder_ != null) { + return linkBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(link_); + } } /** - * optional double variation_value_3 = 16; + * repeated .ComponentLink link = 8; */ - public Builder setVariationValue3(double value) { - bitField0_ |= 0x00000400; - variationValue3_ = value; - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder addLinkBuilder() { + return getLinkFieldBuilder().addBuilder( + org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()); } /** - * optional double variation_value_3 = 16; + * repeated .ComponentLink link = 8; */ - public Builder clearVariationValue3() { - bitField0_ = (bitField0_ & ~0x00000400); - variationValue3_ = 0D; - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder addLinkBuilder( + int index) { + return getLinkFieldBuilder().addBuilder( + index, org.sonar.batch.protocol.output.BatchReport.ComponentLink.getDefaultInstance()); } - - private double variationValue4_ ; /** - * optional double variation_value_4 = 17; + * repeated .ComponentLink link = 8; */ - public boolean hasVariationValue4() { - return ((bitField0_ & 0x00000800) == 0x00000800); + public java.util.List + getLinkBuilderList() { + return getLinkFieldBuilder().getBuilderList(); } - /** - * optional double variation_value_4 = 17; - */ - public double getVariationValue4() { - return variationValue4_; + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.ComponentLink, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder, org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder> + getLinkFieldBuilder() { + if (linkBuilder_ == null) { + linkBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.ComponentLink, org.sonar.batch.protocol.output.BatchReport.ComponentLink.Builder, org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder>( + link_, + ((bitField0_ & 0x00000080) == 0x00000080), + getParentForChildren(), + isClean()); + link_ = null; + } + return linkBuilder_; } + + private java.lang.Object version_ = ""; /** - * optional double variation_value_4 = 17; + * optional string version = 9; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
*/ - public Builder setVariationValue4(double value) { - bitField0_ |= 0x00000800; - variationValue4_ = value; - onChanged(); - return this; + public boolean hasVersion() { + return ((bitField0_ & 0x00000100) == 0x00000100); } /** - * optional double variation_value_4 = 17; + * optional string version = 9; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
*/ - public Builder clearVariationValue4() { - bitField0_ = (bitField0_ & ~0x00000800); - variationValue4_ = 0D; - onChanged(); - return this; + public java.lang.String getVersion() { + java.lang.Object ref = version_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + version_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } - - private double variationValue5_ ; /** - * optional double variation_value_5 = 18; + * optional string version = 9; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
*/ - public boolean hasVariationValue5() { - return ((bitField0_ & 0x00001000) == 0x00001000); + public com.google.protobuf.ByteString + getVersionBytes() { + java.lang.Object ref = version_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + version_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** - * optional double variation_value_5 = 18; + * optional string version = 9; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
*/ - public double getVariationValue5() { - return variationValue5_; + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + version_ = value; + onChanged(); + return this; } /** - * optional double variation_value_5 = 18; + * optional string version = 9; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
*/ - public Builder setVariationValue5(double value) { - bitField0_ |= 0x00001000; - variationValue5_ = value; + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000100); + version_ = getDefaultInstance().getVersion(); onChanged(); return this; } /** - * optional double variation_value_5 = 18; + * optional string version = 9; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
*/ - public Builder clearVariationValue5() { - bitField0_ = (bitField0_ & ~0x00001000); - variationValue5_ = 0D; + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + version_ = value; onChanged(); return this; } - private int personId_ ; + private java.lang.Object key_ = ""; /** - * optional int32 person_id = 20; + * optional string key = 10; + * + *
+       * Only available on PROJECT and MODULE types
+       * TODO rename this property -> batchKey ? moduleKey ?
+       * 
*/ - public boolean hasPersonId() { - return ((bitField0_ & 0x00002000) == 0x00002000); + public boolean hasKey() { + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * optional int32 person_id = 20; + * optional string key = 10; + * + *
+       * Only available on PROJECT and MODULE types
+       * TODO rename this property -> batchKey ? moduleKey ?
+       * 
*/ - public int getPersonId() { - return personId_; + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional int32 person_id = 20; + * optional string key = 10; + * + *
+       * Only available on PROJECT and MODULE types
+       * TODO rename this property -> batchKey ? moduleKey ?
+       * 
*/ - public Builder setPersonId(int value) { - bitField0_ |= 0x00002000; - personId_ = value; - onChanged(); - return this; + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** - * optional int32 person_id = 20; + * optional string key = 10; + * + *
+       * Only available on PROJECT and MODULE types
+       * TODO rename this property -> batchKey ? moduleKey ?
+       * 
*/ - public Builder clearPersonId() { - bitField0_ = (bitField0_ & ~0x00002000); - personId_ = 0; + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + key_ = value; + onChanged(); + return this; + } + /** + * optional string key = 10; + * + *
+       * Only available on PROJECT and MODULE types
+       * TODO rename this property -> batchKey ? moduleKey ?
+       * 
+ */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000200); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * optional string key = 10; + * + *
+       * Only available on PROJECT and MODULE types
+       * TODO rename this property -> batchKey ? moduleKey ?
+       * 
+ */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + key_ = value; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:Measure) + private int lines_ ; + /** + * optional int32 lines = 11; + * + *
+       * Only available on FILE type
+       * 
+ */ + public boolean hasLines() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional int32 lines = 11; + * + *
+       * Only available on FILE type
+       * 
+ */ + public int getLines() { + return lines_; + } + /** + * optional int32 lines = 11; + * + *
+       * Only available on FILE type
+       * 
+ */ + public Builder setLines(int value) { + bitField0_ |= 0x00000400; + lines_ = value; + onChanged(); + return this; + } + /** + * optional int32 lines = 11; + * + *
+       * Only available on FILE type
+       * 
+ */ + public Builder clearLines() { + bitField0_ = (bitField0_ & ~0x00000400); + lines_ = 0; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * optional string description = 12; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
+ */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string description = 12; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + description_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string description = 12; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string description = 12; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + description_ = value; + onChanged(); + return this; + } + /** + * optional string description = 12; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
+ */ + public Builder clearDescription() { + bitField0_ = (bitField0_ & ~0x00000800); + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * optional string description = 12; + * + *
+       * Only available on PROJECT and MODULE types
+       * 
+ */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + description_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:Component) } static { - defaultInstance = new Measure(true); + defaultInstance = new Component(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:Measure) + // @@protoc_insertion_point(class_scope:Component) } - public interface MeasuresOrBuilder extends - // @@protoc_insertion_point(interface_extends:Measures) + public interface MeasureOrBuilder extends + // @@protoc_insertion_point(interface_extends:Measure) com.google.protobuf.MessageOrBuilder { /** - * optional int32 component_ref = 1; + * optional .MeasureValueType value_type = 1; */ - boolean hasComponentRef(); + boolean hasValueType(); /** - * optional int32 component_ref = 1; + * optional .MeasureValueType value_type = 1; */ - int getComponentRef(); + org.sonar.batch.protocol.Constants.MeasureValueType getValueType(); /** - * repeated .Measure measure = 2; + * optional bool boolean_value = 2; + * + *
+     * all values may be unset for "new_xxx" measures (only variations are populated)
+     * 
+ */ + boolean hasBooleanValue(); + /** + * optional bool boolean_value = 2; + * + *
+     * all values may be unset for "new_xxx" measures (only variations are populated)
+     * 
*/ - java.util.List - getMeasureList(); + boolean getBooleanValue(); + /** - * repeated .Measure measure = 2; + * optional int32 int_value = 3; */ - org.sonar.batch.protocol.output.BatchReport.Measure getMeasure(int index); + boolean hasIntValue(); /** - * repeated .Measure measure = 2; + * optional int32 int_value = 3; */ - int getMeasureCount(); + int getIntValue(); + /** - * repeated .Measure measure = 2; + * optional int64 long_value = 4; */ - java.util.List - getMeasureOrBuilderList(); + boolean hasLongValue(); /** - * repeated .Measure measure = 2; + * optional int64 long_value = 4; */ - org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder getMeasureOrBuilder( - int index); - } - /** - * Protobuf type {@code Measures} - * - *
-   * TODO to be removed. It prevents streaming 
-   * 
- */ - public static final class Measures extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Measures) - MeasuresOrBuilder { - // Use Measures.newBuilder() to construct. - private Measures(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Measures(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Measures defaultInstance; - public static Measures getDefaultInstance() { - return defaultInstance; - } - - public Measures getDefaultInstanceForType() { - return defaultInstance; - } + long getLongValue(); - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override + /** + * optional double double_value = 5; + */ + boolean hasDoubleValue(); + /** + * optional double double_value = 5; + */ + double getDoubleValue(); + + /** + * optional string string_value = 6; + */ + boolean hasStringValue(); + /** + * optional string string_value = 6; + */ + java.lang.String getStringValue(); + /** + * optional string string_value = 6; + */ + com.google.protobuf.ByteString + getStringValueBytes(); + + /** + * optional string metric_key = 7; + */ + boolean hasMetricKey(); + /** + * optional string metric_key = 7; + */ + java.lang.String getMetricKey(); + /** + * optional string metric_key = 7; + */ + com.google.protobuf.ByteString + getMetricKeyBytes(); + + /** + * optional string description = 9; + * + *
+     * temporary fields during development of computation stack
+     * 
+ */ + boolean hasDescription(); + /** + * optional string description = 9; + * + *
+     * temporary fields during development of computation stack
+     * 
+ */ + java.lang.String getDescription(); + /** + * optional string description = 9; + * + *
+     * temporary fields during development of computation stack
+     * 
+ */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + * optional double variation_value_1 = 14; + */ + boolean hasVariationValue1(); + /** + * optional double variation_value_1 = 14; + */ + double getVariationValue1(); + + /** + * optional double variation_value_2 = 15; + */ + boolean hasVariationValue2(); + /** + * optional double variation_value_2 = 15; + */ + double getVariationValue2(); + + /** + * optional double variation_value_3 = 16; + */ + boolean hasVariationValue3(); + /** + * optional double variation_value_3 = 16; + */ + double getVariationValue3(); + + /** + * optional double variation_value_4 = 17; + */ + boolean hasVariationValue4(); + /** + * optional double variation_value_4 = 17; + */ + double getVariationValue4(); + + /** + * optional double variation_value_5 = 18; + */ + boolean hasVariationValue5(); + /** + * optional double variation_value_5 = 18; + */ + double getVariationValue5(); + + /** + * optional int32 person_id = 20; + */ + boolean hasPersonId(); + /** + * optional int32 person_id = 20; + */ + int getPersonId(); + } + /** + * Protobuf type {@code Measure} + */ + public static final class Measure extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Measure) + MeasureOrBuilder { + // Use Measure.newBuilder() to construct. + private Measure(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Measure(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Measure defaultInstance; + public static Measure getDefaultInstance() { + return defaultInstance; + } + + public Measure getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Measures( + private Measure( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5819,16 +5642,82 @@ public final class BatchReport { break; } case 8: { - bitField0_ |= 0x00000001; - componentRef_ = input.readInt32(); + int rawValue = input.readEnum(); + org.sonar.batch.protocol.Constants.MeasureValueType value = org.sonar.batch.protocol.Constants.MeasureValueType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + valueType_ = value; + } break; } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - measure_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - measure_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Measure.PARSER, extensionRegistry)); + case 16: { + bitField0_ |= 0x00000002; + booleanValue_ = input.readBool(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + intValue_ = input.readInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + longValue_ = input.readInt64(); + break; + } + case 41: { + bitField0_ |= 0x00000010; + doubleValue_ = input.readDouble(); + break; + } + case 50: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000020; + stringValue_ = bs; + break; + } + case 58: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000040; + metricKey_ = bs; + break; + } + case 74: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000080; + description_ = bs; + break; + } + case 113: { + bitField0_ |= 0x00000100; + variationValue1_ = input.readDouble(); + break; + } + case 121: { + bitField0_ |= 0x00000200; + variationValue2_ = input.readDouble(); + break; + } + case 129: { + bitField0_ |= 0x00000400; + variationValue3_ = input.readDouble(); + break; + } + case 137: { + bitField0_ |= 0x00000800; + variationValue4_ = input.readDouble(); + break; + } + case 145: { + bitField0_ |= 0x00001000; + variationValue5_ = input.readDouble(); + break; + } + case 160: { + bitField0_ |= 0x00002000; + personId_ = input.readInt32(); break; } } @@ -5839,2091 +5728,1565 @@ public final class BatchReport { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - measure_ = java.util.Collections.unmodifiableList(measure_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measures_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measures_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Measures.class, org.sonar.batch.protocol.output.BatchReport.Measures.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Measure.class, org.sonar.batch.protocol.output.BatchReport.Measure.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Measures parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Measure parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Measures(input, extensionRegistry); + return new Measure(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; - public static final int COMPONENT_REF_FIELD_NUMBER = 1; - private int componentRef_; + public static final int VALUE_TYPE_FIELD_NUMBER = 1; + private org.sonar.batch.protocol.Constants.MeasureValueType valueType_; /** - * optional int32 component_ref = 1; + * optional .MeasureValueType value_type = 1; */ - public boolean hasComponentRef() { + public boolean hasValueType() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 component_ref = 1; + * optional .MeasureValueType value_type = 1; */ - public int getComponentRef() { - return componentRef_; + public org.sonar.batch.protocol.Constants.MeasureValueType getValueType() { + return valueType_; } - public static final int MEASURE_FIELD_NUMBER = 2; - private java.util.List measure_; + public static final int BOOLEAN_VALUE_FIELD_NUMBER = 2; + private boolean booleanValue_; /** - * repeated .Measure measure = 2; + * optional bool boolean_value = 2; + * + *
+     * all values may be unset for "new_xxx" measures (only variations are populated)
+     * 
*/ - public java.util.List getMeasureList() { - return measure_; + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * repeated .Measure measure = 2; + * optional bool boolean_value = 2; + * + *
+     * all values may be unset for "new_xxx" measures (only variations are populated)
+     * 
*/ - public java.util.List - getMeasureOrBuilderList() { - return measure_; + public boolean getBooleanValue() { + return booleanValue_; } + + public static final int INT_VALUE_FIELD_NUMBER = 3; + private int intValue_; /** - * repeated .Measure measure = 2; + * optional int32 int_value = 3; */ - public int getMeasureCount() { - return measure_.size(); + public boolean hasIntValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * repeated .Measure measure = 2; + * optional int32 int_value = 3; */ - public org.sonar.batch.protocol.output.BatchReport.Measure getMeasure(int index) { - return measure_.get(index); + public int getIntValue() { + return intValue_; } + + public static final int LONG_VALUE_FIELD_NUMBER = 4; + private long longValue_; /** - * repeated .Measure measure = 2; + * optional int64 long_value = 4; */ - public org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder getMeasureOrBuilder( - int index) { - return measure_.get(index); + public boolean hasLongValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - - private void initFields() { - componentRef_ = 0; - measure_ = java.util.Collections.emptyList(); + /** + * optional int64 long_value = 4; + */ + public long getLongValue() { + return longValue_; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - memoizedIsInitialized = 1; - return true; + public static final int DOUBLE_VALUE_FIELD_NUMBER = 5; + private double doubleValue_; + /** + * optional double double_value = 5; + */ + public boolean hasDoubleValue() { + return ((bitField0_ & 0x00000010) == 0x00000010); } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, componentRef_); - } - for (int i = 0; i < measure_.size(); i++) { - output.writeMessage(2, measure_.get(i)); - } - getUnknownFields().writeTo(output); + /** + * optional double double_value = 5; + */ + public double getDoubleValue() { + return doubleValue_; } - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, componentRef_); - } - for (int i = 0; i < measure_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, measure_.get(i)); + public static final int STRING_VALUE_FIELD_NUMBER = 6; + private java.lang.Object stringValue_; + /** + * optional string string_value = 6; + */ + public boolean hasStringValue() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string string_value = 6; + */ + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + stringValue_ = s; + } + return s; } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); + /** + * optional string string_value = 6; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); + public static final int METRIC_KEY_FIELD_NUMBER = 7; + private java.lang.Object metricKey_; + /** + * optional string metric_key = 7; + */ + public boolean hasMetricKey() { + return ((bitField0_ & 0x00000040) == 0x00000040); } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); + /** + * optional string metric_key = 7; + */ + public java.lang.String getMetricKey() { + java.lang.Object ref = metricKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + metricKey_ = s; + } + return s; + } } - public static org.sonar.batch.protocol.output.BatchReport.Measures parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + /** + * optional string metric_key = 7; + */ + public com.google.protobuf.ByteString + getMetricKeyBytes() { + java.lang.Object ref = metricKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metricKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Measures prototype) { - return newBuilder().mergeFrom(prototype); + public static final int DESCRIPTION_FIELD_NUMBER = 9; + private java.lang.Object description_; + /** + * optional string description = 9; + * + *
+     * temporary fields during development of computation stack
+     * 
+ */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000080) == 0x00000080); } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * optional string description = 9; + * + *
+     * temporary fields during development of computation stack
+     * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + description_ = s; + } + return s; + } } /** - * Protobuf type {@code Measures} + * optional string description = 9; * *
-     * TODO to be removed. It prevents streaming 
+     * temporary fields during development of computation stack
      * 
*/ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Measures) - org.sonar.batch.protocol.output.BatchReport.MeasuresOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measures_descriptor; + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measures_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Measures.class, org.sonar.batch.protocol.output.BatchReport.Measures.Builder.class); - } + public static final int VARIATION_VALUE_1_FIELD_NUMBER = 14; + private double variationValue1_; + /** + * optional double variation_value_1 = 14; + */ + public boolean hasVariationValue1() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional double variation_value_1 = 14; + */ + public double getVariationValue1() { + return variationValue1_; + } - // Construct using org.sonar.batch.protocol.output.BatchReport.Measures.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + public static final int VARIATION_VALUE_2_FIELD_NUMBER = 15; + private double variationValue2_; + /** + * optional double variation_value_2 = 15; + */ + public boolean hasVariationValue2() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional double variation_value_2 = 15; + */ + public double getVariationValue2() { + return variationValue2_; + } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getMeasureFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } + public static final int VARIATION_VALUE_3_FIELD_NUMBER = 16; + private double variationValue3_; + /** + * optional double variation_value_3 = 16; + */ + public boolean hasVariationValue3() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional double variation_value_3 = 16; + */ + public double getVariationValue3() { + return variationValue3_; + } - public Builder clear() { - super.clear(); - componentRef_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - if (measureBuilder_ == null) { - measure_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - measureBuilder_.clear(); - } - return this; - } + public static final int VARIATION_VALUE_4_FIELD_NUMBER = 17; + private double variationValue4_; + /** + * optional double variation_value_4 = 17; + */ + public boolean hasVariationValue4() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional double variation_value_4 = 17; + */ + public double getVariationValue4() { + return variationValue4_; + } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } + public static final int VARIATION_VALUE_5_FIELD_NUMBER = 18; + private double variationValue5_; + /** + * optional double variation_value_5 = 18; + */ + public boolean hasVariationValue5() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional double variation_value_5 = 18; + */ + public double getVariationValue5() { + return variationValue5_; + } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Measures_descriptor; - } + public static final int PERSON_ID_FIELD_NUMBER = 20; + private int personId_; + /** + * optional int32 person_id = 20; + */ + public boolean hasPersonId() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional int32 person_id = 20; + */ + public int getPersonId() { + return personId_; + } - public org.sonar.batch.protocol.output.BatchReport.Measures getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Measures.getDefaultInstance(); - } + private void initFields() { + valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + booleanValue_ = false; + intValue_ = 0; + longValue_ = 0L; + doubleValue_ = 0D; + stringValue_ = ""; + metricKey_ = ""; + description_ = ""; + variationValue1_ = 0D; + variationValue2_ = 0D; + variationValue3_ = 0D; + variationValue4_ = 0D; + variationValue5_ = 0D; + personId_ = 0; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public org.sonar.batch.protocol.output.BatchReport.Measures build() { - org.sonar.batch.protocol.output.BatchReport.Measures result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + memoizedIsInitialized = 1; + return true; + } - public org.sonar.batch.protocol.output.BatchReport.Measures buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Measures result = new org.sonar.batch.protocol.output.BatchReport.Measures(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.componentRef_ = componentRef_; - if (measureBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - measure_ = java.util.Collections.unmodifiableList(measure_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.measure_ = measure_; - } else { - result.measure_ = measureBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, valueType_.getNumber()); } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Measures) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Measures)other); - } else { - super.mergeFrom(other); - return this; - } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(2, booleanValue_); } - - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Measures other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Measures.getDefaultInstance()) return this; - if (other.hasComponentRef()) { - setComponentRef(other.getComponentRef()); - } - if (measureBuilder_ == null) { - if (!other.measure_.isEmpty()) { - if (measure_.isEmpty()) { - measure_ = other.measure_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMeasureIsMutable(); - measure_.addAll(other.measure_); - } - onChanged(); - } - } else { - if (!other.measure_.isEmpty()) { - if (measureBuilder_.isEmpty()) { - measureBuilder_.dispose(); - measureBuilder_ = null; - measure_ = other.measure_; - bitField0_ = (bitField0_ & ~0x00000002); - measureBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMeasureFieldBuilder() : null; - } else { - measureBuilder_.addAllMessages(other.measure_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, intValue_); } - - public final boolean isInitialized() { - return true; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, longValue_); } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Measures parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Measures) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeDouble(5, doubleValue_); } - private int bitField0_; - - private int componentRef_ ; - /** - * optional int32 component_ref = 1; - */ - public boolean hasComponentRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, getStringValueBytes()); } - /** - * optional int32 component_ref = 1; - */ - public int getComponentRef() { - return componentRef_; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBytes(7, getMetricKeyBytes()); } - /** - * optional int32 component_ref = 1; - */ - public Builder setComponentRef(int value) { - bitField0_ |= 0x00000001; - componentRef_ = value; - onChanged(); - return this; + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBytes(9, getDescriptionBytes()); } - /** - * optional int32 component_ref = 1; - */ - public Builder clearComponentRef() { - bitField0_ = (bitField0_ & ~0x00000001); - componentRef_ = 0; - onChanged(); - return this; + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeDouble(14, variationValue1_); } - - private java.util.List measure_ = - java.util.Collections.emptyList(); - private void ensureMeasureIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - measure_ = new java.util.ArrayList(measure_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Measure, org.sonar.batch.protocol.output.BatchReport.Measure.Builder, org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder> measureBuilder_; - - /** - * repeated .Measure measure = 2; - */ - public java.util.List getMeasureList() { - if (measureBuilder_ == null) { - return java.util.Collections.unmodifiableList(measure_); - } else { - return measureBuilder_.getMessageList(); - } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeDouble(15, variationValue2_); } - /** - * repeated .Measure measure = 2; - */ - public int getMeasureCount() { - if (measureBuilder_ == null) { - return measure_.size(); - } else { - return measureBuilder_.getCount(); - } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeDouble(16, variationValue3_); } - /** - * repeated .Measure measure = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Measure getMeasure(int index) { - if (measureBuilder_ == null) { - return measure_.get(index); - } else { - return measureBuilder_.getMessage(index); - } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeDouble(17, variationValue4_); } - /** - * repeated .Measure measure = 2; - */ - public Builder setMeasure( - int index, org.sonar.batch.protocol.output.BatchReport.Measure value) { - if (measureBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMeasureIsMutable(); - measure_.set(index, value); - onChanged(); - } else { - measureBuilder_.setMessage(index, value); - } - return this; + if (((bitField0_ & 0x00001000) == 0x00001000)) { + output.writeDouble(18, variationValue5_); } - /** - * repeated .Measure measure = 2; - */ - public Builder setMeasure( - int index, org.sonar.batch.protocol.output.BatchReport.Measure.Builder builderForValue) { - if (measureBuilder_ == null) { - ensureMeasureIsMutable(); - measure_.set(index, builderForValue.build()); - onChanged(); - } else { - measureBuilder_.setMessage(index, builderForValue.build()); - } - return this; + if (((bitField0_ & 0x00002000) == 0x00002000)) { + output.writeInt32(20, personId_); } - /** - * repeated .Measure measure = 2; - */ - public Builder addMeasure(org.sonar.batch.protocol.output.BatchReport.Measure value) { - if (measureBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMeasureIsMutable(); - measure_.add(value); - onChanged(); - } else { - measureBuilder_.addMessage(value); - } - return this; + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, valueType_.getNumber()); } - /** - * repeated .Measure measure = 2; - */ - public Builder addMeasure( - int index, org.sonar.batch.protocol.output.BatchReport.Measure value) { - if (measureBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMeasureIsMutable(); - measure_.add(index, value); - onChanged(); - } else { - measureBuilder_.addMessage(index, value); - } - return this; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(2, booleanValue_); } - /** - * repeated .Measure measure = 2; - */ - public Builder addMeasure( - org.sonar.batch.protocol.output.BatchReport.Measure.Builder builderForValue) { - if (measureBuilder_ == null) { - ensureMeasureIsMutable(); - measure_.add(builderForValue.build()); - onChanged(); - } else { - measureBuilder_.addMessage(builderForValue.build()); - } - return this; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, intValue_); } - /** - * repeated .Measure measure = 2; - */ - public Builder addMeasure( - int index, org.sonar.batch.protocol.output.BatchReport.Measure.Builder builderForValue) { - if (measureBuilder_ == null) { - ensureMeasureIsMutable(); - measure_.add(index, builderForValue.build()); - onChanged(); - } else { - measureBuilder_.addMessage(index, builderForValue.build()); - } - return this; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, longValue_); } - /** - * repeated .Measure measure = 2; - */ - public Builder addAllMeasure( - java.lang.Iterable values) { - if (measureBuilder_ == null) { - ensureMeasureIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, measure_); - onChanged(); - } else { - measureBuilder_.addAllMessages(values); - } - return this; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(5, doubleValue_); } - /** - * repeated .Measure measure = 2; - */ - public Builder clearMeasure() { - if (measureBuilder_ == null) { - measure_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - measureBuilder_.clear(); - } - return this; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, getStringValueBytes()); } - /** - * repeated .Measure measure = 2; - */ - public Builder removeMeasure(int index) { - if (measureBuilder_ == null) { - ensureMeasureIsMutable(); - measure_.remove(index); - onChanged(); - } else { - measureBuilder_.remove(index); - } - return this; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, getMetricKeyBytes()); } - /** - * repeated .Measure measure = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Measure.Builder getMeasureBuilder( - int index) { - return getMeasureFieldBuilder().getBuilder(index); + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(9, getDescriptionBytes()); } - /** - * repeated .Measure measure = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder getMeasureOrBuilder( - int index) { - if (measureBuilder_ == null) { - return measure_.get(index); } else { - return measureBuilder_.getMessageOrBuilder(index); - } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(14, variationValue1_); } - /** - * repeated .Measure measure = 2; - */ - public java.util.List - getMeasureOrBuilderList() { - if (measureBuilder_ != null) { - return measureBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(measure_); - } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(15, variationValue2_); } - /** - * repeated .Measure measure = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Measure.Builder addMeasureBuilder() { - return getMeasureFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.Measure.getDefaultInstance()); + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(16, variationValue3_); } - /** - * repeated .Measure measure = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Measure.Builder addMeasureBuilder( - int index) { - return getMeasureFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.Measure.getDefaultInstance()); + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(17, variationValue4_); } - /** - * repeated .Measure measure = 2; - */ - public java.util.List - getMeasureBuilderList() { - return getMeasureFieldBuilder().getBuilderList(); + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(18, variationValue5_); } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Measure, org.sonar.batch.protocol.output.BatchReport.Measure.Builder, org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder> - getMeasureFieldBuilder() { - if (measureBuilder_ == null) { - measureBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Measure, org.sonar.batch.protocol.output.BatchReport.Measure.Builder, org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder>( - measure_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - measure_ = null; - } - return measureBuilder_; + if (((bitField0_ & 0x00002000) == 0x00002000)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(20, personId_); } - - // @@protoc_insertion_point(builder_scope:Measures) + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; } - static { - defaultInstance = new Measures(true); - defaultInstance.initFields(); + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); } - // @@protoc_insertion_point(class_scope:Measures) - } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.Measure parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } - public interface IssueOrBuilder extends - // @@protoc_insertion_point(interface_extends:Issue) - com.google.protobuf.MessageOrBuilder { + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Measure prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } /** - * optional string rule_repository = 1; - */ - boolean hasRuleRepository(); - /** - * optional string rule_repository = 1; - */ - java.lang.String getRuleRepository(); - /** - * optional string rule_repository = 1; + * Protobuf type {@code Measure} */ - com.google.protobuf.ByteString - getRuleRepositoryBytes(); + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Measure) + org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_descriptor; + } - /** - * optional string rule_key = 2; - */ - boolean hasRuleKey(); - /** - * optional string rule_key = 2; - */ - java.lang.String getRuleKey(); - /** - * optional string rule_key = 2; - */ - com.google.protobuf.ByteString - getRuleKeyBytes(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Measure.class, org.sonar.batch.protocol.output.BatchReport.Measure.Builder.class); + } - /** - * optional int32 line = 3; - */ - boolean hasLine(); - /** - * optional int32 line = 3; - */ - int getLine(); + // Construct using org.sonar.batch.protocol.output.BatchReport.Measure.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } - /** - * optional string msg = 4; - */ - boolean hasMsg(); - /** - * optional string msg = 4; - */ - java.lang.String getMsg(); - /** - * optional string msg = 4; - */ - com.google.protobuf.ByteString - getMsgBytes(); + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } - /** - * optional .Severity severity = 5; - */ - boolean hasSeverity(); - /** - * optional .Severity severity = 5; - */ - org.sonar.batch.protocol.Constants.Severity getSeverity(); + public Builder clear() { + super.clear(); + valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + bitField0_ = (bitField0_ & ~0x00000001); + booleanValue_ = false; + bitField0_ = (bitField0_ & ~0x00000002); + intValue_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + longValue_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + doubleValue_ = 0D; + bitField0_ = (bitField0_ & ~0x00000010); + stringValue_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + metricKey_ = ""; + bitField0_ = (bitField0_ & ~0x00000040); + description_ = ""; + bitField0_ = (bitField0_ & ~0x00000080); + variationValue1_ = 0D; + bitField0_ = (bitField0_ & ~0x00000100); + variationValue2_ = 0D; + bitField0_ = (bitField0_ & ~0x00000200); + variationValue3_ = 0D; + bitField0_ = (bitField0_ & ~0x00000400); + variationValue4_ = 0D; + bitField0_ = (bitField0_ & ~0x00000800); + variationValue5_ = 0D; + bitField0_ = (bitField0_ & ~0x00001000); + personId_ = 0; + bitField0_ = (bitField0_ & ~0x00002000); + return this; + } - /** - * repeated string tag = 6; - */ - com.google.protobuf.ProtocolStringList - getTagList(); - /** - * repeated string tag = 6; - */ - int getTagCount(); - /** - * repeated string tag = 6; - */ - java.lang.String getTag(int index); - /** - * repeated string tag = 6; - */ - com.google.protobuf.ByteString - getTagBytes(int index); + public Builder clone() { + return create().mergeFrom(buildPartial()); + } - /** - * optional double effort_to_fix = 7; - */ - boolean hasEffortToFix(); - /** - * optional double effort_to_fix = 7; - */ - double getEffortToFix(); + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_descriptor; + } - /** - * optional string attributes = 8; - */ - boolean hasAttributes(); - /** - * optional string attributes = 8; - */ - java.lang.String getAttributes(); - /** - * optional string attributes = 8; - */ - com.google.protobuf.ByteString - getAttributesBytes(); - } - /** - * Protobuf type {@code Issue} - */ - public static final class Issue extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Issue) - IssueOrBuilder { - // Use Issue.newBuilder() to construct. - private Issue(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Issue(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + public org.sonar.batch.protocol.output.BatchReport.Measure getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Measure.getDefaultInstance(); + } - private static final Issue defaultInstance; - public static Issue getDefaultInstance() { - return defaultInstance; - } + public org.sonar.batch.protocol.output.BatchReport.Measure build() { + org.sonar.batch.protocol.output.BatchReport.Measure result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public Issue getDefaultInstanceForType() { - return defaultInstance; - } + public org.sonar.batch.protocol.output.BatchReport.Measure buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Measure result = new org.sonar.batch.protocol.output.BatchReport.Measure(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.valueType_ = valueType_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.booleanValue_ = booleanValue_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.intValue_ = intValue_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.longValue_ = longValue_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.doubleValue_ = doubleValue_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.stringValue_ = stringValue_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.metricKey_ = metricKey_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.description_ = description_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.variationValue1_ = variationValue1_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.variationValue2_ = variationValue2_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.variationValue3_ = variationValue3_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000800; + } + result.variationValue4_ = variationValue4_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00001000; + } + result.variationValue5_ = variationValue5_; + if (((from_bitField0_ & 0x00002000) == 0x00002000)) { + to_bitField0_ |= 0x00002000; + } + result.personId_ = personId_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Issue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - ruleRepository_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - ruleKey_ = bs; - break; - } - case 24: { - bitField0_ |= 0x00000004; - line_ = input.readInt32(); - break; - } - case 34: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000008; - msg_ = bs; - break; - } - case 40: { - int rawValue = input.readEnum(); - org.sonar.batch.protocol.Constants.Severity value = org.sonar.batch.protocol.Constants.Severity.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(5, rawValue); - } else { - bitField0_ |= 0x00000010; - severity_ = value; - } - break; - } - case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - tag_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - tag_.add(bs); - break; - } - case 57: { - bitField0_ |= 0x00000020; - effortToFix_ = input.readDouble(); - break; - } - case 66: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000040; - attributes_ = bs; - break; - } - } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Measure) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Measure)other); + } else { + super.mergeFrom(other); + return this; } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - tag_ = tag_.getUnmodifiableView(); + } + + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Measure other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Measure.getDefaultInstance()) return this; + if (other.hasValueType()) { + setValueType(other.getValueType()); } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + if (other.hasBooleanValue()) { + setBooleanValue(other.getBooleanValue()); + } + if (other.hasIntValue()) { + setIntValue(other.getIntValue()); + } + if (other.hasLongValue()) { + setLongValue(other.getLongValue()); + } + if (other.hasDoubleValue()) { + setDoubleValue(other.getDoubleValue()); + } + if (other.hasStringValue()) { + bitField0_ |= 0x00000020; + stringValue_ = other.stringValue_; + onChanged(); + } + if (other.hasMetricKey()) { + bitField0_ |= 0x00000040; + metricKey_ = other.metricKey_; + onChanged(); + } + if (other.hasDescription()) { + bitField0_ |= 0x00000080; + description_ = other.description_; + onChanged(); + } + if (other.hasVariationValue1()) { + setVariationValue1(other.getVariationValue1()); + } + if (other.hasVariationValue2()) { + setVariationValue2(other.getVariationValue2()); + } + if (other.hasVariationValue3()) { + setVariationValue3(other.getVariationValue3()); + } + if (other.hasVariationValue4()) { + setVariationValue4(other.getVariationValue4()); + } + if (other.hasVariationValue5()) { + setVariationValue5(other.getVariationValue5()); + } + if (other.hasPersonId()) { + setPersonId(other.getPersonId()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Issue.class, org.sonar.batch.protocol.output.BatchReport.Issue.Builder.class); - } + public final boolean isInitialized() { + return true; + } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Issue parsePartialFrom( + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Issue(input, extensionRegistry); + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.Measure parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Measure) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + private int bitField0_; - private int bitField0_; - public static final int RULE_REPOSITORY_FIELD_NUMBER = 1; - private java.lang.Object ruleRepository_; - /** - * optional string rule_repository = 1; - */ - public boolean hasRuleRepository() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string rule_repository = 1; - */ - public java.lang.String getRuleRepository() { - java.lang.Object ref = ruleRepository_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleRepository_ = s; + private org.sonar.batch.protocol.Constants.MeasureValueType valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + /** + * optional .MeasureValueType value_type = 1; + */ + public boolean hasValueType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .MeasureValueType value_type = 1; + */ + public org.sonar.batch.protocol.Constants.MeasureValueType getValueType() { + return valueType_; + } + /** + * optional .MeasureValueType value_type = 1; + */ + public Builder setValueType(org.sonar.batch.protocol.Constants.MeasureValueType value) { + if (value == null) { + throw new NullPointerException(); } - return s; + bitField0_ |= 0x00000001; + valueType_ = value; + onChanged(); + return this; } - } - /** - * optional string rule_repository = 1; - */ - public com.google.protobuf.ByteString - getRuleRepositoryBytes() { - java.lang.Object ref = ruleRepository_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ruleRepository_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * optional .MeasureValueType value_type = 1; + */ + public Builder clearValueType() { + bitField0_ = (bitField0_ & ~0x00000001); + valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT; + onChanged(); + return this; } - } - public static final int RULE_KEY_FIELD_NUMBER = 2; - private java.lang.Object ruleKey_; - /** - * optional string rule_key = 2; - */ - public boolean hasRuleKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string rule_key = 2; - */ - public java.lang.String getRuleKey() { - java.lang.Object ref = ruleKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleKey_ = s; - } - return s; + private boolean booleanValue_ ; + /** + * optional bool boolean_value = 2; + * + *
+       * all values may be unset for "new_xxx" measures (only variations are populated)
+       * 
+ */ + public boolean hasBooleanValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - } - /** - * optional string rule_key = 2; - */ - public com.google.protobuf.ByteString - getRuleKeyBytes() { - java.lang.Object ref = ruleKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ruleKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * optional bool boolean_value = 2; + * + *
+       * all values may be unset for "new_xxx" measures (only variations are populated)
+       * 
+ */ + public boolean getBooleanValue() { + return booleanValue_; + } + /** + * optional bool boolean_value = 2; + * + *
+       * all values may be unset for "new_xxx" measures (only variations are populated)
+       * 
+ */ + public Builder setBooleanValue(boolean value) { + bitField0_ |= 0x00000002; + booleanValue_ = value; + onChanged(); + return this; + } + /** + * optional bool boolean_value = 2; + * + *
+       * all values may be unset for "new_xxx" measures (only variations are populated)
+       * 
+ */ + public Builder clearBooleanValue() { + bitField0_ = (bitField0_ & ~0x00000002); + booleanValue_ = false; + onChanged(); + return this; } - } - public static final int LINE_FIELD_NUMBER = 3; - private int line_; - /** - * optional int32 line = 3; - */ - public boolean hasLine() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 line = 3; - */ - public int getLine() { - return line_; - } + private int intValue_ ; + /** + * optional int32 int_value = 3; + */ + public boolean hasIntValue() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 int_value = 3; + */ + public int getIntValue() { + return intValue_; + } + /** + * optional int32 int_value = 3; + */ + public Builder setIntValue(int value) { + bitField0_ |= 0x00000004; + intValue_ = value; + onChanged(); + return this; + } + /** + * optional int32 int_value = 3; + */ + public Builder clearIntValue() { + bitField0_ = (bitField0_ & ~0x00000004); + intValue_ = 0; + onChanged(); + return this; + } - public static final int MSG_FIELD_NUMBER = 4; - private java.lang.Object msg_; - /** - * optional string msg = 4; - */ - public boolean hasMsg() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional string msg = 4; - */ - public java.lang.String getMsg() { - java.lang.Object ref = msg_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - msg_ = s; - } - return s; + private long longValue_ ; + /** + * optional int64 long_value = 4; + */ + public boolean hasLongValue() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - } - /** - * optional string msg = 4; - */ - public com.google.protobuf.ByteString - getMsgBytes() { - java.lang.Object ref = msg_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - msg_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * optional int64 long_value = 4; + */ + public long getLongValue() { + return longValue_; + } + /** + * optional int64 long_value = 4; + */ + public Builder setLongValue(long value) { + bitField0_ |= 0x00000008; + longValue_ = value; + onChanged(); + return this; + } + /** + * optional int64 long_value = 4; + */ + public Builder clearLongValue() { + bitField0_ = (bitField0_ & ~0x00000008); + longValue_ = 0L; + onChanged(); + return this; } - } - public static final int SEVERITY_FIELD_NUMBER = 5; - private org.sonar.batch.protocol.Constants.Severity severity_; - /** - * optional .Severity severity = 5; - */ - public boolean hasSeverity() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .Severity severity = 5; - */ - public org.sonar.batch.protocol.Constants.Severity getSeverity() { - return severity_; - } + private double doubleValue_ ; + /** + * optional double double_value = 5; + */ + public boolean hasDoubleValue() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional double double_value = 5; + */ + public double getDoubleValue() { + return doubleValue_; + } + /** + * optional double double_value = 5; + */ + public Builder setDoubleValue(double value) { + bitField0_ |= 0x00000010; + doubleValue_ = value; + onChanged(); + return this; + } + /** + * optional double double_value = 5; + */ + public Builder clearDoubleValue() { + bitField0_ = (bitField0_ & ~0x00000010); + doubleValue_ = 0D; + onChanged(); + return this; + } - public static final int TAG_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList tag_; - /** - * repeated string tag = 6; - */ - public com.google.protobuf.ProtocolStringList - getTagList() { - return tag_; - } - /** - * repeated string tag = 6; - */ - public int getTagCount() { - return tag_.size(); - } - /** - * repeated string tag = 6; - */ - public java.lang.String getTag(int index) { - return tag_.get(index); - } - /** - * repeated string tag = 6; - */ - public com.google.protobuf.ByteString - getTagBytes(int index) { - return tag_.getByteString(index); - } - - public static final int EFFORT_TO_FIX_FIELD_NUMBER = 7; - private double effortToFix_; - /** - * optional double effort_to_fix = 7; - */ - public boolean hasEffortToFix() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional double effort_to_fix = 7; - */ - public double getEffortToFix() { - return effortToFix_; - } - - public static final int ATTRIBUTES_FIELD_NUMBER = 8; - private java.lang.Object attributes_; - /** - * optional string attributes = 8; - */ - public boolean hasAttributes() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional string attributes = 8; - */ - public java.lang.String getAttributes() { - java.lang.Object ref = attributes_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - attributes_ = s; + private java.lang.Object stringValue_ = ""; + /** + * optional string string_value = 6; + */ + public boolean hasStringValue() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string string_value = 6; + */ + public java.lang.String getStringValue() { + java.lang.Object ref = stringValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + stringValue_ = s; + } + return s; + } else { + return (java.lang.String) ref; } - return s; } - } - /** - * optional string attributes = 8; - */ - public com.google.protobuf.ByteString - getAttributesBytes() { - java.lang.Object ref = attributes_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributes_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * optional string string_value = 6; + */ + public com.google.protobuf.ByteString + getStringValueBytes() { + java.lang.Object ref = stringValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + stringValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - } - - private void initFields() { - ruleRepository_ = ""; - ruleKey_ = ""; - line_ = 0; - msg_ = ""; - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; - tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; - effortToFix_ = 0D; - attributes_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getRuleRepositoryBytes()); + /** + * optional string string_value = 6; + */ + public Builder setStringValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + stringValue_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getRuleKeyBytes()); + /** + * optional string string_value = 6; + */ + public Builder clearStringValue() { + bitField0_ = (bitField0_ & ~0x00000020); + stringValue_ = getDefaultInstance().getStringValue(); + onChanged(); + return this; } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, line_); + /** + * optional string string_value = 6; + */ + public Builder setStringValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + stringValue_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, getMsgBytes()); + + private java.lang.Object metricKey_ = ""; + /** + * optional string metric_key = 7; + */ + public boolean hasMetricKey() { + return ((bitField0_ & 0x00000040) == 0x00000040); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeEnum(5, severity_.getNumber()); + /** + * optional string metric_key = 7; + */ + public java.lang.String getMetricKey() { + java.lang.Object ref = metricKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + metricKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } - for (int i = 0; i < tag_.size(); i++) { - output.writeBytes(6, tag_.getByteString(i)); + /** + * optional string metric_key = 7; + */ + public com.google.protobuf.ByteString + getMetricKeyBytes() { + java.lang.Object ref = metricKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + metricKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeDouble(7, effortToFix_); + /** + * optional string metric_key = 7; + */ + public Builder setMetricKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + metricKey_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(8, getAttributesBytes()); + /** + * optional string metric_key = 7; + */ + public Builder clearMetricKey() { + bitField0_ = (bitField0_ & ~0x00000040); + metricKey_ = getDefaultInstance().getMetricKey(); + onChanged(); + return this; } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getRuleRepositoryBytes()); + /** + * optional string metric_key = 7; + */ + public Builder setMetricKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + metricKey_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getRuleKeyBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, line_); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getMsgBytes()); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(5, severity_.getNumber()); + + private java.lang.Object description_ = ""; + /** + * optional string description = 9; + * + *
+       * temporary fields during development of computation stack
+       * 
+ */ + public boolean hasDescription() { + return ((bitField0_ & 0x00000080) == 0x00000080); } - { - int dataSize = 0; - for (int i = 0; i < tag_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(tag_.getByteString(i)); + /** + * optional string description = 9; + * + *
+       * temporary fields during development of computation stack
+       * 
+ */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + description_ = s; + } + return s; + } else { + return (java.lang.String) ref; } - size += dataSize; - size += 1 * getTagList().size(); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(7, effortToFix_); + /** + * optional string description = 9; + * + *
+       * temporary fields during development of computation stack
+       * 
+ */ + public com.google.protobuf.ByteString + getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, getAttributesBytes()); + /** + * optional string description = 9; + * + *
+       * temporary fields during development of computation stack
+       * 
+ */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + description_ = value; + onChanged(); + return this; } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Issue prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code Issue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Issue) - org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; + /** + * optional string description = 9; + * + *
+       * temporary fields during development of computation stack
+       * 
+ */ + public Builder clearDescription() { + bitField0_ = (bitField0_ & ~0x00000080); + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Issue.class, org.sonar.batch.protocol.output.BatchReport.Issue.Builder.class); + /** + * optional string description = 9; + * + *
+       * temporary fields during development of computation stack
+       * 
+ */ + public Builder setDescriptionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + description_ = value; + onChanged(); + return this; } - // Construct using org.sonar.batch.protocol.output.BatchReport.Issue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + private double variationValue1_ ; + /** + * optional double variation_value_1 = 14; + */ + public boolean hasVariationValue1() { + return ((bitField0_ & 0x00000100) == 0x00000100); } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + /** + * optional double variation_value_1 = 14; + */ + public double getVariationValue1() { + return variationValue1_; } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } + /** + * optional double variation_value_1 = 14; + */ + public Builder setVariationValue1(double value) { + bitField0_ |= 0x00000100; + variationValue1_ = value; + onChanged(); + return this; } - private static Builder create() { - return new Builder(); + /** + * optional double variation_value_1 = 14; + */ + public Builder clearVariationValue1() { + bitField0_ = (bitField0_ & ~0x00000100); + variationValue1_ = 0D; + onChanged(); + return this; } - public Builder clear() { - super.clear(); - ruleRepository_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - ruleKey_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - line_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - msg_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; - bitField0_ = (bitField0_ & ~0x00000010); - tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - effortToFix_ = 0D; - bitField0_ = (bitField0_ & ~0x00000040); - attributes_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; - } - - public org.sonar.batch.protocol.output.BatchReport.Issue getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance(); - } - - public org.sonar.batch.protocol.output.BatchReport.Issue build() { - org.sonar.batch.protocol.output.BatchReport.Issue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.sonar.batch.protocol.output.BatchReport.Issue buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Issue result = new org.sonar.batch.protocol.output.BatchReport.Issue(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.ruleRepository_ = ruleRepository_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.ruleKey_ = ruleKey_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.line_ = line_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.msg_ = msg_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.severity_ = severity_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - tag_ = tag_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.tag_ = tag_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.effortToFix_ = effortToFix_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.attributes_ = attributes_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Issue) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Issue)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Issue other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()) return this; - if (other.hasRuleRepository()) { - bitField0_ |= 0x00000001; - ruleRepository_ = other.ruleRepository_; - onChanged(); - } - if (other.hasRuleKey()) { - bitField0_ |= 0x00000002; - ruleKey_ = other.ruleKey_; - onChanged(); - } - if (other.hasLine()) { - setLine(other.getLine()); - } - if (other.hasMsg()) { - bitField0_ |= 0x00000008; - msg_ = other.msg_; - onChanged(); - } - if (other.hasSeverity()) { - setSeverity(other.getSeverity()); - } - if (!other.tag_.isEmpty()) { - if (tag_.isEmpty()) { - tag_ = other.tag_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureTagIsMutable(); - tag_.addAll(other.tag_); - } - onChanged(); - } - if (other.hasEffortToFix()) { - setEffortToFix(other.getEffortToFix()); - } - if (other.hasAttributes()) { - bitField0_ |= 0x00000080; - attributes_ = other.attributes_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Issue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Issue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object ruleRepository_ = ""; + private double variationValue2_ ; /** - * optional string rule_repository = 1; + * optional double variation_value_2 = 15; */ - public boolean hasRuleRepository() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public boolean hasVariationValue2() { + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * optional string rule_repository = 1; + * optional double variation_value_2 = 15; */ - public java.lang.String getRuleRepository() { - java.lang.Object ref = ruleRepository_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleRepository_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } + public double getVariationValue2() { + return variationValue2_; } /** - * optional string rule_repository = 1; + * optional double variation_value_2 = 15; */ - public com.google.protobuf.ByteString - getRuleRepositoryBytes() { - java.lang.Object ref = ruleRepository_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ruleRepository_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public Builder setVariationValue2(double value) { + bitField0_ |= 0x00000200; + variationValue2_ = value; + onChanged(); + return this; } /** - * optional string rule_repository = 1; + * optional double variation_value_2 = 15; */ - public Builder setRuleRepository( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - ruleRepository_ = value; + public Builder clearVariationValue2() { + bitField0_ = (bitField0_ & ~0x00000200); + variationValue2_ = 0D; onChanged(); return this; } + + private double variationValue3_ ; /** - * optional string rule_repository = 1; + * optional double variation_value_3 = 16; */ - public Builder clearRuleRepository() { - bitField0_ = (bitField0_ & ~0x00000001); - ruleRepository_ = getDefaultInstance().getRuleRepository(); + public boolean hasVariationValue3() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional double variation_value_3 = 16; + */ + public double getVariationValue3() { + return variationValue3_; + } + /** + * optional double variation_value_3 = 16; + */ + public Builder setVariationValue3(double value) { + bitField0_ |= 0x00000400; + variationValue3_ = value; onChanged(); return this; } /** - * optional string rule_repository = 1; + * optional double variation_value_3 = 16; */ - public Builder setRuleRepositoryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - ruleRepository_ = value; + public Builder clearVariationValue3() { + bitField0_ = (bitField0_ & ~0x00000400); + variationValue3_ = 0D; onChanged(); return this; } - private java.lang.Object ruleKey_ = ""; + private double variationValue4_ ; /** - * optional string rule_key = 2; + * optional double variation_value_4 = 17; */ - public boolean hasRuleKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string rule_key = 2; - */ - public java.lang.String getRuleKey() { - java.lang.Object ref = ruleKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - ruleKey_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string rule_key = 2; - */ - public com.google.protobuf.ByteString - getRuleKeyBytes() { - java.lang.Object ref = ruleKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - ruleKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public boolean hasVariationValue4() { + return ((bitField0_ & 0x00000800) == 0x00000800); } /** - * optional string rule_key = 2; + * optional double variation_value_4 = 17; */ - public Builder setRuleKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - ruleKey_ = value; - onChanged(); - return this; + public double getVariationValue4() { + return variationValue4_; } /** - * optional string rule_key = 2; + * optional double variation_value_4 = 17; */ - public Builder clearRuleKey() { - bitField0_ = (bitField0_ & ~0x00000002); - ruleKey_ = getDefaultInstance().getRuleKey(); + public Builder setVariationValue4(double value) { + bitField0_ |= 0x00000800; + variationValue4_ = value; onChanged(); return this; } /** - * optional string rule_key = 2; + * optional double variation_value_4 = 17; */ - public Builder setRuleKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - ruleKey_ = value; + public Builder clearVariationValue4() { + bitField0_ = (bitField0_ & ~0x00000800); + variationValue4_ = 0D; onChanged(); return this; } - private int line_ ; + private double variationValue5_ ; /** - * optional int32 line = 3; + * optional double variation_value_5 = 18; */ - public boolean hasLine() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public boolean hasVariationValue5() { + return ((bitField0_ & 0x00001000) == 0x00001000); } /** - * optional int32 line = 3; + * optional double variation_value_5 = 18; */ - public int getLine() { - return line_; + public double getVariationValue5() { + return variationValue5_; } /** - * optional int32 line = 3; + * optional double variation_value_5 = 18; */ - public Builder setLine(int value) { - bitField0_ |= 0x00000004; - line_ = value; + public Builder setVariationValue5(double value) { + bitField0_ |= 0x00001000; + variationValue5_ = value; onChanged(); return this; } /** - * optional int32 line = 3; + * optional double variation_value_5 = 18; */ - public Builder clearLine() { - bitField0_ = (bitField0_ & ~0x00000004); - line_ = 0; + public Builder clearVariationValue5() { + bitField0_ = (bitField0_ & ~0x00001000); + variationValue5_ = 0D; onChanged(); return this; } - private java.lang.Object msg_ = ""; - /** - * optional string msg = 4; - */ - public boolean hasMsg() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional string msg = 4; - */ - public java.lang.String getMsg() { - java.lang.Object ref = msg_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - msg_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } + private int personId_ ; /** - * optional string msg = 4; + * optional int32 person_id = 20; */ - public com.google.protobuf.ByteString - getMsgBytes() { - java.lang.Object ref = msg_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - msg_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + public boolean hasPersonId() { + return ((bitField0_ & 0x00002000) == 0x00002000); } /** - * optional string msg = 4; + * optional int32 person_id = 20; */ - public Builder setMsg( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - msg_ = value; - onChanged(); - return this; + public int getPersonId() { + return personId_; } /** - * optional string msg = 4; + * optional int32 person_id = 20; */ - public Builder clearMsg() { - bitField0_ = (bitField0_ & ~0x00000008); - msg_ = getDefaultInstance().getMsg(); + public Builder setPersonId(int value) { + bitField0_ |= 0x00002000; + personId_ = value; onChanged(); return this; } /** - * optional string msg = 4; + * optional int32 person_id = 20; */ - public Builder setMsgBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - msg_ = value; + public Builder clearPersonId() { + bitField0_ = (bitField0_ & ~0x00002000); + personId_ = 0; onChanged(); return this; } - private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; - /** - * optional .Severity severity = 5; - */ - public boolean hasSeverity() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .Severity severity = 5; - */ - public org.sonar.batch.protocol.Constants.Severity getSeverity() { - return severity_; - } - /** - * optional .Severity severity = 5; - */ - public Builder setSeverity(org.sonar.batch.protocol.Constants.Severity value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - severity_ = value; - onChanged(); - return this; - } - /** - * optional .Severity severity = 5; - */ - public Builder clearSeverity() { - bitField0_ = (bitField0_ & ~0x00000010); - severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; - onChanged(); - return this; - } + // @@protoc_insertion_point(builder_scope:Measure) + } - private com.google.protobuf.LazyStringList tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTagIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - tag_ = new com.google.protobuf.LazyStringArrayList(tag_); - bitField0_ |= 0x00000020; - } - } - /** - * repeated string tag = 6; - */ - public com.google.protobuf.ProtocolStringList - getTagList() { - return tag_.getUnmodifiableView(); - } - /** - * repeated string tag = 6; - */ - public int getTagCount() { - return tag_.size(); - } - /** - * repeated string tag = 6; - */ - public java.lang.String getTag(int index) { - return tag_.get(index); - } - /** - * repeated string tag = 6; - */ - public com.google.protobuf.ByteString - getTagBytes(int index) { - return tag_.getByteString(index); - } - /** - * repeated string tag = 6; - */ - public Builder setTag( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + static { + defaultInstance = new Measure(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:Measure) } - ensureTagIsMutable(); - tag_.set(index, value); - onChanged(); - return this; - } - /** - * repeated string tag = 6; - */ - public Builder addTag( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagIsMutable(); - tag_.add(value); - onChanged(); - return this; - } - /** - * repeated string tag = 6; - */ - public Builder addAllTag( - java.lang.Iterable values) { - ensureTagIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tag_); - onChanged(); - return this; - } - /** - * repeated string tag = 6; - */ - public Builder clearTag() { - tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * repeated string tag = 6; - */ - public Builder addTagBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagIsMutable(); - tag_.add(value); - onChanged(); - return this; - } - private double effortToFix_ ; - /** - * optional double effort_to_fix = 7; - */ - public boolean hasEffortToFix() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional double effort_to_fix = 7; - */ - public double getEffortToFix() { - return effortToFix_; - } - /** - * optional double effort_to_fix = 7; - */ - public Builder setEffortToFix(double value) { - bitField0_ |= 0x00000040; - effortToFix_ = value; - onChanged(); - return this; - } - /** - * optional double effort_to_fix = 7; - */ - public Builder clearEffortToFix() { - bitField0_ = (bitField0_ & ~0x00000040); - effortToFix_ = 0D; - onChanged(); - return this; - } + public interface IssueOrBuilder extends + // @@protoc_insertion_point(interface_extends:Issue) + com.google.protobuf.MessageOrBuilder { - private java.lang.Object attributes_ = ""; - /** - * optional string attributes = 8; - */ - public boolean hasAttributes() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional string attributes = 8; - */ - public java.lang.String getAttributes() { - java.lang.Object ref = attributes_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - attributes_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string attributes = 8; - */ - public com.google.protobuf.ByteString - getAttributesBytes() { - java.lang.Object ref = attributes_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributes_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string attributes = 8; - */ - public Builder setAttributes( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - attributes_ = value; - onChanged(); - return this; - } - /** - * optional string attributes = 8; - */ - public Builder clearAttributes() { - bitField0_ = (bitField0_ & ~0x00000080); - attributes_ = getDefaultInstance().getAttributes(); - onChanged(); - return this; - } - /** - * optional string attributes = 8; - */ - public Builder setAttributesBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - attributes_ = value; - onChanged(); - return this; - } + /** + * optional string rule_repository = 1; + */ + boolean hasRuleRepository(); + /** + * optional string rule_repository = 1; + */ + java.lang.String getRuleRepository(); + /** + * optional string rule_repository = 1; + */ + com.google.protobuf.ByteString + getRuleRepositoryBytes(); - // @@protoc_insertion_point(builder_scope:Issue) - } + /** + * optional string rule_key = 2; + */ + boolean hasRuleKey(); + /** + * optional string rule_key = 2; + */ + java.lang.String getRuleKey(); + /** + * optional string rule_key = 2; + */ + com.google.protobuf.ByteString + getRuleKeyBytes(); - static { - defaultInstance = new Issue(true); - defaultInstance.initFields(); - } + /** + * optional int32 line = 3; + */ + boolean hasLine(); + /** + * optional int32 line = 3; + */ + int getLine(); - // @@protoc_insertion_point(class_scope:Issue) - } + /** + * optional string msg = 4; + */ + boolean hasMsg(); + /** + * optional string msg = 4; + */ + java.lang.String getMsg(); + /** + * optional string msg = 4; + */ + com.google.protobuf.ByteString + getMsgBytes(); - public interface IssuesOrBuilder extends - // @@protoc_insertion_point(interface_extends:Issues) - com.google.protobuf.MessageOrBuilder { + /** + * optional .Severity severity = 5; + */ + boolean hasSeverity(); + /** + * optional .Severity severity = 5; + */ + org.sonar.batch.protocol.Constants.Severity getSeverity(); /** - * optional int32 component_ref = 1; + * repeated string tag = 6; */ - boolean hasComponentRef(); + com.google.protobuf.ProtocolStringList + getTagList(); /** - * optional int32 component_ref = 1; + * repeated string tag = 6; */ - int getComponentRef(); + int getTagCount(); + /** + * repeated string tag = 6; + */ + java.lang.String getTag(int index); + /** + * repeated string tag = 6; + */ + com.google.protobuf.ByteString + getTagBytes(int index); /** - * repeated .Issue issue = 2; + * optional double effort_to_fix = 7; */ - java.util.List - getIssueList(); + boolean hasEffortToFix(); /** - * repeated .Issue issue = 2; + * optional double effort_to_fix = 7; */ - org.sonar.batch.protocol.output.BatchReport.Issue getIssue(int index); + double getEffortToFix(); + /** - * repeated .Issue issue = 2; + * optional string attributes = 8; */ - int getIssueCount(); + boolean hasAttributes(); /** - * repeated .Issue issue = 2; + * optional string attributes = 8; */ - java.util.List - getIssueOrBuilderList(); + java.lang.String getAttributes(); /** - * repeated .Issue issue = 2; + * optional string attributes = 8; */ - org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder getIssueOrBuilder( - int index); + com.google.protobuf.ByteString + getAttributesBytes(); } /** - * Protobuf type {@code Issues} - * - *
-   * TODO to be removed. It prevents streaming 
-   * 
+ * Protobuf type {@code Issue} */ - public static final class Issues extends + public static final class Issue extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Issues) - IssuesOrBuilder { - // Use Issues.newBuilder() to construct. - private Issues(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:Issue) + IssueOrBuilder { + // Use Issue.newBuilder() to construct. + private Issue(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Issues(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private Issue(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Issues defaultInstance; - public static Issues getDefaultInstance() { + private static final Issue defaultInstance; + public static Issue getDefaultInstance() { return defaultInstance; } - public Issues getDefaultInstanceForType() { + public Issue getDefaultInstanceForType() { return defaultInstance; } @@ -7933,7 +7296,7 @@ public final class BatchReport { getUnknownFields() { return this.unknownFields; } - private Issues( + private Issue( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7956,1672 +7319,354 @@ public final class BatchReport { } break; } - case 8: { + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - componentRef_ = input.readInt32(); + ruleRepository_ = bs; break; } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - issue_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + ruleKey_ = bs; + break; + } + case 24: { + bitField0_ |= 0x00000004; + line_ = input.readInt32(); + break; + } + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000008; + msg_ = bs; + break; + } + case 40: { + int rawValue = input.readEnum(); + org.sonar.batch.protocol.Constants.Severity value = org.sonar.batch.protocol.Constants.Severity.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(5, rawValue); + } else { + bitField0_ |= 0x00000010; + severity_ = value; } - issue_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Issue.PARSER, extensionRegistry)); + break; + } + case 50: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + tag_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000020; + } + tag_.add(bs); + break; + } + case 57: { + bitField0_ |= 0x00000020; + effortToFix_ = input.readDouble(); + break; + } + case 66: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000040; + attributes_ = bs; break; } } } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - issue_ = java.util.Collections.unmodifiableList(issue_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Issues.class, org.sonar.batch.protocol.output.BatchReport.Issues.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Issues parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Issues(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int COMPONENT_REF_FIELD_NUMBER = 1; - private int componentRef_; - /** - * optional int32 component_ref = 1; - */ - public boolean hasComponentRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 component_ref = 1; - */ - public int getComponentRef() { - return componentRef_; - } - - public static final int ISSUE_FIELD_NUMBER = 2; - private java.util.List issue_; - /** - * repeated .Issue issue = 2; - */ - public java.util.List getIssueList() { - return issue_; - } - /** - * repeated .Issue issue = 2; - */ - public java.util.List - getIssueOrBuilderList() { - return issue_; - } - /** - * repeated .Issue issue = 2; - */ - public int getIssueCount() { - return issue_.size(); - } - /** - * repeated .Issue issue = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Issue getIssue(int index) { - return issue_.get(index); - } - /** - * repeated .Issue issue = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder getIssueOrBuilder( - int index) { - return issue_.get(index); - } - - private void initFields() { - componentRef_ = 0; - issue_ = java.util.Collections.emptyList(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, componentRef_); - } - for (int i = 0; i < issue_.size(); i++) { - output.writeMessage(2, issue_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, componentRef_); - } - for (int i = 0; i < issue_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, issue_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Issues parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Issues prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code Issues} - * - *
-     * TODO to be removed. It prevents streaming 
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Issues) - org.sonar.batch.protocol.output.BatchReport.IssuesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Issues.class, org.sonar.batch.protocol.output.BatchReport.Issues.Builder.class); - } - - // Construct using org.sonar.batch.protocol.output.BatchReport.Issues.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getIssueFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - componentRef_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - if (issueBuilder_ == null) { - issue_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - issueBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_descriptor; - } - - public org.sonar.batch.protocol.output.BatchReport.Issues getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Issues.getDefaultInstance(); - } - - public org.sonar.batch.protocol.output.BatchReport.Issues build() { - org.sonar.batch.protocol.output.BatchReport.Issues result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.sonar.batch.protocol.output.BatchReport.Issues buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Issues result = new org.sonar.batch.protocol.output.BatchReport.Issues(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.componentRef_ = componentRef_; - if (issueBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - issue_ = java.util.Collections.unmodifiableList(issue_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.issue_ = issue_; - } else { - result.issue_ = issueBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Issues) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Issues)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Issues other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Issues.getDefaultInstance()) return this; - if (other.hasComponentRef()) { - setComponentRef(other.getComponentRef()); - } - if (issueBuilder_ == null) { - if (!other.issue_.isEmpty()) { - if (issue_.isEmpty()) { - issue_ = other.issue_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureIssueIsMutable(); - issue_.addAll(other.issue_); - } - onChanged(); - } - } else { - if (!other.issue_.isEmpty()) { - if (issueBuilder_.isEmpty()) { - issueBuilder_.dispose(); - issueBuilder_ = null; - issue_ = other.issue_; - bitField0_ = (bitField0_ & ~0x00000002); - issueBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getIssueFieldBuilder() : null; - } else { - issueBuilder_.addAllMessages(other.issue_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Issues parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Issues) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int componentRef_ ; - /** - * optional int32 component_ref = 1; - */ - public boolean hasComponentRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional int32 component_ref = 1; - */ - public int getComponentRef() { - return componentRef_; - } - /** - * optional int32 component_ref = 1; - */ - public Builder setComponentRef(int value) { - bitField0_ |= 0x00000001; - componentRef_ = value; - onChanged(); - return this; - } - /** - * optional int32 component_ref = 1; - */ - public Builder clearComponentRef() { - bitField0_ = (bitField0_ & ~0x00000001); - componentRef_ = 0; - onChanged(); - return this; - } - - private java.util.List issue_ = - java.util.Collections.emptyList(); - private void ensureIssueIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - issue_ = new java.util.ArrayList(issue_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Issue, org.sonar.batch.protocol.output.BatchReport.Issue.Builder, org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder> issueBuilder_; - - /** - * repeated .Issue issue = 2; - */ - public java.util.List getIssueList() { - if (issueBuilder_ == null) { - return java.util.Collections.unmodifiableList(issue_); - } else { - return issueBuilder_.getMessageList(); - } - } - /** - * repeated .Issue issue = 2; - */ - public int getIssueCount() { - if (issueBuilder_ == null) { - return issue_.size(); - } else { - return issueBuilder_.getCount(); - } - } - /** - * repeated .Issue issue = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Issue getIssue(int index) { - if (issueBuilder_ == null) { - return issue_.get(index); - } else { - return issueBuilder_.getMessage(index); - } - } - /** - * repeated .Issue issue = 2; - */ - public Builder setIssue( - int index, org.sonar.batch.protocol.output.BatchReport.Issue value) { - if (issueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIssueIsMutable(); - issue_.set(index, value); - onChanged(); - } else { - issueBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public Builder setIssue( - int index, org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { - if (issueBuilder_ == null) { - ensureIssueIsMutable(); - issue_.set(index, builderForValue.build()); - onChanged(); - } else { - issueBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public Builder addIssue(org.sonar.batch.protocol.output.BatchReport.Issue value) { - if (issueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIssueIsMutable(); - issue_.add(value); - onChanged(); - } else { - issueBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public Builder addIssue( - int index, org.sonar.batch.protocol.output.BatchReport.Issue value) { - if (issueBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIssueIsMutable(); - issue_.add(index, value); - onChanged(); - } else { - issueBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public Builder addIssue( - org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { - if (issueBuilder_ == null) { - ensureIssueIsMutable(); - issue_.add(builderForValue.build()); - onChanged(); - } else { - issueBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public Builder addIssue( - int index, org.sonar.batch.protocol.output.BatchReport.Issue.Builder builderForValue) { - if (issueBuilder_ == null) { - ensureIssueIsMutable(); - issue_.add(index, builderForValue.build()); - onChanged(); - } else { - issueBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public Builder addAllIssue( - java.lang.Iterable values) { - if (issueBuilder_ == null) { - ensureIssueIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, issue_); - onChanged(); - } else { - issueBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public Builder clearIssue() { - if (issueBuilder_ == null) { - issue_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - issueBuilder_.clear(); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public Builder removeIssue(int index) { - if (issueBuilder_ == null) { - ensureIssueIsMutable(); - issue_.remove(index); - onChanged(); - } else { - issueBuilder_.remove(index); - } - return this; - } - /** - * repeated .Issue issue = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Issue.Builder getIssueBuilder( - int index) { - return getIssueFieldBuilder().getBuilder(index); - } - /** - * repeated .Issue issue = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder getIssueOrBuilder( - int index) { - if (issueBuilder_ == null) { - return issue_.get(index); } else { - return issueBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .Issue issue = 2; - */ - public java.util.List - getIssueOrBuilderList() { - if (issueBuilder_ != null) { - return issueBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(issue_); - } - } - /** - * repeated .Issue issue = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Issue.Builder addIssueBuilder() { - return getIssueFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()); - } - /** - * repeated .Issue issue = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Issue.Builder addIssueBuilder( - int index) { - return getIssueFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()); - } - /** - * repeated .Issue issue = 2; - */ - public java.util.List - getIssueBuilderList() { - return getIssueFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Issue, org.sonar.batch.protocol.output.BatchReport.Issue.Builder, org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder> - getIssueFieldBuilder() { - if (issueBuilder_ == null) { - issueBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Issue, org.sonar.batch.protocol.output.BatchReport.Issue.Builder, org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder>( - issue_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - issue_ = null; - } - return issueBuilder_; - } - - // @@protoc_insertion_point(builder_scope:Issues) - } - - static { - defaultInstance = new Issues(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:Issues) - } - - public interface ChangesetsOrBuilder extends - // @@protoc_insertion_point(interface_extends:Changesets) - com.google.protobuf.MessageOrBuilder { - - /** - * optional int32 component_ref = 1; - */ - boolean hasComponentRef(); - /** - * optional int32 component_ref = 1; - */ - int getComponentRef(); - - /** - * repeated .Changesets.Changeset changeset = 2; - */ - java.util.List - getChangesetList(); - /** - * repeated .Changesets.Changeset changeset = 2; - */ - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getChangeset(int index); - /** - * repeated .Changesets.Changeset changeset = 2; - */ - int getChangesetCount(); - /** - * repeated .Changesets.Changeset changeset = 2; - */ - java.util.List - getChangesetOrBuilderList(); - /** - * repeated .Changesets.Changeset changeset = 2; - */ - org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder getChangesetOrBuilder( - int index); - - /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-     * 
- */ - java.util.List getChangesetIndexByLineList(); - /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-     * 
- */ - int getChangesetIndexByLineCount(); - /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-     * 
- */ - int getChangesetIndexByLine(int index); - } - /** - * Protobuf type {@code Changesets} - */ - public static final class Changesets extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Changesets) - ChangesetsOrBuilder { - // Use Changesets.newBuilder() to construct. - private Changesets(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Changesets(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Changesets defaultInstance; - public static Changesets getDefaultInstance() { - return defaultInstance; - } - - public Changesets getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Changesets( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - componentRef_ = input.readInt32(); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - changeset_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - changeset_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.PARSER, extensionRegistry)); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - changesetIndexByLine_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - changesetIndexByLine_.add(input.readInt32()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { - changesetIndexByLine_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - changesetIndexByLine_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - changeset_ = java.util.Collections.unmodifiableList(changeset_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - changesetIndexByLine_ = java.util.Collections.unmodifiableList(changesetIndexByLine_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Changesets.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Changesets parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Changesets(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public interface ChangesetOrBuilder extends - // @@protoc_insertion_point(interface_extends:Changesets.Changeset) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string revision = 1; - */ - boolean hasRevision(); - /** - * optional string revision = 1; - */ - java.lang.String getRevision(); - /** - * optional string revision = 1; - */ - com.google.protobuf.ByteString - getRevisionBytes(); - - /** - * optional string author = 2; - */ - boolean hasAuthor(); - /** - * optional string author = 2; - */ - java.lang.String getAuthor(); - /** - * optional string author = 2; - */ - com.google.protobuf.ByteString - getAuthorBytes(); - - /** - * optional int64 date = 3; - */ - boolean hasDate(); - /** - * optional int64 date = 3; - */ - long getDate(); - } - /** - * Protobuf type {@code Changesets.Changeset} - */ - public static final class Changeset extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Changesets.Changeset) - ChangesetOrBuilder { - // Use Changeset.newBuilder() to construct. - private Changeset(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Changeset(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Changeset defaultInstance; - public static Changeset getDefaultInstance() { - return defaultInstance; - } - - public Changeset getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Changeset( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000001; - revision_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - author_ = bs; - break; - } - case 24: { - bitField0_ |= 0x00000004; - date_ = input.readInt64(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Changeset parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Changeset(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int REVISION_FIELD_NUMBER = 1; - private java.lang.Object revision_; - /** - * optional string revision = 1; - */ - public boolean hasRevision() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string revision = 1; - */ - public java.lang.String getRevision() { - java.lang.Object ref = revision_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - revision_ = s; - } - return s; - } - } - /** - * optional string revision = 1; - */ - public com.google.protobuf.ByteString - getRevisionBytes() { - java.lang.Object ref = revision_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revision_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int AUTHOR_FIELD_NUMBER = 2; - private java.lang.Object author_; - /** - * optional string author = 2; - */ - public boolean hasAuthor() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string author = 2; - */ - public java.lang.String getAuthor() { - java.lang.Object ref = author_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - author_ = s; - } - return s; - } - } - /** - * optional string author = 2; - */ - public com.google.protobuf.ByteString - getAuthorBytes() { - java.lang.Object ref = author_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - author_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DATE_FIELD_NUMBER = 3; - private long date_; - /** - * optional int64 date = 3; - */ - public boolean hasDate() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int64 date = 3; - */ - public long getDate() { - return date_; - } - - private void initFields() { - revision_ = ""; - author_ = ""; - date_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getRevisionBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getAuthorBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt64(3, date_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getRevisionBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getAuthorBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, date_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code Changesets.Changeset} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Changesets.Changeset) - org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder.class); - } - - // Construct using org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - revision_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - author_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - date_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_descriptor; - } - - public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.getDefaultInstance(); - } - - public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset build() { - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset result = new org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.revision_ = revision_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.author_ = author_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.date_ = date_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.getDefaultInstance()) return this; - if (other.hasRevision()) { - bitField0_ |= 0x00000001; - revision_ = other.revision_; - onChanged(); - } - if (other.hasAuthor()) { - bitField0_ |= 0x00000002; - author_ = other.author_; - onChanged(); - } - if (other.hasDate()) { - setDate(other.getDate()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object revision_ = ""; - /** - * optional string revision = 1; - */ - public boolean hasRevision() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string revision = 1; - */ - public java.lang.String getRevision() { - java.lang.Object ref = revision_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - revision_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string revision = 1; - */ - public com.google.protobuf.ByteString - getRevisionBytes() { - java.lang.Object ref = revision_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - revision_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string revision = 1; - */ - public Builder setRevision( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - revision_ = value; - onChanged(); - return this; - } - /** - * optional string revision = 1; - */ - public Builder clearRevision() { - bitField0_ = (bitField0_ & ~0x00000001); - revision_ = getDefaultInstance().getRevision(); - onChanged(); - return this; - } - /** - * optional string revision = 1; - */ - public Builder setRevisionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - revision_ = value; - onChanged(); - return this; - } - - private java.lang.Object author_ = ""; - /** - * optional string author = 2; - */ - public boolean hasAuthor() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string author = 2; - */ - public java.lang.String getAuthor() { - java.lang.Object ref = author_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - author_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string author = 2; - */ - public com.google.protobuf.ByteString - getAuthorBytes() { - java.lang.Object ref = author_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - author_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string author = 2; - */ - public Builder setAuthor( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - author_ = value; - onChanged(); - return this; - } - /** - * optional string author = 2; - */ - public Builder clearAuthor() { - bitField0_ = (bitField0_ & ~0x00000002); - author_ = getDefaultInstance().getAuthor(); - onChanged(); - return this; - } - /** - * optional string author = 2; - */ - public Builder setAuthorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - author_ = value; - onChanged(); - return this; + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + tag_ = tag_.getUnmodifiableView(); } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; + } - private long date_ ; - /** - * optional int64 date = 3; - */ - public boolean hasDate() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int64 date = 3; - */ - public long getDate() { - return date_; - } - /** - * optional int64 date = 3; - */ - public Builder setDate(long value) { - bitField0_ |= 0x00000004; - date_ = value; - onChanged(); - return this; - } - /** - * optional int64 date = 3; - */ - public Builder clearDate() { - bitField0_ = (bitField0_ & ~0x00000004); - date_ = 0L; - onChanged(); - return this; - } + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Issue.class, org.sonar.batch.protocol.output.BatchReport.Issue.Builder.class); + } - // @@protoc_insertion_point(builder_scope:Changesets.Changeset) + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Issue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Issue(input, extensionRegistry); } + }; - static { - defaultInstance = new Changeset(true); - defaultInstance.initFields(); + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int RULE_REPOSITORY_FIELD_NUMBER = 1; + private java.lang.Object ruleRepository_; + /** + * optional string rule_repository = 1; + */ + public boolean hasRuleRepository() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string rule_repository = 1; + */ + public java.lang.String getRuleRepository() { + java.lang.Object ref = ruleRepository_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleRepository_ = s; + } + return s; + } + } + /** + * optional string rule_repository = 1; + */ + public com.google.protobuf.ByteString + getRuleRepositoryBytes() { + java.lang.Object ref = ruleRepository_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ruleRepository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - // @@protoc_insertion_point(class_scope:Changesets.Changeset) + public static final int RULE_KEY_FIELD_NUMBER = 2; + private java.lang.Object ruleKey_; + /** + * optional string rule_key = 2; + */ + public boolean hasRuleKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string rule_key = 2; + */ + public java.lang.String getRuleKey() { + java.lang.Object ref = ruleKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleKey_ = s; + } + return s; + } + } + /** + * optional string rule_key = 2; + */ + public com.google.protobuf.ByteString + getRuleKeyBytes() { + java.lang.Object ref = ruleKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ruleKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - private int bitField0_; - public static final int COMPONENT_REF_FIELD_NUMBER = 1; - private int componentRef_; + public static final int LINE_FIELD_NUMBER = 3; + private int line_; + /** + * optional int32 line = 3; + */ + public boolean hasLine() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 line = 3; + */ + public int getLine() { + return line_; + } + + public static final int MSG_FIELD_NUMBER = 4; + private java.lang.Object msg_; + /** + * optional string msg = 4; + */ + public boolean hasMsg() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string msg = 4; + */ + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + msg_ = s; + } + return s; + } + } + /** + * optional string msg = 4; + */ + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 5; + private org.sonar.batch.protocol.Constants.Severity severity_; /** - * optional int32 component_ref = 1; + * optional .Severity severity = 5; */ - public boolean hasComponentRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public boolean hasSeverity() { + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional int32 component_ref = 1; + * optional .Severity severity = 5; */ - public int getComponentRef() { - return componentRef_; + public org.sonar.batch.protocol.Constants.Severity getSeverity() { + return severity_; } - public static final int CHANGESET_FIELD_NUMBER = 2; - private java.util.List changeset_; + public static final int TAG_FIELD_NUMBER = 6; + private com.google.protobuf.LazyStringList tag_; /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public java.util.List getChangesetList() { - return changeset_; + public com.google.protobuf.ProtocolStringList + getTagList() { + return tag_; } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public java.util.List - getChangesetOrBuilderList() { - return changeset_; + public int getTagCount() { + return tag_.size(); } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public int getChangesetCount() { - return changeset_.size(); + public java.lang.String getTag(int index) { + return tag_.get(index); } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getChangeset(int index) { - return changeset_.get(index); + public com.google.protobuf.ByteString + getTagBytes(int index) { + return tag_.getByteString(index); + } + + public static final int EFFORT_TO_FIX_FIELD_NUMBER = 7; + private double effortToFix_; + /** + * optional double effort_to_fix = 7; + */ + public boolean hasEffortToFix() { + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * repeated .Changesets.Changeset changeset = 2; + * optional double effort_to_fix = 7; */ - public org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder getChangesetOrBuilder( - int index) { - return changeset_.get(index); + public double getEffortToFix() { + return effortToFix_; } - public static final int CHANGESETINDEXBYLINE_FIELD_NUMBER = 3; - private java.util.List changesetIndexByLine_; + public static final int ATTRIBUTES_FIELD_NUMBER = 8; + private java.lang.Object attributes_; /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-     * 
+ * optional string attributes = 8; */ - public java.util.List - getChangesetIndexByLineList() { - return changesetIndexByLine_; + public boolean hasAttributes() { + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-     * 
+ * optional string attributes = 8; */ - public int getChangesetIndexByLineCount() { - return changesetIndexByLine_.size(); + public java.lang.String getAttributes() { + java.lang.Object ref = attributes_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + attributes_ = s; + } + return s; + } } /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-     * 
+ * optional string attributes = 8; */ - public int getChangesetIndexByLine(int index) { - return changesetIndexByLine_.get(index); + public com.google.protobuf.ByteString + getAttributesBytes() { + java.lang.Object ref = attributes_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - private int changesetIndexByLineMemoizedSerializedSize = -1; private void initFields() { - componentRef_ = 0; - changeset_ = java.util.Collections.emptyList(); - changesetIndexByLine_ = java.util.Collections.emptyList(); + ruleRepository_ = ""; + ruleKey_ = ""; + line_ = 0; + msg_ = ""; + severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; + effortToFix_ = 0D; + attributes_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -9637,17 +7682,28 @@ public final class BatchReport { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, componentRef_); + output.writeBytes(1, getRuleRepositoryBytes()); } - for (int i = 0; i < changeset_.size(); i++) { - output.writeMessage(2, changeset_.get(i)); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getRuleKeyBytes()); } - if (getChangesetIndexByLineList().size() > 0) { - output.writeRawVarint32(26); - output.writeRawVarint32(changesetIndexByLineMemoizedSerializedSize); + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, line_); } - for (int i = 0; i < changesetIndexByLine_.size(); i++) { - output.writeInt32NoTag(changesetIndexByLine_.get(i)); + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getMsgBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeEnum(5, severity_.getNumber()); + } + for (int i = 0; i < tag_.size(); i++) { + output.writeBytes(6, tag_.getByteString(i)); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeDouble(7, effortToFix_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBytes(8, getAttributesBytes()); } getUnknownFields().writeTo(output); } @@ -9660,25 +7716,40 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, componentRef_); + .computeBytesSize(1, getRuleRepositoryBytes()); } - for (int i = 0; i < changeset_.size(); i++) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, changeset_.get(i)); + .computeBytesSize(2, getRuleKeyBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, line_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getMsgBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(5, severity_.getNumber()); } { int dataSize = 0; - for (int i = 0; i < changesetIndexByLine_.size(); i++) { + for (int i = 0; i < tag_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(changesetIndexByLine_.get(i)); + .computeBytesSizeNoTag(tag_.getByteString(i)); } size += dataSize; - if (!getChangesetIndexByLineList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - changesetIndexByLineMemoizedSerializedSize = dataSize; + size += 1 * getTagList().size(); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(7, effortToFix_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, getAttributesBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -9692,53 +7763,53 @@ public final class BatchReport { return super.writeReplace(); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom(byte[] data) + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Issue parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseDelimitedFrom( + public static org.sonar.batch.protocol.output.BatchReport.Issue parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Issue parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9747,7 +7818,7 @@ public final class BatchReport { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Changesets prototype) { + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Issue prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -9759,25 +7830,25 @@ public final class BatchReport { return builder; } /** - * Protobuf type {@code Changesets} + * Protobuf type {@code Issue} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Changesets) - org.sonar.batch.protocol.output.BatchReport.ChangesetsOrBuilder { + // @@protoc_insertion_point(builder_implements:Issue) + org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Changesets.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Issue.class, org.sonar.batch.protocol.output.BatchReport.Issue.Builder.class); } - // Construct using org.sonar.batch.protocol.output.BatchReport.Changesets.newBuilder() + // Construct using org.sonar.batch.protocol.output.BatchReport.Issue.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -9789,7 +7860,6 @@ public final class BatchReport { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getChangesetFieldBuilder(); } } private static Builder create() { @@ -9798,16 +7868,22 @@ public final class BatchReport { public Builder clear() { super.clear(); - componentRef_ = 0; + ruleRepository_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - if (changesetBuilder_ == null) { - changeset_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - changesetBuilder_.clear(); - } - changesetIndexByLine_ = java.util.Collections.emptyList(); + ruleKey_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + line_ = 0; bitField0_ = (bitField0_ & ~0x00000004); + msg_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + bitField0_ = (bitField0_ & ~0x00000010); + tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + effortToFix_ = 0D; + bitField0_ = (bitField0_ & ~0x00000040); + attributes_ = ""; + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -9817,1565 +7893,1641 @@ public final class BatchReport { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor; } - public org.sonar.batch.protocol.output.BatchReport.Changesets getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Changesets.getDefaultInstance(); + public org.sonar.batch.protocol.output.BatchReport.Issue getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance(); } - public org.sonar.batch.protocol.output.BatchReport.Changesets build() { - org.sonar.batch.protocol.output.BatchReport.Changesets result = buildPartial(); + public org.sonar.batch.protocol.output.BatchReport.Issue build() { + org.sonar.batch.protocol.output.BatchReport.Issue result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.batch.protocol.output.BatchReport.Changesets buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Changesets result = new org.sonar.batch.protocol.output.BatchReport.Changesets(this); + public org.sonar.batch.protocol.output.BatchReport.Issue buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Issue result = new org.sonar.batch.protocol.output.BatchReport.Issue(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.componentRef_ = componentRef_; - if (changesetBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - changeset_ = java.util.Collections.unmodifiableList(changeset_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.changeset_ = changeset_; - } else { - result.changeset_ = changesetBuilder_.build(); + result.ruleRepository_ = ruleRepository_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - changesetIndexByLine_ = java.util.Collections.unmodifiableList(changesetIndexByLine_); - bitField0_ = (bitField0_ & ~0x00000004); + result.ruleKey_ = ruleKey_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; } - result.changesetIndexByLine_ = changesetIndexByLine_; + result.line_ = line_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.msg_ = msg_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.severity_ = severity_; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + tag_ = tag_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.tag_ = tag_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.effortToFix_ = effortToFix_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000040; + } + result.attributes_ = attributes_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Changesets) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Changesets)other); + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Issue) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Issue)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Changesets other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Changesets.getDefaultInstance()) return this; - if (other.hasComponentRef()) { - setComponentRef(other.getComponentRef()); + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Issue other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Issue.getDefaultInstance()) return this; + if (other.hasRuleRepository()) { + bitField0_ |= 0x00000001; + ruleRepository_ = other.ruleRepository_; + onChanged(); } - if (changesetBuilder_ == null) { - if (!other.changeset_.isEmpty()) { - if (changeset_.isEmpty()) { - changeset_ = other.changeset_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureChangesetIsMutable(); - changeset_.addAll(other.changeset_); - } - onChanged(); - } - } else { - if (!other.changeset_.isEmpty()) { - if (changesetBuilder_.isEmpty()) { - changesetBuilder_.dispose(); - changesetBuilder_ = null; - changeset_ = other.changeset_; - bitField0_ = (bitField0_ & ~0x00000002); - changesetBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getChangesetFieldBuilder() : null; - } else { - changesetBuilder_.addAllMessages(other.changeset_); - } - } + if (other.hasRuleKey()) { + bitField0_ |= 0x00000002; + ruleKey_ = other.ruleKey_; + onChanged(); } - if (!other.changesetIndexByLine_.isEmpty()) { - if (changesetIndexByLine_.isEmpty()) { - changesetIndexByLine_ = other.changesetIndexByLine_; - bitField0_ = (bitField0_ & ~0x00000004); + if (other.hasLine()) { + setLine(other.getLine()); + } + if (other.hasMsg()) { + bitField0_ |= 0x00000008; + msg_ = other.msg_; + onChanged(); + } + if (other.hasSeverity()) { + setSeverity(other.getSeverity()); + } + if (!other.tag_.isEmpty()) { + if (tag_.isEmpty()) { + tag_ = other.tag_; + bitField0_ = (bitField0_ & ~0x00000020); } else { - ensureChangesetIndexByLineIsMutable(); - changesetIndexByLine_.addAll(other.changesetIndexByLine_); + ensureTagIsMutable(); + tag_.addAll(other.tag_); } onChanged(); } - this.mergeUnknownFields(other.getUnknownFields()); + if (other.hasEffortToFix()) { + setEffortToFix(other.getEffortToFix()); + } + if (other.hasAttributes()) { + bitField0_ |= 0x00000080; + attributes_ = other.attributes_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.Issue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Issue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object ruleRepository_ = ""; + /** + * optional string rule_repository = 1; + */ + public boolean hasRuleRepository() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string rule_repository = 1; + */ + public java.lang.String getRuleRepository() { + java.lang.Object ref = ruleRepository_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleRepository_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string rule_repository = 1; + */ + public com.google.protobuf.ByteString + getRuleRepositoryBytes() { + java.lang.Object ref = ruleRepository_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ruleRepository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string rule_repository = 1; + */ + public Builder setRuleRepository( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + ruleRepository_ = value; + onChanged(); + return this; + } + /** + * optional string rule_repository = 1; + */ + public Builder clearRuleRepository() { + bitField0_ = (bitField0_ & ~0x00000001); + ruleRepository_ = getDefaultInstance().getRuleRepository(); + onChanged(); + return this; + } + /** + * optional string rule_repository = 1; + */ + public Builder setRuleRepositoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + ruleRepository_ = value; + onChanged(); + return this; + } + + private java.lang.Object ruleKey_ = ""; + /** + * optional string rule_key = 2; + */ + public boolean hasRuleKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string rule_key = 2; + */ + public java.lang.String getRuleKey() { + java.lang.Object ref = ruleKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + ruleKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string rule_key = 2; + */ + public com.google.protobuf.ByteString + getRuleKeyBytes() { + java.lang.Object ref = ruleKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ruleKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string rule_key = 2; + */ + public Builder setRuleKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + ruleKey_ = value; + onChanged(); return this; } - - public final boolean isInitialized() { - return true; + /** + * optional string rule_key = 2; + */ + public Builder clearRuleKey() { + bitField0_ = (bitField0_ & ~0x00000002); + ruleKey_ = getDefaultInstance().getRuleKey(); + onChanged(); + return this; } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Changesets parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Changesets) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + /** + * optional string rule_key = 2; + */ + public Builder setRuleKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + ruleKey_ = value; + onChanged(); return this; } - private int bitField0_; - private int componentRef_ ; + private int line_ ; /** - * optional int32 component_ref = 1; + * optional int32 line = 3; */ - public boolean hasComponentRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public boolean hasLine() { + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional int32 component_ref = 1; + * optional int32 line = 3; */ - public int getComponentRef() { - return componentRef_; + public int getLine() { + return line_; } /** - * optional int32 component_ref = 1; + * optional int32 line = 3; */ - public Builder setComponentRef(int value) { - bitField0_ |= 0x00000001; - componentRef_ = value; + public Builder setLine(int value) { + bitField0_ |= 0x00000004; + line_ = value; onChanged(); return this; } /** - * optional int32 component_ref = 1; + * optional int32 line = 3; */ - public Builder clearComponentRef() { - bitField0_ = (bitField0_ & ~0x00000001); - componentRef_ = 0; + public Builder clearLine() { + bitField0_ = (bitField0_ & ~0x00000004); + line_ = 0; onChanged(); return this; } - private java.util.List changeset_ = - java.util.Collections.emptyList(); - private void ensureChangesetIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - changeset_ = new java.util.ArrayList(changeset_); - bitField0_ |= 0x00000002; - } + private java.lang.Object msg_ = ""; + /** + * optional string msg = 4; + */ + public boolean hasMsg() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder, org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder> changesetBuilder_; - /** - * repeated .Changesets.Changeset changeset = 2; + * optional string msg = 4; */ - public java.util.List getChangesetList() { - if (changesetBuilder_ == null) { - return java.util.Collections.unmodifiableList(changeset_); + public java.lang.String getMsg() { + java.lang.Object ref = msg_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + msg_ = s; + } + return s; } else { - return changesetBuilder_.getMessageList(); + return (java.lang.String) ref; } } /** - * repeated .Changesets.Changeset changeset = 2; + * optional string msg = 4; */ - public int getChangesetCount() { - if (changesetBuilder_ == null) { - return changeset_.size(); + public com.google.protobuf.ByteString + getMsgBytes() { + java.lang.Object ref = msg_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + msg_ = b; + return b; } else { - return changesetBuilder_.getCount(); + return (com.google.protobuf.ByteString) ref; } } /** - * repeated .Changesets.Changeset changeset = 2; + * optional string msg = 4; */ - public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getChangeset(int index) { - if (changesetBuilder_ == null) { - return changeset_.get(index); - } else { - return changesetBuilder_.getMessage(index); - } + public Builder setMsg( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + msg_ = value; + onChanged(); + return this; } /** - * repeated .Changesets.Changeset changeset = 2; + * optional string msg = 4; */ - public Builder setChangeset( - int index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset value) { - if (changesetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChangesetIsMutable(); - changeset_.set(index, value); - onChanged(); - } else { - changesetBuilder_.setMessage(index, value); - } + public Builder clearMsg() { + bitField0_ = (bitField0_ & ~0x00000008); + msg_ = getDefaultInstance().getMsg(); + onChanged(); return this; } /** - * repeated .Changesets.Changeset changeset = 2; + * optional string msg = 4; */ - public Builder setChangeset( - int index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder builderForValue) { - if (changesetBuilder_ == null) { - ensureChangesetIsMutable(); - changeset_.set(index, builderForValue.build()); - onChanged(); - } else { - changesetBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setMsgBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + msg_ = value; + onChanged(); return this; } + + private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; /** - * repeated .Changesets.Changeset changeset = 2; + * optional .Severity severity = 5; */ - public Builder addChangeset(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset value) { - if (changesetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChangesetIsMutable(); - changeset_.add(value); - onChanged(); - } else { - changesetBuilder_.addMessage(value); + public boolean hasSeverity() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional .Severity severity = 5; + */ + public org.sonar.batch.protocol.Constants.Severity getSeverity() { + return severity_; + } + /** + * optional .Severity severity = 5; + */ + public Builder setSeverity(org.sonar.batch.protocol.Constants.Severity value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000010; + severity_ = value; + onChanged(); return this; } /** - * repeated .Changesets.Changeset changeset = 2; + * optional .Severity severity = 5; */ - public Builder addChangeset( - int index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset value) { - if (changesetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureChangesetIsMutable(); - changeset_.add(index, value); - onChanged(); - } else { - changesetBuilder_.addMessage(index, value); - } + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000010); + severity_ = org.sonar.batch.protocol.Constants.Severity.INFO; + onChanged(); return this; } + + private com.google.protobuf.LazyStringList tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + tag_ = new com.google.protobuf.LazyStringArrayList(tag_); + bitField0_ |= 0x00000020; + } + } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public Builder addChangeset( - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder builderForValue) { - if (changesetBuilder_ == null) { - ensureChangesetIsMutable(); - changeset_.add(builderForValue.build()); - onChanged(); - } else { - changesetBuilder_.addMessage(builderForValue.build()); - } - return this; + public com.google.protobuf.ProtocolStringList + getTagList() { + return tag_.getUnmodifiableView(); } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public Builder addChangeset( - int index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder builderForValue) { - if (changesetBuilder_ == null) { - ensureChangesetIsMutable(); - changeset_.add(index, builderForValue.build()); - onChanged(); - } else { - changesetBuilder_.addMessage(index, builderForValue.build()); - } - return this; + public int getTagCount() { + return tag_.size(); } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public Builder addAllChangeset( - java.lang.Iterable values) { - if (changesetBuilder_ == null) { - ensureChangesetIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, changeset_); - onChanged(); - } else { - changesetBuilder_.addAllMessages(values); - } - return this; + public java.lang.String getTag(int index) { + return tag_.get(index); } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public Builder clearChangeset() { - if (changesetBuilder_ == null) { - changeset_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - changesetBuilder_.clear(); - } - return this; + public com.google.protobuf.ByteString + getTagBytes(int index) { + return tag_.getByteString(index); } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public Builder removeChangeset(int index) { - if (changesetBuilder_ == null) { - ensureChangesetIsMutable(); - changeset_.remove(index); - onChanged(); - } else { - changesetBuilder_.remove(index); - } + public Builder setTag( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.set(index, value); + onChanged(); return this; } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder getChangesetBuilder( - int index) { - return getChangesetFieldBuilder().getBuilder(index); + public Builder addTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.add(value); + onChanged(); + return this; } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder getChangesetOrBuilder( - int index) { - if (changesetBuilder_ == null) { - return changeset_.get(index); } else { - return changesetBuilder_.getMessageOrBuilder(index); - } + public Builder addAllTag( + java.lang.Iterable values) { + ensureTagIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tag_); + onChanged(); + return this; } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public java.util.List - getChangesetOrBuilderList() { - if (changesetBuilder_ != null) { - return changesetBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(changeset_); - } + public Builder clearTag() { + tag_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; } /** - * repeated .Changesets.Changeset changeset = 2; + * repeated string tag = 6; */ - public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder addChangesetBuilder() { - return getChangesetFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.getDefaultInstance()); + public Builder addTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagIsMutable(); + tag_.add(value); + onChanged(); + return this; } + + private double effortToFix_ ; /** - * repeated .Changesets.Changeset changeset = 2; + * optional double effort_to_fix = 7; */ - public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder addChangesetBuilder( - int index) { - return getChangesetFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.getDefaultInstance()); + public boolean hasEffortToFix() { + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * repeated .Changesets.Changeset changeset = 2; + * optional double effort_to_fix = 7; */ - public java.util.List - getChangesetBuilderList() { - return getChangesetFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder, org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder> - getChangesetFieldBuilder() { - if (changesetBuilder_ == null) { - changesetBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder, org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder>( - changeset_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - changeset_ = null; - } - return changesetBuilder_; + public double getEffortToFix() { + return effortToFix_; } - - private java.util.List changesetIndexByLine_ = java.util.Collections.emptyList(); - private void ensureChangesetIndexByLineIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - changesetIndexByLine_ = new java.util.ArrayList(changesetIndexByLine_); - bitField0_ |= 0x00000004; - } + /** + * optional double effort_to_fix = 7; + */ + public Builder setEffortToFix(double value) { + bitField0_ |= 0x00000040; + effortToFix_ = value; + onChanged(); + return this; } /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-       * 
+ * optional double effort_to_fix = 7; */ - public java.util.List - getChangesetIndexByLineList() { - return java.util.Collections.unmodifiableList(changesetIndexByLine_); + public Builder clearEffortToFix() { + bitField0_ = (bitField0_ & ~0x00000040); + effortToFix_ = 0D; + onChanged(); + return this; } + + private java.lang.Object attributes_ = ""; /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-       * 
+ * optional string attributes = 8; */ - public int getChangesetIndexByLineCount() { - return changesetIndexByLine_.size(); + public boolean hasAttributes() { + return ((bitField0_ & 0x00000080) == 0x00000080); } /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-       * 
+ * optional string attributes = 8; */ - public int getChangesetIndexByLine(int index) { - return changesetIndexByLine_.get(index); + public java.lang.String getAttributes() { + java.lang.Object ref = attributes_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + attributes_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-       * 
+ * optional string attributes = 8; */ - public Builder setChangesetIndexByLine( - int index, int value) { - ensureChangesetIndexByLineIsMutable(); - changesetIndexByLine_.set(index, value); - onChanged(); - return this; + public com.google.protobuf.ByteString + getAttributesBytes() { + java.lang.Object ref = attributes_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributes_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-       * 
+ * optional string attributes = 8; */ - public Builder addChangesetIndexByLine(int value) { - ensureChangesetIndexByLineIsMutable(); - changesetIndexByLine_.add(value); + public Builder setAttributes( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + attributes_ = value; onChanged(); return this; } /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-       * 
+ * optional string attributes = 8; */ - public Builder addAllChangesetIndexByLine( - java.lang.Iterable values) { - ensureChangesetIndexByLineIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, changesetIndexByLine_); + public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000080); + attributes_ = getDefaultInstance().getAttributes(); onChanged(); return this; } /** - * repeated int32 changesetIndexByLine = 3 [packed = true]; - * - *
-       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
-       * 
+ * optional string attributes = 8; */ - public Builder clearChangesetIndexByLine() { - changesetIndexByLine_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder setAttributesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + attributes_ = value; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:Changesets) + // @@protoc_insertion_point(builder_scope:Issue) } static { - defaultInstance = new Changesets(true); + defaultInstance = new Issue(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:Changesets) + // @@protoc_insertion_point(class_scope:Issue) } - public interface DuplicateOrBuilder extends - // @@protoc_insertion_point(interface_extends:Duplicate) + public interface ChangesetsOrBuilder extends + // @@protoc_insertion_point(interface_extends:Changesets) com.google.protobuf.MessageOrBuilder { /** - * optional int32 other_file_ref = 1; - * - *
-     * Will be null when duplicate is in the same file
-     * 
- */ - boolean hasOtherFileRef(); - /** - * optional int32 other_file_ref = 1; - * - *
-     * Will be null when duplicate is in the same file
-     * 
- */ - int getOtherFileRef(); - - /** - * optional .Range range = 2; - */ - boolean hasRange(); - /** - * optional .Range range = 2; - */ - org.sonar.batch.protocol.output.BatchReport.Range getRange(); - /** - * optional .Range range = 2; - */ - org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder(); - - /** - * optional string other_file_key = 3; - * - *
-     * temporary field during development of computation stack for cross project duplications
-     * 
- */ - boolean hasOtherFileKey(); - /** - * optional string other_file_key = 3; - * - *
-     * temporary field during development of computation stack for cross project duplications
-     * 
+ * optional int32 component_ref = 1; */ - java.lang.String getOtherFileKey(); + boolean hasComponentRef(); /** - * optional string other_file_key = 3; - * - *
-     * temporary field during development of computation stack for cross project duplications
-     * 
+ * optional int32 component_ref = 1; */ - com.google.protobuf.ByteString - getOtherFileKeyBytes(); - } - /** - * Protobuf type {@code Duplicate} - */ - public static final class Duplicate extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Duplicate) - DuplicateOrBuilder { - // Use Duplicate.newBuilder() to construct. - private Duplicate(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Duplicate(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Duplicate defaultInstance; - public static Duplicate getDefaultInstance() { - return defaultInstance; - } - - public Duplicate getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Duplicate( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - otherFileRef_ = input.readInt32(); - break; - } - case 18: { - org.sonar.batch.protocol.output.BatchReport.Range.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = range_.toBuilder(); - } - range_ = input.readMessage(org.sonar.batch.protocol.output.BatchReport.Range.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(range_); - range_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - otherFileKey_ = bs; - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Duplicate.class, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Duplicate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Duplicate(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + int getComponentRef(); - private int bitField0_; - public static final int OTHER_FILE_REF_FIELD_NUMBER = 1; - private int otherFileRef_; /** - * optional int32 other_file_ref = 1; - * - *
-     * Will be null when duplicate is in the same file
-     * 
+ * repeated .Changesets.Changeset changeset = 2; */ - public boolean hasOtherFileRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } + java.util.List + getChangesetList(); /** - * optional int32 other_file_ref = 1; - * - *
-     * Will be null when duplicate is in the same file
-     * 
+ * repeated .Changesets.Changeset changeset = 2; */ - public int getOtherFileRef() { - return otherFileRef_; - } - - public static final int RANGE_FIELD_NUMBER = 2; - private org.sonar.batch.protocol.output.BatchReport.Range range_; + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getChangeset(int index); /** - * optional .Range range = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public boolean hasRange() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } + int getChangesetCount(); /** - * optional .Range range = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Range getRange() { - return range_; - } + java.util.List + getChangesetOrBuilderList(); /** - * optional .Range range = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder() { - return range_; - } + org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder getChangesetOrBuilder( + int index); - public static final int OTHER_FILE_KEY_FIELD_NUMBER = 3; - private java.lang.Object otherFileKey_; /** - * optional string other_file_key = 3; + * repeated int32 changesetIndexByLine = 3 [packed = true]; * *
-     * temporary field during development of computation stack for cross project duplications
+     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
      * 
*/ - public boolean hasOtherFileKey() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } + java.util.List getChangesetIndexByLineList(); /** - * optional string other_file_key = 3; + * repeated int32 changesetIndexByLine = 3 [packed = true]; * *
-     * temporary field during development of computation stack for cross project duplications
+     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
      * 
*/ - public java.lang.String getOtherFileKey() { - java.lang.Object ref = otherFileKey_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - otherFileKey_ = s; - } - return s; - } - } + int getChangesetIndexByLineCount(); /** - * optional string other_file_key = 3; + * repeated int32 changesetIndexByLine = 3 [packed = true]; * *
-     * temporary field during development of computation stack for cross project duplications
+     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
      * 
*/ - public com.google.protobuf.ByteString - getOtherFileKeyBytes() { - java.lang.Object ref = otherFileKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - otherFileKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - otherFileRef_ = 0; - range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - otherFileKey_ = ""; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; + int getChangesetIndexByLine(int index); + } + /** + * Protobuf type {@code Changesets} + */ + public static final class Changesets extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Changesets) + ChangesetsOrBuilder { + // Use Changesets.newBuilder() to construct. + private Changesets(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); } + private Changesets(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, otherFileRef_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, range_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getOtherFileKeyBytes()); - } - getUnknownFields().writeTo(output); + private static final Changesets defaultInstance; + public static Changesets getDefaultInstance() { + return defaultInstance; } - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, otherFileRef_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, range_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getOtherFileKeyBytes()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; + public Changesets getDefaultInstanceForType() { + return defaultInstance; } - private static final long serialVersionUID = 0L; + private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( - byte[] data, + private Changesets( + com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + componentRef_ = input.readInt32(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + changeset_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + changeset_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.PARSER, extensionRegistry)); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + changesetIndexByLine_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + changesetIndexByLine_.add(input.readInt32()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { + changesetIndexByLine_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + changesetIndexByLine_.add(input.readInt32()); + } + input.popLimit(limit); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + changeset_ = java.util.Collections.unmodifiableList(changeset_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + changesetIndexByLine_ = java.util.Collections.unmodifiableList(changesetIndexByLine_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } } - public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_descriptor; } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Duplicate prototype) { - return newBuilder().mergeFrom(prototype); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Changesets.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Builder.class); } - public Builder toBuilder() { return newBuilder(this); } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Changesets parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Changesets(input, extensionRegistry); + } + }; @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public interface ChangesetOrBuilder extends + // @@protoc_insertion_point(interface_extends:Changesets.Changeset) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string revision = 1; + */ + boolean hasRevision(); + /** + * optional string revision = 1; + */ + java.lang.String getRevision(); + /** + * optional string revision = 1; + */ + com.google.protobuf.ByteString + getRevisionBytes(); + + /** + * optional string author = 2; + */ + boolean hasAuthor(); + /** + * optional string author = 2; + */ + java.lang.String getAuthor(); + /** + * optional string author = 2; + */ + com.google.protobuf.ByteString + getAuthorBytes(); + + /** + * optional int64 date = 3; + */ + boolean hasDate(); + /** + * optional int64 date = 3; + */ + long getDate(); } /** - * Protobuf type {@code Duplicate} + * Protobuf type {@code Changesets.Changeset} */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Duplicate) - org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder { + public static final class Changeset extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Changesets.Changeset) + ChangesetOrBuilder { + // Use Changeset.newBuilder() to construct. + private Changeset(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Changeset(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Changeset defaultInstance; + public static Changeset getDefaultInstance() { + return defaultInstance; + } + + public Changeset getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Changeset( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + revision_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + author_ = bs; + break; + } + case 24: { + bitField0_ |= 0x00000004; + date_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Duplicate.class, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder.class); } - // Construct using org.sonar.batch.protocol.output.BatchReport.Duplicate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Changeset parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Changeset(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + private int bitField0_; + public static final int REVISION_FIELD_NUMBER = 1; + private java.lang.Object revision_; + /** + * optional string revision = 1; + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRangeFieldBuilder(); + /** + * optional string revision = 1; + */ + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + revision_ = s; + } + return s; } } - private static Builder create() { - return new Builder(); + /** + * optional string revision = 1; + */ + public com.google.protobuf.ByteString + getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public Builder clear() { - super.clear(); - otherFileRef_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - if (rangeBuilder_ == null) { - range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + public static final int AUTHOR_FIELD_NUMBER = 2; + private java.lang.Object author_; + /** + * optional string author = 2; + */ + public boolean hasAuthor() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string author = 2; + */ + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + author_ = s; + } + return s; + } + } + /** + * optional string author = 2; + */ + public com.google.protobuf.ByteString + getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + author_ = b; + return b; } else { - rangeBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - bitField0_ = (bitField0_ & ~0x00000002); - otherFileKey_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + public static final int DATE_FIELD_NUMBER = 3; + private long date_; + /** + * optional int64 date = 3; + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_descriptor; + /** + * optional int64 date = 3; + */ + public long getDate() { + return date_; } - public org.sonar.batch.protocol.output.BatchReport.Duplicate getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Duplicate.getDefaultInstance(); + private void initFields() { + revision_ = ""; + author_ = ""; + date_ = 0L; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public org.sonar.batch.protocol.output.BatchReport.Duplicate build() { - org.sonar.batch.protocol.output.BatchReport.Duplicate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + memoizedIsInitialized = 1; + return true; } - public org.sonar.batch.protocol.output.BatchReport.Duplicate buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Duplicate result = new org.sonar.batch.protocol.output.BatchReport.Duplicate(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.otherFileRef_ = otherFileRef_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getRevisionBytes()); } - if (rangeBuilder_ == null) { - result.range_ = range_; - } else { - result.range_ = rangeBuilder_.build(); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getAuthorBytes()); } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, date_); } - result.otherFileKey_ = otherFileKey_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + getUnknownFields().writeTo(output); } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Duplicate) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Duplicate)other); - } else { - super.mergeFrom(other); - return this; - } - } + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Duplicate other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Duplicate.getDefaultInstance()) return this; - if (other.hasOtherFileRef()) { - setOtherFileRef(other.getOtherFileRef()); + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getRevisionBytes()); } - if (other.hasRange()) { - mergeRange(other.getRange()); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getAuthorBytes()); } - if (other.hasOtherFileKey()) { - bitField0_ |= 0x00000004; - otherFileKey_ = other.otherFileKey_; - onChanged(); + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, date_); } - this.mergeUnknownFields(other.getUnknownFields()); - return this; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; } - public final boolean isInitialized() { - return true; + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom(java.io.InputStream input) throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Duplicate parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Duplicate) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; + return PARSER.parseFrom(input); } - private int bitField0_; - - private int otherFileRef_ ; - /** - * optional int32 other_file_ref = 1; - * - *
-       * Will be null when duplicate is in the same file
-       * 
- */ - public boolean hasOtherFileRef() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); } - /** - * optional int32 other_file_ref = 1; - * - *
-       * Will be null when duplicate is in the same file
-       * 
- */ - public int getOtherFileRef() { - return otherFileRef_; + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); } - /** - * optional int32 other_file_ref = 1; - * - *
-       * Will be null when duplicate is in the same file
-       * 
- */ - public Builder setOtherFileRef(int value) { - bitField0_ |= 0x00000001; - otherFileRef_ = value; - onChanged(); - return this; + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); } - /** - * optional int32 other_file_ref = 1; - * - *
-       * Will be null when duplicate is in the same file
-       * 
- */ - public Builder clearOtherFileRef() { - bitField0_ = (bitField0_ & ~0x00000001); - otherFileRef_ = 0; - onChanged(); - return this; + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); } - private org.sonar.batch.protocol.output.BatchReport.Range range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> rangeBuilder_; - /** - * optional .Range range = 2; - */ - public boolean hasRange() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset prototype) { + return newBuilder().mergeFrom(prototype); } - /** - * optional .Range range = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Range getRange() { - if (rangeBuilder_ == null) { - return range_; - } else { - return rangeBuilder_.getMessage(); - } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } /** - * optional .Range range = 2; + * Protobuf type {@code Changesets.Changeset} */ - public Builder setRange(org.sonar.batch.protocol.output.BatchReport.Range value) { - if (rangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Changesets.Changeset) + org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder.class); + } + + // Construct using org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } - range_ = value; - onChanged(); - } else { - rangeBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .Range range = 2; - */ - public Builder setRange( - org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { - if (rangeBuilder_ == null) { - range_ = builderForValue.build(); - onChanged(); - } else { - rangeBuilder_.setMessage(builderForValue.build()); + private static Builder create() { + return new Builder(); } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .Range range = 2; - */ - public Builder mergeRange(org.sonar.batch.protocol.output.BatchReport.Range value) { - if (rangeBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - range_ != org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()) { - range_ = - org.sonar.batch.protocol.output.BatchReport.Range.newBuilder(range_).mergeFrom(value).buildPartial(); + + public Builder clear() { + super.clear(); + revision_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + author_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + date_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_descriptor; + } + + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.getDefaultInstance(); + } + + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset build() { + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset result = new org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.revision_ = revision_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.author_ = author_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.date_ = date_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset)other); } else { - range_ = value; + super.mergeFrom(other); + return this; } - onChanged(); - } else { - rangeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000002; - return this; - } - /** - * optional .Range range = 2; - */ - public Builder clearRange() { - if (rangeBuilder_ == null) { - range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - onChanged(); - } else { - rangeBuilder_.clear(); + + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.getDefaultInstance()) return this; + if (other.hasRevision()) { + bitField0_ |= 0x00000001; + revision_ = other.revision_; + onChanged(); + } + if (other.hasAuthor()) { + bitField0_ |= 0x00000002; + author_ = other.author_; + onChanged(); + } + if (other.hasDate()) { + setDate(other.getDate()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - * optional .Range range = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Range.Builder getRangeBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getRangeFieldBuilder().getBuilder(); - } - /** - * optional .Range range = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder() { - if (rangeBuilder_ != null) { - return rangeBuilder_.getMessageOrBuilder(); - } else { - return range_; + + public final boolean isInitialized() { + return true; } - } - /** - * optional .Range range = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> - getRangeFieldBuilder() { - if (rangeBuilder_ == null) { - rangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( - getRange(), - getParentForChildren(), - isClean()); - range_ = null; + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; } - return rangeBuilder_; - } + private int bitField0_; - private java.lang.Object otherFileKey_ = ""; - /** - * optional string other_file_key = 3; - * - *
-       * temporary field during development of computation stack for cross project duplications
-       * 
- */ - public boolean hasOtherFileKey() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string other_file_key = 3; - * - *
-       * temporary field during development of computation stack for cross project duplications
-       * 
- */ - public java.lang.String getOtherFileKey() { - java.lang.Object ref = otherFileKey_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - otherFileKey_ = s; + private java.lang.Object revision_ = ""; + /** + * optional string revision = 1; + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string revision = 1; + */ + public java.lang.String getRevision() { + java.lang.Object ref = revision_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + revision_ = s; + } + return s; + } else { + return (java.lang.String) ref; } - return s; - } else { - return (java.lang.String) ref; } - } - /** - * optional string other_file_key = 3; - * - *
-       * temporary field during development of computation stack for cross project duplications
-       * 
- */ - public com.google.protobuf.ByteString - getOtherFileKeyBytes() { - java.lang.Object ref = otherFileKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - otherFileKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + /** + * optional string revision = 1; + */ + public com.google.protobuf.ByteString + getRevisionBytes() { + java.lang.Object ref = revision_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + revision_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - } - /** - * optional string other_file_key = 3; - * - *
-       * temporary field during development of computation stack for cross project duplications
-       * 
- */ - public Builder setOtherFileKey( - java.lang.String value) { - if (value == null) { + /** + * optional string revision = 1; + */ + public Builder setRevision( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - otherFileKey_ = value; - onChanged(); - return this; - } - /** - * optional string other_file_key = 3; - * - *
-       * temporary field during development of computation stack for cross project duplications
-       * 
- */ - public Builder clearOtherFileKey() { - bitField0_ = (bitField0_ & ~0x00000004); - otherFileKey_ = getDefaultInstance().getOtherFileKey(); - onChanged(); - return this; - } - /** - * optional string other_file_key = 3; - * - *
-       * temporary field during development of computation stack for cross project duplications
-       * 
- */ - public Builder setOtherFileKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { + bitField0_ |= 0x00000001; + revision_ = value; + onChanged(); + return this; + } + /** + * optional string revision = 1; + */ + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000001); + revision_ = getDefaultInstance().getRevision(); + onChanged(); + return this; + } + /** + * optional string revision = 1; + */ + public Builder setRevisionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - otherFileKey_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:Duplicate) - } - - static { - defaultInstance = new Duplicate(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:Duplicate) - } - - public interface DuplicationOrBuilder extends - // @@protoc_insertion_point(interface_extends:Duplication) - com.google.protobuf.MessageOrBuilder { - - /** - * optional .Range origin_position = 1; - * - *
-     * Origin position in current file
-     * 
- */ - boolean hasOriginPosition(); - /** - * optional .Range origin_position = 1; - * - *
-     * Origin position in current file
-     * 
- */ - org.sonar.batch.protocol.output.BatchReport.Range getOriginPosition(); - /** - * optional .Range origin_position = 1; - * - *
-     * Origin position in current file
-     * 
- */ - org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getOriginPositionOrBuilder(); - - /** - * repeated .Duplicate duplicate = 2; - */ - java.util.List - getDuplicateList(); - /** - * repeated .Duplicate duplicate = 2; - */ - org.sonar.batch.protocol.output.BatchReport.Duplicate getDuplicate(int index); - /** - * repeated .Duplicate duplicate = 2; - */ - int getDuplicateCount(); - /** - * repeated .Duplicate duplicate = 2; - */ - java.util.List - getDuplicateOrBuilderList(); - /** - * repeated .Duplicate duplicate = 2; - */ - org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder getDuplicateOrBuilder( - int index); - } - /** - * Protobuf type {@code Duplication} - */ - public static final class Duplication extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Duplication) - DuplicationOrBuilder { - // Use Duplication.newBuilder() to construct. - private Duplication(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Duplication(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Duplication defaultInstance; - public static Duplication getDefaultInstance() { - return defaultInstance; - } - - public Duplication getDefaultInstanceForType() { - return defaultInstance; - } + bitField0_ |= 0x00000001; + revision_ = value; + onChanged(); + return this; + } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Duplication( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - org.sonar.batch.protocol.output.BatchReport.Range.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = originPosition_.toBuilder(); - } - originPosition_ = input.readMessage(org.sonar.batch.protocol.output.BatchReport.Range.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originPosition_); - originPosition_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - duplicate_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - duplicate_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Duplicate.PARSER, extensionRegistry)); - break; + private java.lang.Object author_ = ""; + /** + * optional string author = 2; + */ + public boolean hasAuthor() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string author = 2; + */ + public java.lang.String getAuthor() { + java.lang.Object ref = author_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + author_ = s; } + return s; + } else { + return (java.lang.String) ref; } } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - duplicate_ = java.util.Collections.unmodifiableList(duplicate_); + /** + * optional string author = 2; + */ + public com.google.protobuf.ByteString + getAuthorBytes() { + java.lang.Object ref = author_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + author_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string author = 2; + */ + public Builder setAuthor( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + author_ = value; + onChanged(); + return this; + } + /** + * optional string author = 2; + */ + public Builder clearAuthor() { + bitField0_ = (bitField0_ & ~0x00000002); + author_ = getDefaultInstance().getAuthor(); + onChanged(); + return this; + } + /** + * optional string author = 2; + */ + public Builder setAuthorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + author_ = value; + onChanged(); + return this; } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_descriptor; - } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Duplication.class, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder.class); - } + private long date_ ; + /** + * optional int64 date = 3; + */ + public boolean hasDate() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int64 date = 3; + */ + public long getDate() { + return date_; + } + /** + * optional int64 date = 3; + */ + public Builder setDate(long value) { + bitField0_ |= 0x00000004; + date_ = value; + onChanged(); + return this; + } + /** + * optional int64 date = 3; + */ + public Builder clearDate() { + bitField0_ = (bitField0_ & ~0x00000004); + date_ = 0L; + onChanged(); + return this; + } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Duplication parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Duplication(input, extensionRegistry); + // @@protoc_insertion_point(builder_scope:Changesets.Changeset) } - }; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + static { + defaultInstance = new Changeset(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:Changesets.Changeset) } private int bitField0_; - public static final int ORIGIN_POSITION_FIELD_NUMBER = 1; - private org.sonar.batch.protocol.output.BatchReport.Range originPosition_; + public static final int COMPONENT_REF_FIELD_NUMBER = 1; + private int componentRef_; /** - * optional .Range origin_position = 1; - * - *
-     * Origin position in current file
-     * 
+ * optional int32 component_ref = 1; */ - public boolean hasOriginPosition() { + public boolean hasComponentRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .Range origin_position = 1; - * - *
-     * Origin position in current file
-     * 
+ * optional int32 component_ref = 1; */ - public org.sonar.batch.protocol.output.BatchReport.Range getOriginPosition() { - return originPosition_; + public int getComponentRef() { + return componentRef_; } + + public static final int CHANGESET_FIELD_NUMBER = 2; + private java.util.List changeset_; /** - * optional .Range origin_position = 1; - * - *
-     * Origin position in current file
-     * 
+ * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getOriginPositionOrBuilder() { - return originPosition_; + public java.util.List getChangesetList() { + return changeset_; } - - public static final int DUPLICATE_FIELD_NUMBER = 2; - private java.util.List duplicate_; /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public java.util.List getDuplicateList() { - return duplicate_; + public java.util.List + getChangesetOrBuilderList() { + return changeset_; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public java.util.List - getDuplicateOrBuilderList() { - return duplicate_; + public int getChangesetCount() { + return changeset_.size(); } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public int getDuplicateCount() { - return duplicate_.size(); + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getChangeset(int index) { + return changeset_.get(index); } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Duplicate getDuplicate(int index) { - return duplicate_.get(index); + public org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder getChangesetOrBuilder( + int index) { + return changeset_.get(index); } + + public static final int CHANGESETINDEXBYLINE_FIELD_NUMBER = 3; + private java.util.List changesetIndexByLine_; /** - * repeated .Duplicate duplicate = 2; + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+     * 
*/ - public org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder getDuplicateOrBuilder( - int index) { - return duplicate_.get(index); + public java.util.List + getChangesetIndexByLineList() { + return changesetIndexByLine_; + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+     * 
+ */ + public int getChangesetIndexByLineCount() { + return changesetIndexByLine_.size(); + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+     * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+     * 
+ */ + public int getChangesetIndexByLine(int index) { + return changesetIndexByLine_.get(index); } + private int changesetIndexByLineMemoizedSerializedSize = -1; private void initFields() { - originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - duplicate_ = java.util.Collections.emptyList(); + componentRef_ = 0; + changeset_ = java.util.Collections.emptyList(); + changesetIndexByLine_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -11391,10 +9543,17 @@ public final class BatchReport { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, originPosition_); + output.writeInt32(1, componentRef_); + } + for (int i = 0; i < changeset_.size(); i++) { + output.writeMessage(2, changeset_.get(i)); + } + if (getChangesetIndexByLineList().size() > 0) { + output.writeRawVarint32(26); + output.writeRawVarint32(changesetIndexByLineMemoizedSerializedSize); } - for (int i = 0; i < duplicate_.size(); i++) { - output.writeMessage(2, duplicate_.get(i)); + for (int i = 0; i < changesetIndexByLine_.size(); i++) { + output.writeInt32NoTag(changesetIndexByLine_.get(i)); } getUnknownFields().writeTo(output); } @@ -11407,11 +9566,25 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, originPosition_); + .computeInt32Size(1, componentRef_); } - for (int i = 0; i < duplicate_.size(); i++) { + for (int i = 0; i < changeset_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, duplicate_.get(i)); + .computeMessageSize(2, changeset_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < changesetIndexByLine_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(changesetIndexByLine_.get(i)); + } + size += dataSize; + if (!getChangesetIndexByLineList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + changesetIndexByLineMemoizedSerializedSize = dataSize; } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -11425,53 +9598,53 @@ public final class BatchReport { return super.writeReplace(); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom(byte[] data) + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseDelimitedFrom( + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Changesets parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11480,7 +9653,7 @@ public final class BatchReport { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Duplication prototype) { + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Changesets prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -11492,25 +9665,25 @@ public final class BatchReport { return builder; } /** - * Protobuf type {@code Duplication} + * Protobuf type {@code Changesets} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Duplication) - org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder { + // @@protoc_insertion_point(builder_implements:Changesets) + org.sonar.batch.protocol.output.BatchReport.ChangesetsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Duplication.class, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Changesets.class, org.sonar.batch.protocol.output.BatchReport.Changesets.Builder.class); } - // Construct using org.sonar.batch.protocol.output.BatchReport.Duplication.newBuilder() + // Construct using org.sonar.batch.protocol.output.BatchReport.Changesets.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -11522,8 +9695,7 @@ public final class BatchReport { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getOriginPositionFieldBuilder(); - getDuplicateFieldBuilder(); + getChangesetFieldBuilder(); } } private static Builder create() { @@ -11532,18 +9704,16 @@ public final class BatchReport { public Builder clear() { super.clear(); - if (originPositionBuilder_ == null) { - originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - } else { - originPositionBuilder_.clear(); - } + componentRef_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - if (duplicateBuilder_ == null) { - duplicate_ = java.util.Collections.emptyList(); + if (changesetBuilder_ == null) { + changeset_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { - duplicateBuilder_.clear(); + changesetBuilder_.clear(); } + changesetIndexByLine_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -11553,574 +9723,582 @@ public final class BatchReport { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_descriptor; } - public org.sonar.batch.protocol.output.BatchReport.Duplication getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Duplication.getDefaultInstance(); + public org.sonar.batch.protocol.output.BatchReport.Changesets getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Changesets.getDefaultInstance(); } - public org.sonar.batch.protocol.output.BatchReport.Duplication build() { - org.sonar.batch.protocol.output.BatchReport.Duplication result = buildPartial(); + public org.sonar.batch.protocol.output.BatchReport.Changesets build() { + org.sonar.batch.protocol.output.BatchReport.Changesets result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.batch.protocol.output.BatchReport.Duplication buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Duplication result = new org.sonar.batch.protocol.output.BatchReport.Duplication(this); + public org.sonar.batch.protocol.output.BatchReport.Changesets buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Changesets result = new org.sonar.batch.protocol.output.BatchReport.Changesets(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - if (originPositionBuilder_ == null) { - result.originPosition_ = originPosition_; - } else { - result.originPosition_ = originPositionBuilder_.build(); - } - if (duplicateBuilder_ == null) { + result.componentRef_ = componentRef_; + if (changesetBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { - duplicate_ = java.util.Collections.unmodifiableList(duplicate_); + changeset_ = java.util.Collections.unmodifiableList(changeset_); bitField0_ = (bitField0_ & ~0x00000002); } - result.duplicate_ = duplicate_; + result.changeset_ = changeset_; } else { - result.duplicate_ = duplicateBuilder_.build(); + result.changeset_ = changesetBuilder_.build(); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + changesetIndexByLine_ = java.util.Collections.unmodifiableList(changesetIndexByLine_); + bitField0_ = (bitField0_ & ~0x00000004); } + result.changesetIndexByLine_ = changesetIndexByLine_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Duplication) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Duplication)other); + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Changesets) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Changesets)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Duplication other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Duplication.getDefaultInstance()) return this; - if (other.hasOriginPosition()) { - mergeOriginPosition(other.getOriginPosition()); + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Changesets other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Changesets.getDefaultInstance()) return this; + if (other.hasComponentRef()) { + setComponentRef(other.getComponentRef()); } - if (duplicateBuilder_ == null) { - if (!other.duplicate_.isEmpty()) { - if (duplicate_.isEmpty()) { - duplicate_ = other.duplicate_; + if (changesetBuilder_ == null) { + if (!other.changeset_.isEmpty()) { + if (changeset_.isEmpty()) { + changeset_ = other.changeset_; bitField0_ = (bitField0_ & ~0x00000002); } else { - ensureDuplicateIsMutable(); - duplicate_.addAll(other.duplicate_); + ensureChangesetIsMutable(); + changeset_.addAll(other.changeset_); } onChanged(); } } else { - if (!other.duplicate_.isEmpty()) { - if (duplicateBuilder_.isEmpty()) { - duplicateBuilder_.dispose(); - duplicateBuilder_ = null; - duplicate_ = other.duplicate_; + if (!other.changeset_.isEmpty()) { + if (changesetBuilder_.isEmpty()) { + changesetBuilder_.dispose(); + changesetBuilder_ = null; + changeset_ = other.changeset_; bitField0_ = (bitField0_ & ~0x00000002); - duplicateBuilder_ = + changesetBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDuplicateFieldBuilder() : null; + getChangesetFieldBuilder() : null; } else { - duplicateBuilder_.addAllMessages(other.duplicate_); + changesetBuilder_.addAllMessages(other.changeset_); } } } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Duplication parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Duplication) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private org.sonar.batch.protocol.output.BatchReport.Range originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> originPositionBuilder_; - /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
- */ - public boolean hasOriginPosition() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
- */ - public org.sonar.batch.protocol.output.BatchReport.Range getOriginPosition() { - if (originPositionBuilder_ == null) { - return originPosition_; - } else { - return originPositionBuilder_.getMessage(); - } - } - /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
- */ - public Builder setOriginPosition(org.sonar.batch.protocol.output.BatchReport.Range value) { - if (originPositionBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - originPosition_ = value; - onChanged(); - } else { - originPositionBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
- */ - public Builder setOriginPosition( - org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { - if (originPositionBuilder_ == null) { - originPosition_ = builderForValue.build(); - onChanged(); - } else { - originPositionBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
- */ - public Builder mergeOriginPosition(org.sonar.batch.protocol.output.BatchReport.Range value) { - if (originPositionBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - originPosition_ != org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()) { - originPosition_ = - org.sonar.batch.protocol.output.BatchReport.Range.newBuilder(originPosition_).mergeFrom(value).buildPartial(); + if (!other.changesetIndexByLine_.isEmpty()) { + if (changesetIndexByLine_.isEmpty()) { + changesetIndexByLine_ = other.changesetIndexByLine_; + bitField0_ = (bitField0_ & ~0x00000004); } else { - originPosition_ = value; + ensureChangesetIndexByLineIsMutable(); + changesetIndexByLine_.addAll(other.changesetIndexByLine_); } onChanged(); - } else { - originPositionBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; + this.mergeUnknownFields(other.getUnknownFields()); return this; } - /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
- */ - public Builder clearOriginPosition() { - if (originPositionBuilder_ == null) { - originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - onChanged(); - } else { - originPositionBuilder_.clear(); + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.Changesets parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Changesets) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } } - bitField0_ = (bitField0_ & ~0x00000001); return this; } + private int bitField0_; + + private int componentRef_ ; /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
+ * optional int32 component_ref = 1; */ - public org.sonar.batch.protocol.output.BatchReport.Range.Builder getOriginPositionBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getOriginPositionFieldBuilder().getBuilder(); + public boolean hasComponentRef() { + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
+ * optional int32 component_ref = 1; */ - public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getOriginPositionOrBuilder() { - if (originPositionBuilder_ != null) { - return originPositionBuilder_.getMessageOrBuilder(); - } else { - return originPosition_; - } + public int getComponentRef() { + return componentRef_; } /** - * optional .Range origin_position = 1; - * - *
-       * Origin position in current file
-       * 
+ * optional int32 component_ref = 1; */ - private com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> - getOriginPositionFieldBuilder() { - if (originPositionBuilder_ == null) { - originPositionBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( - getOriginPosition(), - getParentForChildren(), - isClean()); - originPosition_ = null; - } - return originPositionBuilder_; + public Builder setComponentRef(int value) { + bitField0_ |= 0x00000001; + componentRef_ = value; + onChanged(); + return this; + } + /** + * optional int32 component_ref = 1; + */ + public Builder clearComponentRef() { + bitField0_ = (bitField0_ & ~0x00000001); + componentRef_ = 0; + onChanged(); + return this; } - private java.util.List duplicate_ = + private java.util.List changeset_ = java.util.Collections.emptyList(); - private void ensureDuplicateIsMutable() { + private void ensureChangesetIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { - duplicate_ = new java.util.ArrayList(duplicate_); + changeset_ = new java.util.ArrayList(changeset_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Duplicate, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder> duplicateBuilder_; + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder, org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder> changesetBuilder_; /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public java.util.List getDuplicateList() { - if (duplicateBuilder_ == null) { - return java.util.Collections.unmodifiableList(duplicate_); + public java.util.List getChangesetList() { + if (changesetBuilder_ == null) { + return java.util.Collections.unmodifiableList(changeset_); } else { - return duplicateBuilder_.getMessageList(); + return changesetBuilder_.getMessageList(); } } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public int getDuplicateCount() { - if (duplicateBuilder_ == null) { - return duplicate_.size(); + public int getChangesetCount() { + if (changesetBuilder_ == null) { + return changeset_.size(); } else { - return duplicateBuilder_.getCount(); + return changesetBuilder_.getCount(); } } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Duplicate getDuplicate(int index) { - if (duplicateBuilder_ == null) { - return duplicate_.get(index); + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset getChangeset(int index) { + if (changesetBuilder_ == null) { + return changeset_.get(index); } else { - return duplicateBuilder_.getMessage(index); + return changesetBuilder_.getMessage(index); } } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder setDuplicate( - int index, org.sonar.batch.protocol.output.BatchReport.Duplicate value) { - if (duplicateBuilder_ == null) { + public Builder setChangeset( + int index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset value) { + if (changesetBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDuplicateIsMutable(); - duplicate_.set(index, value); + ensureChangesetIsMutable(); + changeset_.set(index, value); onChanged(); } else { - duplicateBuilder_.setMessage(index, value); + changesetBuilder_.setMessage(index, value); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder setDuplicate( - int index, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder builderForValue) { - if (duplicateBuilder_ == null) { - ensureDuplicateIsMutable(); - duplicate_.set(index, builderForValue.build()); + public Builder setChangeset( + int index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder builderForValue) { + if (changesetBuilder_ == null) { + ensureChangesetIsMutable(); + changeset_.set(index, builderForValue.build()); onChanged(); } else { - duplicateBuilder_.setMessage(index, builderForValue.build()); + changesetBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder addDuplicate(org.sonar.batch.protocol.output.BatchReport.Duplicate value) { - if (duplicateBuilder_ == null) { + public Builder addChangeset(org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset value) { + if (changesetBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDuplicateIsMutable(); - duplicate_.add(value); + ensureChangesetIsMutable(); + changeset_.add(value); onChanged(); } else { - duplicateBuilder_.addMessage(value); + changesetBuilder_.addMessage(value); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder addDuplicate( - int index, org.sonar.batch.protocol.output.BatchReport.Duplicate value) { - if (duplicateBuilder_ == null) { + public Builder addChangeset( + int index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset value) { + if (changesetBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDuplicateIsMutable(); - duplicate_.add(index, value); + ensureChangesetIsMutable(); + changeset_.add(index, value); onChanged(); } else { - duplicateBuilder_.addMessage(index, value); + changesetBuilder_.addMessage(index, value); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder addDuplicate( - org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder builderForValue) { - if (duplicateBuilder_ == null) { - ensureDuplicateIsMutable(); - duplicate_.add(builderForValue.build()); + public Builder addChangeset( + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder builderForValue) { + if (changesetBuilder_ == null) { + ensureChangesetIsMutable(); + changeset_.add(builderForValue.build()); onChanged(); } else { - duplicateBuilder_.addMessage(builderForValue.build()); + changesetBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder addDuplicate( - int index, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder builderForValue) { - if (duplicateBuilder_ == null) { - ensureDuplicateIsMutable(); - duplicate_.add(index, builderForValue.build()); + public Builder addChangeset( + int index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder builderForValue) { + if (changesetBuilder_ == null) { + ensureChangesetIsMutable(); + changeset_.add(index, builderForValue.build()); onChanged(); } else { - duplicateBuilder_.addMessage(index, builderForValue.build()); + changesetBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder addAllDuplicate( - java.lang.Iterable values) { - if (duplicateBuilder_ == null) { - ensureDuplicateIsMutable(); + public Builder addAllChangeset( + java.lang.Iterable values) { + if (changesetBuilder_ == null) { + ensureChangesetIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, duplicate_); + values, changeset_); onChanged(); } else { - duplicateBuilder_.addAllMessages(values); + changesetBuilder_.addAllMessages(values); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder clearDuplicate() { - if (duplicateBuilder_ == null) { - duplicate_ = java.util.Collections.emptyList(); + public Builder clearChangeset() { + if (changesetBuilder_ == null) { + changeset_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - duplicateBuilder_.clear(); + changesetBuilder_.clear(); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public Builder removeDuplicate(int index) { - if (duplicateBuilder_ == null) { - ensureDuplicateIsMutable(); - duplicate_.remove(index); + public Builder removeChangeset(int index) { + if (changesetBuilder_ == null) { + ensureChangesetIsMutable(); + changeset_.remove(index); onChanged(); } else { - duplicateBuilder_.remove(index); + changesetBuilder_.remove(index); } return this; } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder getDuplicateBuilder( + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder getChangesetBuilder( int index) { - return getDuplicateFieldBuilder().getBuilder(index); + return getChangesetFieldBuilder().getBuilder(index); } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder getDuplicateOrBuilder( + public org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder getChangesetOrBuilder( int index) { - if (duplicateBuilder_ == null) { - return duplicate_.get(index); } else { - return duplicateBuilder_.getMessageOrBuilder(index); + if (changesetBuilder_ == null) { + return changeset_.get(index); } else { + return changesetBuilder_.getMessageOrBuilder(index); } } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public java.util.List - getDuplicateOrBuilderList() { - if (duplicateBuilder_ != null) { - return duplicateBuilder_.getMessageOrBuilderList(); + public java.util.List + getChangesetOrBuilderList() { + if (changesetBuilder_ != null) { + return changesetBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(duplicate_); + return java.util.Collections.unmodifiableList(changeset_); } } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder addDuplicateBuilder() { - return getDuplicateFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.Duplicate.getDefaultInstance()); + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder addChangesetBuilder() { + return getChangesetFieldBuilder().addBuilder( + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.getDefaultInstance()); } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder addDuplicateBuilder( + public org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder addChangesetBuilder( int index) { - return getDuplicateFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.Duplicate.getDefaultInstance()); + return getChangesetFieldBuilder().addBuilder( + index, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.getDefaultInstance()); } /** - * repeated .Duplicate duplicate = 2; + * repeated .Changesets.Changeset changeset = 2; */ - public java.util.List - getDuplicateBuilderList() { - return getDuplicateFieldBuilder().getBuilderList(); + public java.util.List + getChangesetBuilderList() { + return getChangesetFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Duplicate, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder> - getDuplicateFieldBuilder() { - if (duplicateBuilder_ == null) { - duplicateBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Duplicate, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder>( - duplicate_, + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder, org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder> + getChangesetFieldBuilder() { + if (changesetBuilder_ == null) { + changesetBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset, org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset.Builder, org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder>( + changeset_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); - duplicate_ = null; + changeset_ = null; } - return duplicateBuilder_; + return changesetBuilder_; } - // @@protoc_insertion_point(builder_scope:Duplication) + private java.util.List changesetIndexByLine_ = java.util.Collections.emptyList(); + private void ensureChangesetIndexByLineIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + changesetIndexByLine_ = new java.util.ArrayList(changesetIndexByLine_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+       * 
+ */ + public java.util.List + getChangesetIndexByLineList() { + return java.util.Collections.unmodifiableList(changesetIndexByLine_); + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+       * 
+ */ + public int getChangesetIndexByLineCount() { + return changesetIndexByLine_.size(); + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+       * 
+ */ + public int getChangesetIndexByLine(int index) { + return changesetIndexByLine_.get(index); + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+       * 
+ */ + public Builder setChangesetIndexByLine( + int index, int value) { + ensureChangesetIndexByLineIsMutable(); + changesetIndexByLine_.set(index, value); + onChanged(); + return this; + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+       * 
+ */ + public Builder addChangesetIndexByLine(int value) { + ensureChangesetIndexByLineIsMutable(); + changesetIndexByLine_.add(value); + onChanged(); + return this; + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+       * 
+ */ + public Builder addAllChangesetIndexByLine( + java.lang.Iterable values) { + ensureChangesetIndexByLineIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, changesetIndexByLine_); + onChanged(); + return this; + } + /** + * repeated int32 changesetIndexByLine = 3 [packed = true]; + * + *
+       * if changesetIndexByLine[5] = 2 then it means that changeset[2] is the last one on line 6
+       * 
+ */ + public Builder clearChangesetIndexByLine() { + changesetIndexByLine_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:Changesets) } static { - defaultInstance = new Duplication(true); + defaultInstance = new Changesets(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:Duplication) + // @@protoc_insertion_point(class_scope:Changesets) } - public interface DuplicationsOrBuilder extends - // @@protoc_insertion_point(interface_extends:Duplications) + public interface DuplicateOrBuilder extends + // @@protoc_insertion_point(interface_extends:Duplicate) com.google.protobuf.MessageOrBuilder { /** - * optional int32 component_ref = 1; + * optional int32 other_file_ref = 1; + * + *
+     * Will be null when duplicate is in the same file
+     * 
*/ - boolean hasComponentRef(); + boolean hasOtherFileRef(); /** - * optional int32 component_ref = 1; + * optional int32 other_file_ref = 1; + * + *
+     * Will be null when duplicate is in the same file
+     * 
*/ - int getComponentRef(); + int getOtherFileRef(); /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; + */ + boolean hasRange(); + /** + * optional .Range range = 2; */ - java.util.List - getDuplicationList(); + org.sonar.batch.protocol.output.BatchReport.Range getRange(); /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - org.sonar.batch.protocol.output.BatchReport.Duplication getDuplication(int index); + org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder(); + /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+     * temporary field during development of computation stack for cross project duplications
+     * 
*/ - int getDuplicationCount(); + boolean hasOtherFileKey(); /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+     * temporary field during development of computation stack for cross project duplications
+     * 
*/ - java.util.List - getDuplicationOrBuilderList(); + java.lang.String getOtherFileKey(); /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+     * temporary field during development of computation stack for cross project duplications
+     * 
*/ - org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder getDuplicationOrBuilder( - int index); + com.google.protobuf.ByteString + getOtherFileKeyBytes(); } /** - * Protobuf type {@code Duplications} + * Protobuf type {@code Duplicate} */ - public static final class Duplications extends + public static final class Duplicate extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Duplications) - DuplicationsOrBuilder { - // Use Duplications.newBuilder() to construct. - private Duplications(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:Duplicate) + DuplicateOrBuilder { + // Use Duplicate.newBuilder() to construct. + private Duplicate(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Duplications(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private Duplicate(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Duplications defaultInstance; - public static Duplications getDefaultInstance() { + private static final Duplicate defaultInstance; + public static Duplicate getDefaultInstance() { return defaultInstance; } - public Duplications getDefaultInstanceForType() { + public Duplicate getDefaultInstanceForType() { return defaultInstance; } @@ -12130,7 +10308,7 @@ public final class BatchReport { getUnknownFields() { return this.unknownFields; } - private Duplications( + private Duplicate( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -12155,15 +10333,26 @@ public final class BatchReport { } case 8: { bitField0_ |= 0x00000001; - componentRef_ = input.readInt32(); + otherFileRef_ = input.readInt32(); break; } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - duplication_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; + org.sonar.batch.protocol.output.BatchReport.Range.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = range_.toBuilder(); + } + range_ = input.readMessage(org.sonar.batch.protocol.output.BatchReport.Range.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(range_); + range_ = subBuilder.buildPartial(); } - duplication_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Duplication.PARSER, extensionRegistry)); + bitField0_ |= 0x00000002; + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + otherFileKey_ = bs; break; } } @@ -12174,94 +10363,140 @@ public final class BatchReport { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - duplication_ = java.util.Collections.unmodifiableList(duplication_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplications_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplications_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Duplications.class, org.sonar.batch.protocol.output.BatchReport.Duplications.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Duplicate.class, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Duplications parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Duplicate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Duplications(input, extensionRegistry); + return new Duplicate(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; - public static final int COMPONENT_REF_FIELD_NUMBER = 1; - private int componentRef_; + public static final int OTHER_FILE_REF_FIELD_NUMBER = 1; + private int otherFileRef_; /** - * optional int32 component_ref = 1; + * optional int32 other_file_ref = 1; + * + *
+     * Will be null when duplicate is in the same file
+     * 
*/ - public boolean hasComponentRef() { + public boolean hasOtherFileRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 component_ref = 1; + * optional int32 other_file_ref = 1; + * + *
+     * Will be null when duplicate is in the same file
+     * 
*/ - public int getComponentRef() { - return componentRef_; + public int getOtherFileRef() { + return otherFileRef_; } - public static final int DUPLICATION_FIELD_NUMBER = 2; - private java.util.List duplication_; + public static final int RANGE_FIELD_NUMBER = 2; + private org.sonar.batch.protocol.output.BatchReport.Range range_; /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public java.util.List getDuplicationList() { - return duplication_; + public boolean hasRange() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public java.util.List - getDuplicationOrBuilderList() { - return duplication_; + public org.sonar.batch.protocol.output.BatchReport.Range getRange() { + return range_; } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public int getDuplicationCount() { - return duplication_.size(); + public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder() { + return range_; } + + public static final int OTHER_FILE_KEY_FIELD_NUMBER = 3; + private java.lang.Object otherFileKey_; /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+     * temporary field during development of computation stack for cross project duplications
+     * 
*/ - public org.sonar.batch.protocol.output.BatchReport.Duplication getDuplication(int index) { - return duplication_.get(index); + public boolean hasOtherFileKey() { + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+     * temporary field during development of computation stack for cross project duplications
+     * 
*/ - public org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder getDuplicationOrBuilder( - int index) { - return duplication_.get(index); + public java.lang.String getOtherFileKey() { + java.lang.Object ref = otherFileKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + otherFileKey_ = s; + } + return s; + } + } + /** + * optional string other_file_key = 3; + * + *
+     * temporary field during development of computation stack for cross project duplications
+     * 
+ */ + public com.google.protobuf.ByteString + getOtherFileKeyBytes() { + java.lang.Object ref = otherFileKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + otherFileKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - componentRef_ = 0; - duplication_ = java.util.Collections.emptyList(); + otherFileRef_ = 0; + range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + otherFileKey_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -12277,10 +10512,13 @@ public final class BatchReport { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, componentRef_); + output.writeInt32(1, otherFileRef_); } - for (int i = 0; i < duplication_.size(); i++) { - output.writeMessage(2, duplication_.get(i)); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, range_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getOtherFileKeyBytes()); } getUnknownFields().writeTo(output); } @@ -12293,11 +10531,15 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, componentRef_); + .computeInt32Size(1, otherFileRef_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, range_); } - for (int i = 0; i < duplication_.size(); i++) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, duplication_.get(i)); + .computeBytesSize(3, getOtherFileKeyBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -12311,53 +10553,53 @@ public final class BatchReport { return super.writeReplace(); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseFrom(byte[] data) + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseDelimitedFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Duplications parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplicate parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12366,7 +10608,7 @@ public final class BatchReport { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Duplications prototype) { + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Duplicate prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -12378,25 +10620,25 @@ public final class BatchReport { return builder; } /** - * Protobuf type {@code Duplications} + * Protobuf type {@code Duplicate} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Duplications) - org.sonar.batch.protocol.output.BatchReport.DuplicationsOrBuilder { + // @@protoc_insertion_point(builder_implements:Duplicate) + org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplications_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplications_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Duplications.class, org.sonar.batch.protocol.output.BatchReport.Duplications.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Duplicate.class, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder.class); } - // Construct using org.sonar.batch.protocol.output.BatchReport.Duplications.newBuilder() + // Construct using org.sonar.batch.protocol.output.BatchReport.Duplicate.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -12408,7 +10650,7 @@ public final class BatchReport { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDuplicationFieldBuilder(); + getRangeFieldBuilder(); } } private static Builder create() { @@ -12417,14 +10659,16 @@ public final class BatchReport { public Builder clear() { super.clear(); - componentRef_ = 0; + otherFileRef_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - if (duplicationBuilder_ == null) { - duplication_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + if (rangeBuilder_ == null) { + range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); } else { - duplicationBuilder_.clear(); + rangeBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); + otherFileKey_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -12434,82 +10678,67 @@ public final class BatchReport { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplications_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_descriptor; } - public org.sonar.batch.protocol.output.BatchReport.Duplications getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Duplications.getDefaultInstance(); + public org.sonar.batch.protocol.output.BatchReport.Duplicate getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Duplicate.getDefaultInstance(); } - public org.sonar.batch.protocol.output.BatchReport.Duplications build() { - org.sonar.batch.protocol.output.BatchReport.Duplications result = buildPartial(); + public org.sonar.batch.protocol.output.BatchReport.Duplicate build() { + org.sonar.batch.protocol.output.BatchReport.Duplicate result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.batch.protocol.output.BatchReport.Duplications buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Duplications result = new org.sonar.batch.protocol.output.BatchReport.Duplications(this); + public org.sonar.batch.protocol.output.BatchReport.Duplicate buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Duplicate result = new org.sonar.batch.protocol.output.BatchReport.Duplicate(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.componentRef_ = componentRef_; - if (duplicationBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - duplication_ = java.util.Collections.unmodifiableList(duplication_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.duplication_ = duplication_; + result.otherFileRef_ = otherFileRef_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + if (rangeBuilder_ == null) { + result.range_ = range_; } else { - result.duplication_ = duplicationBuilder_.build(); + result.range_ = rangeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; } + result.otherFileKey_ = otherFileKey_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Duplications) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Duplications)other); + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Duplicate) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Duplicate)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Duplications other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Duplications.getDefaultInstance()) return this; - if (other.hasComponentRef()) { - setComponentRef(other.getComponentRef()); + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Duplicate other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Duplicate.getDefaultInstance()) return this; + if (other.hasOtherFileRef()) { + setOtherFileRef(other.getOtherFileRef()); } - if (duplicationBuilder_ == null) { - if (!other.duplication_.isEmpty()) { - if (duplication_.isEmpty()) { - duplication_ = other.duplication_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDuplicationIsMutable(); - duplication_.addAll(other.duplication_); - } - onChanged(); - } - } else { - if (!other.duplication_.isEmpty()) { - if (duplicationBuilder_.isEmpty()) { - duplicationBuilder_.dispose(); - duplicationBuilder_ = null; - duplication_ = other.duplication_; - bitField0_ = (bitField0_ & ~0x00000002); - duplicationBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDuplicationFieldBuilder() : null; - } else { - duplicationBuilder_.addAllMessages(other.duplication_); - } - } + if (other.hasRange()) { + mergeRange(other.getRange()); + } + if (other.hasOtherFileKey()) { + bitField0_ |= 0x00000004; + otherFileKey_ = other.otherFileKey_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -12523,11 +10752,11 @@ public final class BatchReport { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Duplications parsedMessage = null; + org.sonar.batch.protocol.output.BatchReport.Duplicate parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Duplications) e.getUnfinishedMessage(); + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Duplicate) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -12538,385 +10767,354 @@ public final class BatchReport { } private int bitField0_; - private int componentRef_ ; + private int otherFileRef_ ; /** - * optional int32 component_ref = 1; + * optional int32 other_file_ref = 1; + * + *
+       * Will be null when duplicate is in the same file
+       * 
*/ - public boolean hasComponentRef() { + public boolean hasOtherFileRef() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 component_ref = 1; + * optional int32 other_file_ref = 1; + * + *
+       * Will be null when duplicate is in the same file
+       * 
*/ - public int getComponentRef() { - return componentRef_; + public int getOtherFileRef() { + return otherFileRef_; } /** - * optional int32 component_ref = 1; + * optional int32 other_file_ref = 1; + * + *
+       * Will be null when duplicate is in the same file
+       * 
*/ - public Builder setComponentRef(int value) { + public Builder setOtherFileRef(int value) { bitField0_ |= 0x00000001; - componentRef_ = value; + otherFileRef_ = value; onChanged(); return this; } /** - * optional int32 component_ref = 1; + * optional int32 other_file_ref = 1; + * + *
+       * Will be null when duplicate is in the same file
+       * 
*/ - public Builder clearComponentRef() { + public Builder clearOtherFileRef() { bitField0_ = (bitField0_ & ~0x00000001); - componentRef_ = 0; + otherFileRef_ = 0; onChanged(); return this; } - private java.util.List duplication_ = - java.util.Collections.emptyList(); - private void ensureDuplicationIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - duplication_ = new java.util.ArrayList(duplication_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Duplication, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder> duplicationBuilder_; - - /** - * repeated .Duplication duplication = 2; - */ - public java.util.List getDuplicationList() { - if (duplicationBuilder_ == null) { - return java.util.Collections.unmodifiableList(duplication_); - } else { - return duplicationBuilder_.getMessageList(); - } - } - /** - * repeated .Duplication duplication = 2; - */ - public int getDuplicationCount() { - if (duplicationBuilder_ == null) { - return duplication_.size(); - } else { - return duplicationBuilder_.getCount(); - } - } - /** - * repeated .Duplication duplication = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Duplication getDuplication(int index) { - if (duplicationBuilder_ == null) { - return duplication_.get(index); - } else { - return duplicationBuilder_.getMessage(index); - } - } - /** - * repeated .Duplication duplication = 2; - */ - public Builder setDuplication( - int index, org.sonar.batch.protocol.output.BatchReport.Duplication value) { - if (duplicationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDuplicationIsMutable(); - duplication_.set(index, value); - onChanged(); - } else { - duplicationBuilder_.setMessage(index, value); - } - return this; + private org.sonar.batch.protocol.output.BatchReport.Range range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> rangeBuilder_; + /** + * optional .Range range = 2; + */ + public boolean hasRange() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public Builder setDuplication( - int index, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder builderForValue) { - if (duplicationBuilder_ == null) { - ensureDuplicationIsMutable(); - duplication_.set(index, builderForValue.build()); - onChanged(); + public org.sonar.batch.protocol.output.BatchReport.Range getRange() { + if (rangeBuilder_ == null) { + return range_; } else { - duplicationBuilder_.setMessage(index, builderForValue.build()); + return rangeBuilder_.getMessage(); } - return this; } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public Builder addDuplication(org.sonar.batch.protocol.output.BatchReport.Duplication value) { - if (duplicationBuilder_ == null) { + public Builder setRange(org.sonar.batch.protocol.output.BatchReport.Range value) { + if (rangeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureDuplicationIsMutable(); - duplication_.add(value); + range_ = value; onChanged(); } else { - duplicationBuilder_.addMessage(value); + rangeBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; return this; } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public Builder addDuplication( - int index, org.sonar.batch.protocol.output.BatchReport.Duplication value) { - if (duplicationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDuplicationIsMutable(); - duplication_.add(index, value); + public Builder setRange( + org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { + if (rangeBuilder_ == null) { + range_ = builderForValue.build(); onChanged(); } else { - duplicationBuilder_.addMessage(index, value); + rangeBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; return this; } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public Builder addDuplication( - org.sonar.batch.protocol.output.BatchReport.Duplication.Builder builderForValue) { - if (duplicationBuilder_ == null) { - ensureDuplicationIsMutable(); - duplication_.add(builderForValue.build()); + public Builder mergeRange(org.sonar.batch.protocol.output.BatchReport.Range value) { + if (rangeBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + range_ != org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()) { + range_ = + org.sonar.batch.protocol.output.BatchReport.Range.newBuilder(range_).mergeFrom(value).buildPartial(); + } else { + range_ = value; + } onChanged(); } else { - duplicationBuilder_.addMessage(builderForValue.build()); + rangeBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; return this; } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public Builder addDuplication( - int index, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder builderForValue) { - if (duplicationBuilder_ == null) { - ensureDuplicationIsMutable(); - duplication_.add(index, builderForValue.build()); + public Builder clearRange() { + if (rangeBuilder_ == null) { + range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); onChanged(); } else { - duplicationBuilder_.addMessage(index, builderForValue.build()); + rangeBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public Builder addAllDuplication( - java.lang.Iterable values) { - if (duplicationBuilder_ == null) { - ensureDuplicationIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, duplication_); - onChanged(); - } else { - duplicationBuilder_.addAllMessages(values); - } - return this; + public org.sonar.batch.protocol.output.BatchReport.Range.Builder getRangeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getRangeFieldBuilder().getBuilder(); } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public Builder clearDuplication() { - if (duplicationBuilder_ == null) { - duplication_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder() { + if (rangeBuilder_ != null) { + return rangeBuilder_.getMessageOrBuilder(); } else { - duplicationBuilder_.clear(); + return range_; } - return this; } /** - * repeated .Duplication duplication = 2; + * optional .Range range = 2; */ - public Builder removeDuplication(int index) { - if (duplicationBuilder_ == null) { - ensureDuplicationIsMutable(); - duplication_.remove(index); - onChanged(); - } else { - duplicationBuilder_.remove(index); + private com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> + getRangeFieldBuilder() { + if (rangeBuilder_ == null) { + rangeBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( + getRange(), + getParentForChildren(), + isClean()); + range_ = null; } - return this; + return rangeBuilder_; } + + private java.lang.Object otherFileKey_ = ""; /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+       * temporary field during development of computation stack for cross project duplications
+       * 
*/ - public org.sonar.batch.protocol.output.BatchReport.Duplication.Builder getDuplicationBuilder( - int index) { - return getDuplicationFieldBuilder().getBuilder(index); + public boolean hasOtherFileKey() { + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+       * temporary field during development of computation stack for cross project duplications
+       * 
*/ - public org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder getDuplicationOrBuilder( - int index) { - if (duplicationBuilder_ == null) { - return duplication_.get(index); } else { - return duplicationBuilder_.getMessageOrBuilder(index); + public java.lang.String getOtherFileKey() { + java.lang.Object ref = otherFileKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + otherFileKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; } } /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+       * temporary field during development of computation stack for cross project duplications
+       * 
*/ - public java.util.List - getDuplicationOrBuilderList() { - if (duplicationBuilder_ != null) { - return duplicationBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.ByteString + getOtherFileKeyBytes() { + java.lang.Object ref = otherFileKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + otherFileKey_ = b; + return b; } else { - return java.util.Collections.unmodifiableList(duplication_); + return (com.google.protobuf.ByteString) ref; } } /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+       * temporary field during development of computation stack for cross project duplications
+       * 
*/ - public org.sonar.batch.protocol.output.BatchReport.Duplication.Builder addDuplicationBuilder() { - return getDuplicationFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.Duplication.getDefaultInstance()); + public Builder setOtherFileKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + otherFileKey_ = value; + onChanged(); + return this; } /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+       * temporary field during development of computation stack for cross project duplications
+       * 
*/ - public org.sonar.batch.protocol.output.BatchReport.Duplication.Builder addDuplicationBuilder( - int index) { - return getDuplicationFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.Duplication.getDefaultInstance()); + public Builder clearOtherFileKey() { + bitField0_ = (bitField0_ & ~0x00000004); + otherFileKey_ = getDefaultInstance().getOtherFileKey(); + onChanged(); + return this; } /** - * repeated .Duplication duplication = 2; + * optional string other_file_key = 3; + * + *
+       * temporary field during development of computation stack for cross project duplications
+       * 
*/ - public java.util.List - getDuplicationBuilderList() { - return getDuplicationFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Duplication, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder> - getDuplicationFieldBuilder() { - if (duplicationBuilder_ == null) { - duplicationBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Duplication, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder>( - duplication_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - duplication_ = null; - } - return duplicationBuilder_; + public Builder setOtherFileKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + otherFileKey_ = value; + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:Duplications) + // @@protoc_insertion_point(builder_scope:Duplicate) } static { - defaultInstance = new Duplications(true); + defaultInstance = new Duplicate(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:Duplications) + // @@protoc_insertion_point(class_scope:Duplicate) } - public interface RangeOrBuilder extends - // @@protoc_insertion_point(interface_extends:Range) + public interface DuplicationOrBuilder extends + // @@protoc_insertion_point(interface_extends:Duplication) com.google.protobuf.MessageOrBuilder { /** - * optional int32 start_line = 1; + * optional .Range origin_position = 1; * *
-     * Should never be null
+     * Origin position in current file
      * 
*/ - boolean hasStartLine(); + boolean hasOriginPosition(); /** - * optional int32 start_line = 1; + * optional .Range origin_position = 1; * *
-     * Should never be null
+     * Origin position in current file
      * 
*/ - int getStartLine(); - + org.sonar.batch.protocol.output.BatchReport.Range getOriginPosition(); /** - * optional int32 end_line = 2; + * optional .Range origin_position = 1; * *
-     * End line (inclusive). Null means it is same as start line
+     * Origin position in current file
      * 
*/ - boolean hasEndLine(); + org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getOriginPositionOrBuilder(); + /** - * optional int32 end_line = 2; - * - *
-     * End line (inclusive). Null means it is same as start line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - int getEndLine(); - + java.util.List + getDuplicateList(); /** - * optional int32 start_offset = 3; - * - *
-     * If null it means range starts at the first offset of start line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - boolean hasStartOffset(); + org.sonar.batch.protocol.output.BatchReport.Duplicate getDuplicate(int index); /** - * optional int32 start_offset = 3; - * - *
-     * If null it means range starts at the first offset of start line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - int getStartOffset(); - + int getDuplicateCount(); /** - * optional int32 end_offset = 4; - * - *
-     * If null it means range ends at the last offset of end line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - boolean hasEndOffset(); + java.util.List + getDuplicateOrBuilderList(); /** - * optional int32 end_offset = 4; - * - *
-     * If null it means range ends at the last offset of end line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - int getEndOffset(); + org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder getDuplicateOrBuilder( + int index); } /** - * Protobuf type {@code Range} - * - *
-   * Lines start at 1 and line offsets start at 0
-   * 
+ * Protobuf type {@code Duplication} */ - public static final class Range extends + public static final class Duplication extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Range) - RangeOrBuilder { - // Use Range.newBuilder() to construct. - private Range(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:Duplication) + DuplicationOrBuilder { + // Use Duplication.newBuilder() to construct. + private Duplication(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Range(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private Duplication(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Range defaultInstance; - public static Range getDefaultInstance() { + private static final Duplication defaultInstance; + public static Duplication getDefaultInstance() { return defaultInstance; } - public Range getDefaultInstanceForType() { + public Duplication getDefaultInstanceForType() { return defaultInstance; } @@ -12926,7 +11124,7 @@ public final class BatchReport { getUnknownFields() { return this.unknownFields; } - private Range( + private Duplication( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -12949,24 +11147,25 @@ public final class BatchReport { } break; } - case 8: { + case 10: { + org.sonar.batch.protocol.output.BatchReport.Range.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = originPosition_.toBuilder(); + } + originPosition_ = input.readMessage(org.sonar.batch.protocol.output.BatchReport.Range.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(originPosition_); + originPosition_ = subBuilder.buildPartial(); + } bitField0_ |= 0x00000001; - startLine_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - endLine_ = input.readInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - startOffset_ = input.readInt32(); break; } - case 32: { - bitField0_ |= 0x00000008; - endOffset_ = input.readInt32(); + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + duplicate_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + duplicate_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Duplicate.PARSER, extensionRegistry)); break; } } @@ -12977,135 +11176,112 @@ public final class BatchReport { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + duplicate_ = java.util.Collections.unmodifiableList(duplicate_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Range.class, org.sonar.batch.protocol.output.BatchReport.Range.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Duplication.class, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder.class); } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Range parsePartialFrom( + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Duplication parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Range(input, extensionRegistry); + return new Duplication(input, extensionRegistry); } }; @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } private int bitField0_; - public static final int START_LINE_FIELD_NUMBER = 1; - private int startLine_; + public static final int ORIGIN_POSITION_FIELD_NUMBER = 1; + private org.sonar.batch.protocol.output.BatchReport.Range originPosition_; /** - * optional int32 start_line = 1; + * optional .Range origin_position = 1; * *
-     * Should never be null
+     * Origin position in current file
      * 
*/ - public boolean hasStartLine() { + public boolean hasOriginPosition() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 start_line = 1; + * optional .Range origin_position = 1; * *
-     * Should never be null
+     * Origin position in current file
      * 
*/ - public int getStartLine() { - return startLine_; + public org.sonar.batch.protocol.output.BatchReport.Range getOriginPosition() { + return originPosition_; } - - public static final int END_LINE_FIELD_NUMBER = 2; - private int endLine_; /** - * optional int32 end_line = 2; + * optional .Range origin_position = 1; * *
-     * End line (inclusive). Null means it is same as start line
+     * Origin position in current file
      * 
*/ - public boolean hasEndLine() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getOriginPositionOrBuilder() { + return originPosition_; } + + public static final int DUPLICATE_FIELD_NUMBER = 2; + private java.util.List duplicate_; /** - * optional int32 end_line = 2; - * - *
-     * End line (inclusive). Null means it is same as start line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - public int getEndLine() { - return endLine_; + public java.util.List getDuplicateList() { + return duplicate_; } - - public static final int START_OFFSET_FIELD_NUMBER = 3; - private int startOffset_; /** - * optional int32 start_offset = 3; - * - *
-     * If null it means range starts at the first offset of start line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - public boolean hasStartOffset() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public java.util.List + getDuplicateOrBuilderList() { + return duplicate_; } /** - * optional int32 start_offset = 3; - * - *
-     * If null it means range starts at the first offset of start line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - public int getStartOffset() { - return startOffset_; + public int getDuplicateCount() { + return duplicate_.size(); } - - public static final int END_OFFSET_FIELD_NUMBER = 4; - private int endOffset_; /** - * optional int32 end_offset = 4; - * - *
-     * If null it means range ends at the last offset of end line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - public boolean hasEndOffset() { - return ((bitField0_ & 0x00000008) == 0x00000008); + public org.sonar.batch.protocol.output.BatchReport.Duplicate getDuplicate(int index) { + return duplicate_.get(index); } /** - * optional int32 end_offset = 4; - * - *
-     * If null it means range ends at the last offset of end line
-     * 
+ * repeated .Duplicate duplicate = 2; */ - public int getEndOffset() { - return endOffset_; + public org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder getDuplicateOrBuilder( + int index) { + return duplicate_.get(index); } private void initFields() { - startLine_ = 0; - endLine_ = 0; - startOffset_ = 0; - endOffset_ = 0; + originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + duplicate_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -13121,16 +11297,10 @@ public final class BatchReport { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, startLine_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, endLine_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, startOffset_); + output.writeMessage(1, originPosition_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(4, endOffset_); + for (int i = 0; i < duplicate_.size(); i++) { + output.writeMessage(2, duplicate_.get(i)); } getUnknownFields().writeTo(output); } @@ -13143,19 +11313,11 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, startLine_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, endLine_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, startOffset_); + .computeMessageSize(1, originPosition_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + for (int i = 0; i < duplicate_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, endOffset_); + .computeMessageSize(2, duplicate_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -13169,53 +11331,53 @@ public final class BatchReport { return super.writeReplace(); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom(byte[] data) + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseDelimitedFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Duplication parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13224,7 +11386,7 @@ public final class BatchReport { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Range prototype) { + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Duplication prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -13236,29 +11398,25 @@ public final class BatchReport { return builder; } /** - * Protobuf type {@code Range} - * - *
-     * Lines start at 1 and line offsets start at 0
-     * 
+ * Protobuf type {@code Duplication} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Range) - org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder { + // @@protoc_insertion_point(builder_implements:Duplication) + org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Range.class, org.sonar.batch.protocol.output.BatchReport.Range.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Duplication.class, org.sonar.batch.protocol.output.BatchReport.Duplication.Builder.class); } - // Construct using org.sonar.batch.protocol.output.BatchReport.Range.newBuilder() + // Construct using org.sonar.batch.protocol.output.BatchReport.Duplication.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -13270,6 +11428,8 @@ public final class BatchReport { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getOriginPositionFieldBuilder(); + getDuplicateFieldBuilder(); } } private static Builder create() { @@ -13278,14 +11438,18 @@ public final class BatchReport { public Builder clear() { super.clear(); - startLine_ = 0; + if (originPositionBuilder_ == null) { + originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + } else { + originPositionBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - endLine_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - startOffset_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - endOffset_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); + if (duplicateBuilder_ == null) { + duplicate_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + duplicateBuilder_.clear(); + } return this; } @@ -13295,68 +11459,86 @@ public final class BatchReport { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_descriptor; } - public org.sonar.batch.protocol.output.BatchReport.Range getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + public org.sonar.batch.protocol.output.BatchReport.Duplication getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Duplication.getDefaultInstance(); } - public org.sonar.batch.protocol.output.BatchReport.Range build() { - org.sonar.batch.protocol.output.BatchReport.Range result = buildPartial(); + public org.sonar.batch.protocol.output.BatchReport.Duplication build() { + org.sonar.batch.protocol.output.BatchReport.Duplication result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.batch.protocol.output.BatchReport.Range buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Range result = new org.sonar.batch.protocol.output.BatchReport.Range(this); + public org.sonar.batch.protocol.output.BatchReport.Duplication buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Duplication result = new org.sonar.batch.protocol.output.BatchReport.Duplication(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.startLine_ = startLine_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.endLine_ = endLine_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + if (originPositionBuilder_ == null) { + result.originPosition_ = originPosition_; + } else { + result.originPosition_ = originPositionBuilder_.build(); } - result.startOffset_ = startOffset_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; + if (duplicateBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + duplicate_ = java.util.Collections.unmodifiableList(duplicate_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.duplicate_ = duplicate_; + } else { + result.duplicate_ = duplicateBuilder_.build(); } - result.endOffset_ = endOffset_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Range) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Range)other); + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Duplication) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Duplication)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Range other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()) return this; - if (other.hasStartLine()) { - setStartLine(other.getStartLine()); - } - if (other.hasEndLine()) { - setEndLine(other.getEndLine()); - } - if (other.hasStartOffset()) { - setStartOffset(other.getStartOffset()); + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Duplication other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Duplication.getDefaultInstance()) return this; + if (other.hasOriginPosition()) { + mergeOriginPosition(other.getOriginPosition()); } - if (other.hasEndOffset()) { - setEndOffset(other.getEndOffset()); + if (duplicateBuilder_ == null) { + if (!other.duplicate_.isEmpty()) { + if (duplicate_.isEmpty()) { + duplicate_ = other.duplicate_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDuplicateIsMutable(); + duplicate_.addAll(other.duplicate_); + } + onChanged(); + } + } else { + if (!other.duplicate_.isEmpty()) { + if (duplicateBuilder_.isEmpty()) { + duplicateBuilder_.dispose(); + duplicateBuilder_ = null; + duplicate_ = other.duplicate_; + bitField0_ = (bitField0_ & ~0x00000002); + duplicateBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getDuplicateFieldBuilder() : null; + } else { + duplicateBuilder_.addAllMessages(other.duplicate_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -13370,1290 +11552,1407 @@ public final class BatchReport { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Range parsedMessage = null; + org.sonar.batch.protocol.output.BatchReport.Duplication parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Range) e.getUnfinishedMessage(); + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Duplication) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } - return this; + return this; + } + private int bitField0_; + + private org.sonar.batch.protocol.output.BatchReport.Range originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> originPositionBuilder_; + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + public boolean hasOriginPosition() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + public org.sonar.batch.protocol.output.BatchReport.Range getOriginPosition() { + if (originPositionBuilder_ == null) { + return originPosition_; + } else { + return originPositionBuilder_.getMessage(); + } + } + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + public Builder setOriginPosition(org.sonar.batch.protocol.output.BatchReport.Range value) { + if (originPositionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + originPosition_ = value; + onChanged(); + } else { + originPositionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + public Builder setOriginPosition( + org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { + if (originPositionBuilder_ == null) { + originPosition_ = builderForValue.build(); + onChanged(); + } else { + originPositionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + public Builder mergeOriginPosition(org.sonar.batch.protocol.output.BatchReport.Range value) { + if (originPositionBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + originPosition_ != org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()) { + originPosition_ = + org.sonar.batch.protocol.output.BatchReport.Range.newBuilder(originPosition_).mergeFrom(value).buildPartial(); + } else { + originPosition_ = value; + } + onChanged(); + } else { + originPositionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + public Builder clearOriginPosition() { + if (originPositionBuilder_ == null) { + originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + onChanged(); + } else { + originPositionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + public org.sonar.batch.protocol.output.BatchReport.Range.Builder getOriginPositionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getOriginPositionFieldBuilder().getBuilder(); + } + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getOriginPositionOrBuilder() { + if (originPositionBuilder_ != null) { + return originPositionBuilder_.getMessageOrBuilder(); + } else { + return originPosition_; + } + } + /** + * optional .Range origin_position = 1; + * + *
+       * Origin position in current file
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> + getOriginPositionFieldBuilder() { + if (originPositionBuilder_ == null) { + originPositionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( + getOriginPosition(), + getParentForChildren(), + isClean()); + originPosition_ = null; + } + return originPositionBuilder_; + } + + private java.util.List duplicate_ = + java.util.Collections.emptyList(); + private void ensureDuplicateIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + duplicate_ = new java.util.ArrayList(duplicate_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Duplicate, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder> duplicateBuilder_; + + /** + * repeated .Duplicate duplicate = 2; + */ + public java.util.List getDuplicateList() { + if (duplicateBuilder_ == null) { + return java.util.Collections.unmodifiableList(duplicate_); + } else { + return duplicateBuilder_.getMessageList(); + } + } + /** + * repeated .Duplicate duplicate = 2; + */ + public int getDuplicateCount() { + if (duplicateBuilder_ == null) { + return duplicate_.size(); + } else { + return duplicateBuilder_.getCount(); + } } - private int bitField0_; - - private int startLine_ ; /** - * optional int32 start_line = 1; - * - *
-       * Should never be null
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public boolean hasStartLine() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public org.sonar.batch.protocol.output.BatchReport.Duplicate getDuplicate(int index) { + if (duplicateBuilder_ == null) { + return duplicate_.get(index); + } else { + return duplicateBuilder_.getMessage(index); + } } /** - * optional int32 start_line = 1; - * - *
-       * Should never be null
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public int getStartLine() { - return startLine_; + public Builder setDuplicate( + int index, org.sonar.batch.protocol.output.BatchReport.Duplicate value) { + if (duplicateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDuplicateIsMutable(); + duplicate_.set(index, value); + onChanged(); + } else { + duplicateBuilder_.setMessage(index, value); + } + return this; } /** - * optional int32 start_line = 1; - * - *
-       * Should never be null
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public Builder setStartLine(int value) { - bitField0_ |= 0x00000001; - startLine_ = value; - onChanged(); + public Builder setDuplicate( + int index, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder builderForValue) { + if (duplicateBuilder_ == null) { + ensureDuplicateIsMutable(); + duplicate_.set(index, builderForValue.build()); + onChanged(); + } else { + duplicateBuilder_.setMessage(index, builderForValue.build()); + } return this; } /** - * optional int32 start_line = 1; - * - *
-       * Should never be null
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public Builder clearStartLine() { - bitField0_ = (bitField0_ & ~0x00000001); - startLine_ = 0; - onChanged(); + public Builder addDuplicate(org.sonar.batch.protocol.output.BatchReport.Duplicate value) { + if (duplicateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDuplicateIsMutable(); + duplicate_.add(value); + onChanged(); + } else { + duplicateBuilder_.addMessage(value); + } return this; } - - private int endLine_ ; /** - * optional int32 end_line = 2; - * - *
-       * End line (inclusive). Null means it is same as start line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public boolean hasEndLine() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public Builder addDuplicate( + int index, org.sonar.batch.protocol.output.BatchReport.Duplicate value) { + if (duplicateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDuplicateIsMutable(); + duplicate_.add(index, value); + onChanged(); + } else { + duplicateBuilder_.addMessage(index, value); + } + return this; } /** - * optional int32 end_line = 2; - * - *
-       * End line (inclusive). Null means it is same as start line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public int getEndLine() { - return endLine_; + public Builder addDuplicate( + org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder builderForValue) { + if (duplicateBuilder_ == null) { + ensureDuplicateIsMutable(); + duplicate_.add(builderForValue.build()); + onChanged(); + } else { + duplicateBuilder_.addMessage(builderForValue.build()); + } + return this; } /** - * optional int32 end_line = 2; - * - *
-       * End line (inclusive). Null means it is same as start line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public Builder setEndLine(int value) { - bitField0_ |= 0x00000002; - endLine_ = value; - onChanged(); + public Builder addDuplicate( + int index, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder builderForValue) { + if (duplicateBuilder_ == null) { + ensureDuplicateIsMutable(); + duplicate_.add(index, builderForValue.build()); + onChanged(); + } else { + duplicateBuilder_.addMessage(index, builderForValue.build()); + } return this; } /** - * optional int32 end_line = 2; - * - *
-       * End line (inclusive). Null means it is same as start line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public Builder clearEndLine() { - bitField0_ = (bitField0_ & ~0x00000002); - endLine_ = 0; - onChanged(); + public Builder addAllDuplicate( + java.lang.Iterable values) { + if (duplicateBuilder_ == null) { + ensureDuplicateIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, duplicate_); + onChanged(); + } else { + duplicateBuilder_.addAllMessages(values); + } return this; } - - private int startOffset_ ; /** - * optional int32 start_offset = 3; - * - *
-       * If null it means range starts at the first offset of start line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public boolean hasStartOffset() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public Builder clearDuplicate() { + if (duplicateBuilder_ == null) { + duplicate_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + duplicateBuilder_.clear(); + } + return this; } /** - * optional int32 start_offset = 3; - * - *
-       * If null it means range starts at the first offset of start line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public int getStartOffset() { - return startOffset_; + public Builder removeDuplicate(int index) { + if (duplicateBuilder_ == null) { + ensureDuplicateIsMutable(); + duplicate_.remove(index); + onChanged(); + } else { + duplicateBuilder_.remove(index); + } + return this; } /** - * optional int32 start_offset = 3; - * - *
-       * If null it means range starts at the first offset of start line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public Builder setStartOffset(int value) { - bitField0_ |= 0x00000004; - startOffset_ = value; - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder getDuplicateBuilder( + int index) { + return getDuplicateFieldBuilder().getBuilder(index); } /** - * optional int32 start_offset = 3; - * - *
-       * If null it means range starts at the first offset of start line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public Builder clearStartOffset() { - bitField0_ = (bitField0_ & ~0x00000004); - startOffset_ = 0; - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder getDuplicateOrBuilder( + int index) { + if (duplicateBuilder_ == null) { + return duplicate_.get(index); } else { + return duplicateBuilder_.getMessageOrBuilder(index); + } } - - private int endOffset_ ; /** - * optional int32 end_offset = 4; - * - *
-       * If null it means range ends at the last offset of end line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public boolean hasEndOffset() { - return ((bitField0_ & 0x00000008) == 0x00000008); + public java.util.List + getDuplicateOrBuilderList() { + if (duplicateBuilder_ != null) { + return duplicateBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(duplicate_); + } } /** - * optional int32 end_offset = 4; - * - *
-       * If null it means range ends at the last offset of end line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public int getEndOffset() { - return endOffset_; + public org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder addDuplicateBuilder() { + return getDuplicateFieldBuilder().addBuilder( + org.sonar.batch.protocol.output.BatchReport.Duplicate.getDefaultInstance()); } /** - * optional int32 end_offset = 4; - * - *
-       * If null it means range ends at the last offset of end line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public Builder setEndOffset(int value) { - bitField0_ |= 0x00000008; - endOffset_ = value; - onChanged(); - return this; + public org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder addDuplicateBuilder( + int index) { + return getDuplicateFieldBuilder().addBuilder( + index, org.sonar.batch.protocol.output.BatchReport.Duplicate.getDefaultInstance()); } /** - * optional int32 end_offset = 4; - * - *
-       * If null it means range ends at the last offset of end line
-       * 
+ * repeated .Duplicate duplicate = 2; */ - public Builder clearEndOffset() { - bitField0_ = (bitField0_ & ~0x00000008); - endOffset_ = 0; - onChanged(); - return this; + public java.util.List + getDuplicateBuilderList() { + return getDuplicateFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Duplicate, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder> + getDuplicateFieldBuilder() { + if (duplicateBuilder_ == null) { + duplicateBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Duplicate, org.sonar.batch.protocol.output.BatchReport.Duplicate.Builder, org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder>( + duplicate_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + duplicate_ = null; + } + return duplicateBuilder_; } - // @@protoc_insertion_point(builder_scope:Range) + // @@protoc_insertion_point(builder_scope:Duplication) } static { - defaultInstance = new Range(true); + defaultInstance = new Duplication(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:Range) + // @@protoc_insertion_point(class_scope:Duplication) } - public interface SymbolsOrBuilder extends - // @@protoc_insertion_point(interface_extends:Symbols) + public interface RangeOrBuilder extends + // @@protoc_insertion_point(interface_extends:Range) com.google.protobuf.MessageOrBuilder { /** - * optional int32 file_ref = 1; + * optional int32 start_line = 1; + * + *
+     * Should never be null
+     * 
+ */ + boolean hasStartLine(); + /** + * optional int32 start_line = 1; + * + *
+     * Should never be null
+     * 
+ */ + int getStartLine(); + + /** + * optional int32 end_line = 2; + * + *
+     * End line (inclusive). Null means it is same as start line
+     * 
+ */ + boolean hasEndLine(); + /** + * optional int32 end_line = 2; + * + *
+     * End line (inclusive). Null means it is same as start line
+     * 
+ */ + int getEndLine(); + + /** + * optional int32 start_offset = 3; + * + *
+     * If null it means range starts at the first offset of start line
+     * 
+ */ + boolean hasStartOffset(); + /** + * optional int32 start_offset = 3; + * + *
+     * If null it means range starts at the first offset of start line
+     * 
+ */ + int getStartOffset(); + + /** + * optional int32 end_offset = 4; + * + *
+     * If null it means range ends at the last offset of end line
+     * 
+ */ + boolean hasEndOffset(); + /** + * optional int32 end_offset = 4; + * + *
+     * If null it means range ends at the last offset of end line
+     * 
+ */ + int getEndOffset(); + } + /** + * Protobuf type {@code Range} + * + *
+   * Lines start at 1 and line offsets start at 0
+   * 
+ */ + public static final class Range extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Range) + RangeOrBuilder { + // Use Range.newBuilder() to construct. + private Range(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Range(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Range defaultInstance; + public static Range getDefaultInstance() { + return defaultInstance; + } + + public Range getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Range( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + startLine_ = input.readInt32(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + endLine_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + startOffset_ = input.readInt32(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + endOffset_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Range.class, org.sonar.batch.protocol.output.BatchReport.Range.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Range parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Range(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int START_LINE_FIELD_NUMBER = 1; + private int startLine_; + /** + * optional int32 start_line = 1; + * + *
+     * Should never be null
+     * 
+ */ + public boolean hasStartLine() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 start_line = 1; + * + *
+     * Should never be null
+     * 
+ */ + public int getStartLine() { + return startLine_; + } + + public static final int END_LINE_FIELD_NUMBER = 2; + private int endLine_; + /** + * optional int32 end_line = 2; + * + *
+     * End line (inclusive). Null means it is same as start line
+     * 
*/ - boolean hasFileRef(); + public boolean hasEndLine() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } /** - * optional int32 file_ref = 1; + * optional int32 end_line = 2; + * + *
+     * End line (inclusive). Null means it is same as start line
+     * 
*/ - int getFileRef(); + public int getEndLine() { + return endLine_; + } + public static final int START_OFFSET_FIELD_NUMBER = 3; + private int startOffset_; /** - * repeated .Symbols.Symbol symbol = 2; - */ - java.util.List - getSymbolList(); - /** - * repeated .Symbols.Symbol symbol = 2; + * optional int32 start_offset = 3; + * + *
+     * If null it means range starts at the first offset of start line
+     * 
*/ - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol getSymbol(int index); + public boolean hasStartOffset() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } /** - * repeated .Symbols.Symbol symbol = 2; + * optional int32 start_offset = 3; + * + *
+     * If null it means range starts at the first offset of start line
+     * 
*/ - int getSymbolCount(); + public int getStartOffset() { + return startOffset_; + } + + public static final int END_OFFSET_FIELD_NUMBER = 4; + private int endOffset_; /** - * repeated .Symbols.Symbol symbol = 2; + * optional int32 end_offset = 4; + * + *
+     * If null it means range ends at the last offset of end line
+     * 
*/ - java.util.List - getSymbolOrBuilderList(); + public boolean hasEndOffset() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } /** - * repeated .Symbols.Symbol symbol = 2; + * optional int32 end_offset = 4; + * + *
+     * If null it means range ends at the last offset of end line
+     * 
*/ - org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder getSymbolOrBuilder( - int index); - } - /** - * Protobuf type {@code Symbols} - */ - public static final class Symbols extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Symbols) - SymbolsOrBuilder { - // Use Symbols.newBuilder() to construct. - private Symbols(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); + public int getEndOffset() { + return endOffset_; } - private Symbols(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Symbols defaultInstance; - public static Symbols getDefaultInstance() { - return defaultInstance; + private void initFields() { + startLine_ = 0; + endLine_ = 0; + startOffset_ = 0; + endOffset_ = 0; } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - public Symbols getDefaultInstanceForType() { - return defaultInstance; + memoizedIsInitialized = 1; + return true; } - private final com.google.protobuf.UnknownFieldSet unknownFields; + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, startLine_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, endLine_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, startOffset_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(4, endOffset_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, startLine_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, endLine_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, startOffset_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, endOffset_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); } - private Symbols( - com.google.protobuf.CodedInputStream input, + + public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - 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; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - bitField0_ |= 0x00000001; - fileRef_ = input.readInt32(); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - symbol_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - symbol_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.PARSER, extensionRegistry)); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - symbol_ = java.util.Collections.unmodifiableList(symbol_); + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonar.batch.protocol.output.BatchReport.Range parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Range prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Range} + * + *
+     * Lines start at 1 and line offsets start at 0
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Range) + org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Range.class, org.sonar.batch.protocol.output.BatchReport.Range.Builder.class); + } + + // Construct using org.sonar.batch.protocol.output.BatchReport.Range.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_descriptor; - } + private static Builder create() { + return new Builder(); + } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Symbols.class, org.sonar.batch.protocol.output.BatchReport.Symbols.Builder.class); - } + public Builder clear() { + super.clear(); + startLine_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + endLine_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + startOffset_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); + endOffset_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Symbols parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Symbols(input, extensionRegistry); + public Builder clone() { + return create().mergeFrom(buildPartial()); } - }; - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_descriptor; + } - public interface SymbolOrBuilder extends - // @@protoc_insertion_point(interface_extends:Symbols.Symbol) - com.google.protobuf.MessageOrBuilder { + public org.sonar.batch.protocol.output.BatchReport.Range getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + } - /** - * optional .Range declaration = 1; - */ - boolean hasDeclaration(); - /** - * optional .Range declaration = 1; - */ - org.sonar.batch.protocol.output.BatchReport.Range getDeclaration(); - /** - * optional .Range declaration = 1; - */ - org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getDeclarationOrBuilder(); + public org.sonar.batch.protocol.output.BatchReport.Range build() { + org.sonar.batch.protocol.output.BatchReport.Range result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - /** - * repeated .Range reference = 2; - */ - java.util.List - getReferenceList(); - /** - * repeated .Range reference = 2; - */ - org.sonar.batch.protocol.output.BatchReport.Range getReference(int index); - /** - * repeated .Range reference = 2; - */ - int getReferenceCount(); - /** - * repeated .Range reference = 2; - */ - java.util.List - getReferenceOrBuilderList(); - /** - * repeated .Range reference = 2; - */ - org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getReferenceOrBuilder( - int index); - } - /** - * Protobuf type {@code Symbols.Symbol} - */ - public static final class Symbol extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:Symbols.Symbol) - SymbolOrBuilder { - // Use Symbol.newBuilder() to construct. - private Symbol(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); + public org.sonar.batch.protocol.output.BatchReport.Range buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Range result = new org.sonar.batch.protocol.output.BatchReport.Range(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.startLine_ = startLine_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.endLine_ = endLine_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.startOffset_ = startOffset_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.endOffset_ = endOffset_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; } - private Symbol(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Symbol defaultInstance; - public static Symbol getDefaultInstance() { - return defaultInstance; + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Range) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Range)other); + } else { + super.mergeFrom(other); + return this; + } } - public Symbol getDefaultInstanceForType() { - return defaultInstance; + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Range other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()) return this; + if (other.hasStartLine()) { + setStartLine(other.getStartLine()); + } + if (other.hasEndLine()) { + setEndLine(other.getEndLine()); + } + if (other.hasStartOffset()) { + setStartOffset(other.getStartOffset()); + } + if (other.hasEndOffset()) { + setEndOffset(other.getEndOffset()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; } - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; + public final boolean isInitialized() { + return true; } - private Symbol( + + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); + throws java.io.IOException { + org.sonar.batch.protocol.output.BatchReport.Range parsedMessage = null; try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - org.sonar.batch.protocol.output.BatchReport.Range.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = declaration_.toBuilder(); - } - declaration_ = input.readMessage(org.sonar.batch.protocol.output.BatchReport.Range.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(declaration_); - declaration_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - reference_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - reference_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Range.PARSER, extensionRegistry)); - break; - } - } - } + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Range) e.getUnfinishedMessage(); + throw e; } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - reference_ = java.util.Collections.unmodifiableList(reference_); + if (parsedMessage != null) { + mergeFrom(parsedMessage); } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); } + return this; } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_Symbol_descriptor; - } + private int bitField0_; - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.class, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder.class); + private int startLine_ ; + /** + * optional int32 start_line = 1; + * + *
+       * Should never be null
+       * 
+ */ + public boolean hasStartLine() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Symbol parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Symbol(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; + /** + * optional int32 start_line = 1; + * + *
+       * Should never be null
+       * 
+ */ + public int getStartLine() { + return startLine_; + } + /** + * optional int32 start_line = 1; + * + *
+       * Should never be null
+       * 
+ */ + public Builder setStartLine(int value) { + bitField0_ |= 0x00000001; + startLine_ = value; + onChanged(); + return this; + } + /** + * optional int32 start_line = 1; + * + *
+       * Should never be null
+       * 
+ */ + public Builder clearStartLine() { + bitField0_ = (bitField0_ & ~0x00000001); + startLine_ = 0; + onChanged(); + return this; } - private int bitField0_; - public static final int DECLARATION_FIELD_NUMBER = 1; - private org.sonar.batch.protocol.output.BatchReport.Range declaration_; + private int endLine_ ; /** - * optional .Range declaration = 1; + * optional int32 end_line = 2; + * + *
+       * End line (inclusive). Null means it is same as start line
+       * 
*/ - public boolean hasDeclaration() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public boolean hasEndLine() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional .Range declaration = 1; + * optional int32 end_line = 2; + * + *
+       * End line (inclusive). Null means it is same as start line
+       * 
*/ - public org.sonar.batch.protocol.output.BatchReport.Range getDeclaration() { - return declaration_; + public int getEndLine() { + return endLine_; } /** - * optional .Range declaration = 1; + * optional int32 end_line = 2; + * + *
+       * End line (inclusive). Null means it is same as start line
+       * 
*/ - public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getDeclarationOrBuilder() { - return declaration_; + public Builder setEndLine(int value) { + bitField0_ |= 0x00000002; + endLine_ = value; + onChanged(); + return this; } - - public static final int REFERENCE_FIELD_NUMBER = 2; - private java.util.List reference_; /** - * repeated .Range reference = 2; + * optional int32 end_line = 2; + * + *
+       * End line (inclusive). Null means it is same as start line
+       * 
*/ - public java.util.List getReferenceList() { - return reference_; + public Builder clearEndLine() { + bitField0_ = (bitField0_ & ~0x00000002); + endLine_ = 0; + onChanged(); + return this; } + + private int startOffset_ ; /** - * repeated .Range reference = 2; + * optional int32 start_offset = 3; + * + *
+       * If null it means range starts at the first offset of start line
+       * 
*/ - public java.util.List - getReferenceOrBuilderList() { - return reference_; + public boolean hasStartOffset() { + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * repeated .Range reference = 2; + * optional int32 start_offset = 3; + * + *
+       * If null it means range starts at the first offset of start line
+       * 
*/ - public int getReferenceCount() { - return reference_.size(); + public int getStartOffset() { + return startOffset_; } /** - * repeated .Range reference = 2; + * optional int32 start_offset = 3; + * + *
+       * If null it means range starts at the first offset of start line
+       * 
*/ - public org.sonar.batch.protocol.output.BatchReport.Range getReference(int index) { - return reference_.get(index); + public Builder setStartOffset(int value) { + bitField0_ |= 0x00000004; + startOffset_ = value; + onChanged(); + return this; } /** - * repeated .Range reference = 2; + * optional int32 start_offset = 3; + * + *
+       * If null it means range starts at the first offset of start line
+       * 
*/ - public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getReferenceOrBuilder( - int index) { - return reference_.get(index); - } - - private void initFields() { - declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - reference_ = java.util.Collections.emptyList(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, declaration_); - } - for (int i = 0; i < reference_.size(); i++) { - output.writeMessage(2, reference_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, declaration_); - } - for (int i = 0; i < reference_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, reference_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); + public Builder clearStartOffset() { + bitField0_ = (bitField0_ & ~0x00000004); + startOffset_ = 0; + onChanged(); + return this; } - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol prototype) { - return newBuilder().mergeFrom(prototype); + private int endOffset_ ; + /** + * optional int32 end_offset = 4; + * + *
+       * If null it means range ends at the last offset of end line
+       * 
+ */ + public boolean hasEndOffset() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; + /** + * optional int32 end_offset = 4; + * + *
+       * If null it means range ends at the last offset of end line
+       * 
+ */ + public int getEndOffset() { + return endOffset_; } /** - * Protobuf type {@code Symbols.Symbol} + * optional int32 end_offset = 4; + * + *
+       * If null it means range ends at the last offset of end line
+       * 
*/ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Symbols.Symbol) - org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_Symbol_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_Symbol_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.class, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder.class); - } - - // Construct using org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDeclarationFieldBuilder(); - getReferenceFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } + public Builder setEndOffset(int value) { + bitField0_ |= 0x00000008; + endOffset_ = value; + onChanged(); + return this; + } + /** + * optional int32 end_offset = 4; + * + *
+       * If null it means range ends at the last offset of end line
+       * 
+ */ + public Builder clearEndOffset() { + bitField0_ = (bitField0_ & ~0x00000008); + endOffset_ = 0; + onChanged(); + return this; + } - public Builder clear() { - super.clear(); - if (declarationBuilder_ == null) { - declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - } else { - declarationBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - if (referenceBuilder_ == null) { - reference_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - referenceBuilder_.clear(); - } - return this; - } + // @@protoc_insertion_point(builder_scope:Range) + } - public Builder clone() { - return create().mergeFrom(buildPartial()); - } + static { + defaultInstance = new Range(true); + defaultInstance.initFields(); + } - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_Symbol_descriptor; - } + // @@protoc_insertion_point(class_scope:Range) + } - public org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.getDefaultInstance(); - } + public interface SymbolOrBuilder extends + // @@protoc_insertion_point(interface_extends:Symbol) + com.google.protobuf.MessageOrBuilder { - public org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol build() { - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } + /** + * optional .Range declaration = 1; + */ + boolean hasDeclaration(); + /** + * optional .Range declaration = 1; + */ + org.sonar.batch.protocol.output.BatchReport.Range getDeclaration(); + /** + * optional .Range declaration = 1; + */ + org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getDeclarationOrBuilder(); - public org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol result = new org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (declarationBuilder_ == null) { - result.declaration_ = declaration_; - } else { - result.declaration_ = declarationBuilder_.build(); - } - if (referenceBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - reference_ = java.util.Collections.unmodifiableList(reference_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.reference_ = reference_; - } else { - result.reference_ = referenceBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } + /** + * repeated .Range reference = 2; + */ + java.util.List + getReferenceList(); + /** + * repeated .Range reference = 2; + */ + org.sonar.batch.protocol.output.BatchReport.Range getReference(int index); + /** + * repeated .Range reference = 2; + */ + int getReferenceCount(); + /** + * repeated .Range reference = 2; + */ + java.util.List + getReferenceOrBuilderList(); + /** + * repeated .Range reference = 2; + */ + org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getReferenceOrBuilder( + int index); + } + /** + * Protobuf type {@code Symbol} + */ + public static final class Symbol extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Symbol) + SymbolOrBuilder { + // Use Symbol.newBuilder() to construct. + private Symbol(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Symbol(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol)other); - } else { - super.mergeFrom(other); - return this; - } - } + private static final Symbol defaultInstance; + public static Symbol getDefaultInstance() { + return defaultInstance; + } - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.getDefaultInstance()) return this; - if (other.hasDeclaration()) { - mergeDeclaration(other.getDeclaration()); - } - if (referenceBuilder_ == null) { - if (!other.reference_.isEmpty()) { - if (reference_.isEmpty()) { - reference_ = other.reference_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureReferenceIsMutable(); - reference_.addAll(other.reference_); + public Symbol getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Symbol( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + 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; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; } - onChanged(); + break; } - } else { - if (!other.reference_.isEmpty()) { - if (referenceBuilder_.isEmpty()) { - referenceBuilder_.dispose(); - referenceBuilder_ = null; - reference_ = other.reference_; - bitField0_ = (bitField0_ & ~0x00000002); - referenceBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getReferenceFieldBuilder() : null; - } else { - referenceBuilder_.addAllMessages(other.reference_); + case 10: { + org.sonar.batch.protocol.output.BatchReport.Range.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = declaration_.toBuilder(); } + declaration_ = input.readMessage(org.sonar.batch.protocol.output.BatchReport.Range.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(declaration_); + declaration_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + reference_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + reference_.add(input.readMessage(org.sonar.batch.protocol.output.BatchReport.Range.PARSER, extensionRegistry)); + break; } } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private org.sonar.batch.protocol.output.BatchReport.Range declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> declarationBuilder_; - /** - * optional .Range declaration = 1; - */ - public boolean hasDeclaration() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .Range declaration = 1; - */ - public org.sonar.batch.protocol.output.BatchReport.Range getDeclaration() { - if (declarationBuilder_ == null) { - return declaration_; - } else { - return declarationBuilder_.getMessage(); - } - } - /** - * optional .Range declaration = 1; - */ - public Builder setDeclaration(org.sonar.batch.protocol.output.BatchReport.Range value) { - if (declarationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - declaration_ = value; - onChanged(); - } else { - declarationBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .Range declaration = 1; - */ - public Builder setDeclaration( - org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { - if (declarationBuilder_ == null) { - declaration_ = builderForValue.build(); - onChanged(); - } else { - declarationBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .Range declaration = 1; - */ - public Builder mergeDeclaration(org.sonar.batch.protocol.output.BatchReport.Range value) { - if (declarationBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - declaration_ != org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()) { - declaration_ = - org.sonar.batch.protocol.output.BatchReport.Range.newBuilder(declaration_).mergeFrom(value).buildPartial(); - } else { - declaration_ = value; - } - onChanged(); - } else { - declarationBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * optional .Range declaration = 1; - */ - public Builder clearDeclaration() { - if (declarationBuilder_ == null) { - declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); - onChanged(); - } else { - declarationBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * optional .Range declaration = 1; - */ - public org.sonar.batch.protocol.output.BatchReport.Range.Builder getDeclarationBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getDeclarationFieldBuilder().getBuilder(); - } - /** - * optional .Range declaration = 1; - */ - public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getDeclarationOrBuilder() { - if (declarationBuilder_ != null) { - return declarationBuilder_.getMessageOrBuilder(); - } else { - return declaration_; - } - } - /** - * optional .Range declaration = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> - getDeclarationFieldBuilder() { - if (declarationBuilder_ == null) { - declarationBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( - getDeclaration(), - getParentForChildren(), - isClean()); - declaration_ = null; - } - return declarationBuilder_; - } - - private java.util.List reference_ = - java.util.Collections.emptyList(); - private void ensureReferenceIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - reference_ = new java.util.ArrayList(reference_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> referenceBuilder_; - - /** - * repeated .Range reference = 2; - */ - public java.util.List getReferenceList() { - if (referenceBuilder_ == null) { - return java.util.Collections.unmodifiableList(reference_); - } else { - return referenceBuilder_.getMessageList(); - } - } - /** - * repeated .Range reference = 2; - */ - public int getReferenceCount() { - if (referenceBuilder_ == null) { - return reference_.size(); - } else { - return referenceBuilder_.getCount(); - } - } - /** - * repeated .Range reference = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Range getReference(int index) { - if (referenceBuilder_ == null) { - return reference_.get(index); - } else { - return referenceBuilder_.getMessage(index); - } - } - /** - * repeated .Range reference = 2; - */ - public Builder setReference( - int index, org.sonar.batch.protocol.output.BatchReport.Range value) { - if (referenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceIsMutable(); - reference_.set(index, value); - onChanged(); - } else { - referenceBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public Builder setReference( - int index, org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { - if (referenceBuilder_ == null) { - ensureReferenceIsMutable(); - reference_.set(index, builderForValue.build()); - onChanged(); - } else { - referenceBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public Builder addReference(org.sonar.batch.protocol.output.BatchReport.Range value) { - if (referenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceIsMutable(); - reference_.add(value); - onChanged(); - } else { - referenceBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public Builder addReference( - int index, org.sonar.batch.protocol.output.BatchReport.Range value) { - if (referenceBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReferenceIsMutable(); - reference_.add(index, value); - onChanged(); - } else { - referenceBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public Builder addReference( - org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { - if (referenceBuilder_ == null) { - ensureReferenceIsMutable(); - reference_.add(builderForValue.build()); - onChanged(); - } else { - referenceBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public Builder addReference( - int index, org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { - if (referenceBuilder_ == null) { - ensureReferenceIsMutable(); - reference_.add(index, builderForValue.build()); - onChanged(); - } else { - referenceBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public Builder addAllReference( - java.lang.Iterable values) { - if (referenceBuilder_ == null) { - ensureReferenceIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, reference_); - onChanged(); - } else { - referenceBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public Builder clearReference() { - if (referenceBuilder_ == null) { - reference_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - referenceBuilder_.clear(); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public Builder removeReference(int index) { - if (referenceBuilder_ == null) { - ensureReferenceIsMutable(); - reference_.remove(index); - onChanged(); - } else { - referenceBuilder_.remove(index); - } - return this; - } - /** - * repeated .Range reference = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Range.Builder getReferenceBuilder( - int index) { - return getReferenceFieldBuilder().getBuilder(index); - } - /** - * repeated .Range reference = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getReferenceOrBuilder( - int index) { - if (referenceBuilder_ == null) { - return reference_.get(index); } else { - return referenceBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .Range reference = 2; - */ - public java.util.List - getReferenceOrBuilderList() { - if (referenceBuilder_ != null) { - return referenceBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(reference_); - } - } - /** - * repeated .Range reference = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Range.Builder addReferenceBuilder() { - return getReferenceFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()); } - /** - * repeated .Range reference = 2; - */ - public org.sonar.batch.protocol.output.BatchReport.Range.Builder addReferenceBuilder( - int index) { - return getReferenceFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()); - } - /** - * repeated .Range reference = 2; - */ - public java.util.List - getReferenceBuilderList() { - return getReferenceFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> - getReferenceFieldBuilder() { - if (referenceBuilder_ == null) { - referenceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( - reference_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - reference_ = null; - } - return referenceBuilder_; + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + reference_ = java.util.Collections.unmodifiableList(reference_); } - - // @@protoc_insertion_point(builder_scope:Symbols.Symbol) + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbol_descriptor; + } - static { - defaultInstance = new Symbol(true); - defaultInstance.initFields(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbol_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonar.batch.protocol.output.BatchReport.Symbol.class, org.sonar.batch.protocol.output.BatchReport.Symbol.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Symbol parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Symbol(input, extensionRegistry); } + }; - // @@protoc_insertion_point(class_scope:Symbols.Symbol) + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } private int bitField0_; - public static final int FILE_REF_FIELD_NUMBER = 1; - private int fileRef_; + public static final int DECLARATION_FIELD_NUMBER = 1; + private org.sonar.batch.protocol.output.BatchReport.Range declaration_; /** - * optional int32 file_ref = 1; + * optional .Range declaration = 1; */ - public boolean hasFileRef() { + public boolean hasDeclaration() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 file_ref = 1; + * optional .Range declaration = 1; + */ + public org.sonar.batch.protocol.output.BatchReport.Range getDeclaration() { + return declaration_; + } + /** + * optional .Range declaration = 1; */ - public int getFileRef() { - return fileRef_; + public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getDeclarationOrBuilder() { + return declaration_; } - public static final int SYMBOL_FIELD_NUMBER = 2; - private java.util.List symbol_; + public static final int REFERENCE_FIELD_NUMBER = 2; + private java.util.List reference_; /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public java.util.List getSymbolList() { - return symbol_; + public java.util.List getReferenceList() { + return reference_; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public java.util.List - getSymbolOrBuilderList() { - return symbol_; + public java.util.List + getReferenceOrBuilderList() { + return reference_; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public int getSymbolCount() { - return symbol_.size(); + public int getReferenceCount() { + return reference_.size(); } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol getSymbol(int index) { - return symbol_.get(index); + public org.sonar.batch.protocol.output.BatchReport.Range getReference(int index) { + return reference_.get(index); } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder getSymbolOrBuilder( + public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getReferenceOrBuilder( int index) { - return symbol_.get(index); + return reference_.get(index); } private void initFields() { - fileRef_ = 0; - symbol_ = java.util.Collections.emptyList(); + declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + reference_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -14669,10 +12968,10 @@ public final class BatchReport { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, fileRef_); + output.writeMessage(1, declaration_); } - for (int i = 0; i < symbol_.size(); i++) { - output.writeMessage(2, symbol_.get(i)); + for (int i = 0; i < reference_.size(); i++) { + output.writeMessage(2, reference_.get(i)); } getUnknownFields().writeTo(output); } @@ -14685,11 +12984,11 @@ public final class BatchReport { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, fileRef_); + .computeMessageSize(1, declaration_); } - for (int i = 0; i < symbol_.size(); i++) { + for (int i = 0; i < reference_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, symbol_.get(i)); + .computeMessageSize(2, reference_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -14703,53 +13002,53 @@ public final class BatchReport { return super.writeReplace(); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseFrom(byte[] data) + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseDelimitedFrom(java.io.InputStream input) + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseDelimitedFrom( + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonar.batch.protocol.output.BatchReport.Symbols parseFrom( + public static org.sonar.batch.protocol.output.BatchReport.Symbol parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14758,7 +13057,7 @@ public final class BatchReport { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Symbols prototype) { + public static Builder newBuilder(org.sonar.batch.protocol.output.BatchReport.Symbol prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -14770,25 +13069,25 @@ public final class BatchReport { return builder; } /** - * Protobuf type {@code Symbols} + * Protobuf type {@code Symbol} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:Symbols) - org.sonar.batch.protocol.output.BatchReport.SymbolsOrBuilder { + // @@protoc_insertion_point(builder_implements:Symbol) + org.sonar.batch.protocol.output.BatchReport.SymbolOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbol_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_fieldAccessorTable + return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbol_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonar.batch.protocol.output.BatchReport.Symbols.class, org.sonar.batch.protocol.output.BatchReport.Symbols.Builder.class); + org.sonar.batch.protocol.output.BatchReport.Symbol.class, org.sonar.batch.protocol.output.BatchReport.Symbol.Builder.class); } - // Construct using org.sonar.batch.protocol.output.BatchReport.Symbols.newBuilder() + // Construct using org.sonar.batch.protocol.output.BatchReport.Symbol.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -14800,7 +13099,8 @@ public final class BatchReport { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getSymbolFieldBuilder(); + getDeclarationFieldBuilder(); + getReferenceFieldBuilder(); } } private static Builder create() { @@ -14809,13 +13109,17 @@ public final class BatchReport { public Builder clear() { super.clear(); - fileRef_ = 0; + if (declarationBuilder_ == null) { + declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + } else { + declarationBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - if (symbolBuilder_ == null) { - symbol_ = java.util.Collections.emptyList(); + if (referenceBuilder_ == null) { + reference_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { - symbolBuilder_.clear(); + referenceBuilder_.clear(); } return this; } @@ -14826,37 +13130,41 @@ public final class BatchReport { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_descriptor; + return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbol_descriptor; } - public org.sonar.batch.protocol.output.BatchReport.Symbols getDefaultInstanceForType() { - return org.sonar.batch.protocol.output.BatchReport.Symbols.getDefaultInstance(); + public org.sonar.batch.protocol.output.BatchReport.Symbol getDefaultInstanceForType() { + return org.sonar.batch.protocol.output.BatchReport.Symbol.getDefaultInstance(); } - public org.sonar.batch.protocol.output.BatchReport.Symbols build() { - org.sonar.batch.protocol.output.BatchReport.Symbols result = buildPartial(); + public org.sonar.batch.protocol.output.BatchReport.Symbol build() { + org.sonar.batch.protocol.output.BatchReport.Symbol result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonar.batch.protocol.output.BatchReport.Symbols buildPartial() { - org.sonar.batch.protocol.output.BatchReport.Symbols result = new org.sonar.batch.protocol.output.BatchReport.Symbols(this); + public org.sonar.batch.protocol.output.BatchReport.Symbol buildPartial() { + org.sonar.batch.protocol.output.BatchReport.Symbol result = new org.sonar.batch.protocol.output.BatchReport.Symbol(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.fileRef_ = fileRef_; - if (symbolBuilder_ == null) { + if (declarationBuilder_ == null) { + result.declaration_ = declaration_; + } else { + result.declaration_ = declarationBuilder_.build(); + } + if (referenceBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { - symbol_ = java.util.Collections.unmodifiableList(symbol_); + reference_ = java.util.Collections.unmodifiableList(reference_); bitField0_ = (bitField0_ & ~0x00000002); } - result.symbol_ = symbol_; + result.reference_ = reference_; } else { - result.symbol_ = symbolBuilder_.build(); + result.reference_ = referenceBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); @@ -14864,42 +13172,42 @@ public final class BatchReport { } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonar.batch.protocol.output.BatchReport.Symbols) { - return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Symbols)other); + if (other instanceof org.sonar.batch.protocol.output.BatchReport.Symbol) { + return mergeFrom((org.sonar.batch.protocol.output.BatchReport.Symbol)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Symbols other) { - if (other == org.sonar.batch.protocol.output.BatchReport.Symbols.getDefaultInstance()) return this; - if (other.hasFileRef()) { - setFileRef(other.getFileRef()); + public Builder mergeFrom(org.sonar.batch.protocol.output.BatchReport.Symbol other) { + if (other == org.sonar.batch.protocol.output.BatchReport.Symbol.getDefaultInstance()) return this; + if (other.hasDeclaration()) { + mergeDeclaration(other.getDeclaration()); } - if (symbolBuilder_ == null) { - if (!other.symbol_.isEmpty()) { - if (symbol_.isEmpty()) { - symbol_ = other.symbol_; + if (referenceBuilder_ == null) { + if (!other.reference_.isEmpty()) { + if (reference_.isEmpty()) { + reference_ = other.reference_; bitField0_ = (bitField0_ & ~0x00000002); } else { - ensureSymbolIsMutable(); - symbol_.addAll(other.symbol_); + ensureReferenceIsMutable(); + reference_.addAll(other.reference_); } onChanged(); } } else { - if (!other.symbol_.isEmpty()) { - if (symbolBuilder_.isEmpty()) { - symbolBuilder_.dispose(); - symbolBuilder_ = null; - symbol_ = other.symbol_; + if (!other.reference_.isEmpty()) { + if (referenceBuilder_.isEmpty()) { + referenceBuilder_.dispose(); + referenceBuilder_ = null; + reference_ = other.reference_; bitField0_ = (bitField0_ & ~0x00000002); - symbolBuilder_ = + referenceBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSymbolFieldBuilder() : null; + getReferenceFieldBuilder() : null; } else { - symbolBuilder_.addAllMessages(other.symbol_); + referenceBuilder_.addAllMessages(other.reference_); } } } @@ -14915,11 +13223,11 @@ public final class BatchReport { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonar.batch.protocol.output.BatchReport.Symbols parsedMessage = null; + org.sonar.batch.protocol.output.BatchReport.Symbol parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Symbols) e.getUnfinishedMessage(); + parsedMessage = (org.sonar.batch.protocol.output.BatchReport.Symbol) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -14930,287 +13238,371 @@ public final class BatchReport { } private int bitField0_; - private int fileRef_ ; + private org.sonar.batch.protocol.output.BatchReport.Range declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> declarationBuilder_; /** - * optional int32 file_ref = 1; + * optional .Range declaration = 1; */ - public boolean hasFileRef() { + public boolean hasDeclaration() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 file_ref = 1; + * optional .Range declaration = 1; */ - public int getFileRef() { - return fileRef_; + public org.sonar.batch.protocol.output.BatchReport.Range getDeclaration() { + if (declarationBuilder_ == null) { + return declaration_; + } else { + return declarationBuilder_.getMessage(); + } } /** - * optional int32 file_ref = 1; + * optional .Range declaration = 1; */ - public Builder setFileRef(int value) { + public Builder setDeclaration(org.sonar.batch.protocol.output.BatchReport.Range value) { + if (declarationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + declaration_ = value; + onChanged(); + } else { + declarationBuilder_.setMessage(value); + } bitField0_ |= 0x00000001; - fileRef_ = value; - onChanged(); return this; } /** - * optional int32 file_ref = 1; + * optional .Range declaration = 1; + */ + public Builder setDeclaration( + org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { + if (declarationBuilder_ == null) { + declaration_ = builderForValue.build(); + onChanged(); + } else { + declarationBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .Range declaration = 1; + */ + public Builder mergeDeclaration(org.sonar.batch.protocol.output.BatchReport.Range value) { + if (declarationBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + declaration_ != org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()) { + declaration_ = + org.sonar.batch.protocol.output.BatchReport.Range.newBuilder(declaration_).mergeFrom(value).buildPartial(); + } else { + declaration_ = value; + } + onChanged(); + } else { + declarationBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .Range declaration = 1; */ - public Builder clearFileRef() { + public Builder clearDeclaration() { + if (declarationBuilder_ == null) { + declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance(); + onChanged(); + } else { + declarationBuilder_.clear(); + } bitField0_ = (bitField0_ & ~0x00000001); - fileRef_ = 0; - onChanged(); return this; } + /** + * optional .Range declaration = 1; + */ + public org.sonar.batch.protocol.output.BatchReport.Range.Builder getDeclarationBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getDeclarationFieldBuilder().getBuilder(); + } + /** + * optional .Range declaration = 1; + */ + public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getDeclarationOrBuilder() { + if (declarationBuilder_ != null) { + return declarationBuilder_.getMessageOrBuilder(); + } else { + return declaration_; + } + } + /** + * optional .Range declaration = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> + getDeclarationFieldBuilder() { + if (declarationBuilder_ == null) { + declarationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( + getDeclaration(), + getParentForChildren(), + isClean()); + declaration_ = null; + } + return declarationBuilder_; + } - private java.util.List symbol_ = + private java.util.List reference_ = java.util.Collections.emptyList(); - private void ensureSymbolIsMutable() { + private void ensureReferenceIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { - symbol_ = new java.util.ArrayList(symbol_); + reference_ = new java.util.ArrayList(reference_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder, org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder> symbolBuilder_; + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> referenceBuilder_; /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public java.util.List getSymbolList() { - if (symbolBuilder_ == null) { - return java.util.Collections.unmodifiableList(symbol_); + public java.util.List getReferenceList() { + if (referenceBuilder_ == null) { + return java.util.Collections.unmodifiableList(reference_); } else { - return symbolBuilder_.getMessageList(); + return referenceBuilder_.getMessageList(); } } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public int getSymbolCount() { - if (symbolBuilder_ == null) { - return symbol_.size(); + public int getReferenceCount() { + if (referenceBuilder_ == null) { + return reference_.size(); } else { - return symbolBuilder_.getCount(); + return referenceBuilder_.getCount(); } } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol getSymbol(int index) { - if (symbolBuilder_ == null) { - return symbol_.get(index); + public org.sonar.batch.protocol.output.BatchReport.Range getReference(int index) { + if (referenceBuilder_ == null) { + return reference_.get(index); } else { - return symbolBuilder_.getMessage(index); + return referenceBuilder_.getMessage(index); } } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder setSymbol( - int index, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol value) { - if (symbolBuilder_ == null) { + public Builder setReference( + int index, org.sonar.batch.protocol.output.BatchReport.Range value) { + if (referenceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSymbolIsMutable(); - symbol_.set(index, value); + ensureReferenceIsMutable(); + reference_.set(index, value); onChanged(); } else { - symbolBuilder_.setMessage(index, value); + referenceBuilder_.setMessage(index, value); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder setSymbol( - int index, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder builderForValue) { - if (symbolBuilder_ == null) { - ensureSymbolIsMutable(); - symbol_.set(index, builderForValue.build()); + public Builder setReference( + int index, org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { + if (referenceBuilder_ == null) { + ensureReferenceIsMutable(); + reference_.set(index, builderForValue.build()); onChanged(); } else { - symbolBuilder_.setMessage(index, builderForValue.build()); + referenceBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder addSymbol(org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol value) { - if (symbolBuilder_ == null) { + public Builder addReference(org.sonar.batch.protocol.output.BatchReport.Range value) { + if (referenceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSymbolIsMutable(); - symbol_.add(value); + ensureReferenceIsMutable(); + reference_.add(value); onChanged(); } else { - symbolBuilder_.addMessage(value); + referenceBuilder_.addMessage(value); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder addSymbol( - int index, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol value) { - if (symbolBuilder_ == null) { + public Builder addReference( + int index, org.sonar.batch.protocol.output.BatchReport.Range value) { + if (referenceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSymbolIsMutable(); - symbol_.add(index, value); + ensureReferenceIsMutable(); + reference_.add(index, value); onChanged(); } else { - symbolBuilder_.addMessage(index, value); + referenceBuilder_.addMessage(index, value); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder addSymbol( - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder builderForValue) { - if (symbolBuilder_ == null) { - ensureSymbolIsMutable(); - symbol_.add(builderForValue.build()); + public Builder addReference( + org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { + if (referenceBuilder_ == null) { + ensureReferenceIsMutable(); + reference_.add(builderForValue.build()); onChanged(); } else { - symbolBuilder_.addMessage(builderForValue.build()); + referenceBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder addSymbol( - int index, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder builderForValue) { - if (symbolBuilder_ == null) { - ensureSymbolIsMutable(); - symbol_.add(index, builderForValue.build()); + public Builder addReference( + int index, org.sonar.batch.protocol.output.BatchReport.Range.Builder builderForValue) { + if (referenceBuilder_ == null) { + ensureReferenceIsMutable(); + reference_.add(index, builderForValue.build()); onChanged(); } else { - symbolBuilder_.addMessage(index, builderForValue.build()); + referenceBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder addAllSymbol( - java.lang.Iterable values) { - if (symbolBuilder_ == null) { - ensureSymbolIsMutable(); + public Builder addAllReference( + java.lang.Iterable values) { + if (referenceBuilder_ == null) { + ensureReferenceIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, symbol_); + values, reference_); onChanged(); } else { - symbolBuilder_.addAllMessages(values); + referenceBuilder_.addAllMessages(values); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder clearSymbol() { - if (symbolBuilder_ == null) { - symbol_ = java.util.Collections.emptyList(); + public Builder clearReference() { + if (referenceBuilder_ == null) { + reference_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - symbolBuilder_.clear(); + referenceBuilder_.clear(); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public Builder removeSymbol(int index) { - if (symbolBuilder_ == null) { - ensureSymbolIsMutable(); - symbol_.remove(index); + public Builder removeReference(int index) { + if (referenceBuilder_ == null) { + ensureReferenceIsMutable(); + reference_.remove(index); onChanged(); } else { - symbolBuilder_.remove(index); + referenceBuilder_.remove(index); } return this; } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder getSymbolBuilder( + public org.sonar.batch.protocol.output.BatchReport.Range.Builder getReferenceBuilder( int index) { - return getSymbolFieldBuilder().getBuilder(index); + return getReferenceFieldBuilder().getBuilder(index); } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder getSymbolOrBuilder( + public org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getReferenceOrBuilder( int index) { - if (symbolBuilder_ == null) { - return symbol_.get(index); } else { - return symbolBuilder_.getMessageOrBuilder(index); + if (referenceBuilder_ == null) { + return reference_.get(index); } else { + return referenceBuilder_.getMessageOrBuilder(index); } } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public java.util.List - getSymbolOrBuilderList() { - if (symbolBuilder_ != null) { - return symbolBuilder_.getMessageOrBuilderList(); + public java.util.List + getReferenceOrBuilderList() { + if (referenceBuilder_ != null) { + return referenceBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(symbol_); + return java.util.Collections.unmodifiableList(reference_); } } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder addSymbolBuilder() { - return getSymbolFieldBuilder().addBuilder( - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.getDefaultInstance()); + public org.sonar.batch.protocol.output.BatchReport.Range.Builder addReferenceBuilder() { + return getReferenceFieldBuilder().addBuilder( + org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()); } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder addSymbolBuilder( + public org.sonar.batch.protocol.output.BatchReport.Range.Builder addReferenceBuilder( int index) { - return getSymbolFieldBuilder().addBuilder( - index, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.getDefaultInstance()); + return getReferenceFieldBuilder().addBuilder( + index, org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance()); } /** - * repeated .Symbols.Symbol symbol = 2; + * repeated .Range reference = 2; */ - public java.util.List - getSymbolBuilderList() { - return getSymbolFieldBuilder().getBuilderList(); + public java.util.List + getReferenceBuilderList() { + return getReferenceFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder, org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder> - getSymbolFieldBuilder() { - if (symbolBuilder_ == null) { - symbolBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol, org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol.Builder, org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder>( - symbol_, + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> + getReferenceFieldBuilder() { + if (referenceBuilder_ == null) { + referenceBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>( + reference_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); - symbol_ = null; + reference_ = null; } - return symbolBuilder_; + return referenceBuilder_; } - // @@protoc_insertion_point(builder_scope:Symbols) + // @@protoc_insertion_point(builder_scope:Symbol) } static { - defaultInstance = new Symbols(true); + defaultInstance = new Symbol(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:Symbols) + // @@protoc_insertion_point(class_scope:Symbol) } public interface CoverageOrBuilder extends @@ -19243,6 +17635,16 @@ public final class BatchReport { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Metadata_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_ActiveRule_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_ActiveRule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_ActiveRule_ActiveRuleParam_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_ActiveRule_ActiveRuleParam_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_ComponentLink_descriptor; private static @@ -19258,21 +17660,11 @@ public final class BatchReport { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Measure_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Measures_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_Measures_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Issue_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Issue_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Issues_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_Issues_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Changesets_descriptor; private static @@ -19293,26 +17685,16 @@ public final class BatchReport { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Duplication_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Duplications_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_Duplications_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Range_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_Range_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Symbols_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_Symbols_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Symbols_Symbol_descriptor; + internal_static_Symbol_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_Symbols_Symbol_fieldAccessorTable; + internal_static_Symbol_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_Coverage_descriptor; private static @@ -19347,63 +17729,61 @@ public final class BatchReport { descriptor; static { java.lang.String[] descriptorData = { - "\n\022batch_report.proto\032\017constants.proto\"{\n" + + "\n\022batch_report.proto\032\017constants.proto\"b\n" + "\010Metadata\022\025\n\ranalysis_date\030\001 \001(\003\022\023\n\013proj" + "ect_key\030\002 \001(\t\022\016\n\006branch\030\003 \001(\t\022\032\n\022root_co" + - "mponent_ref\030\004 \001(\005\022\027\n\017active_rule_key\030\005 \003" + - "(\t\"?\n\rComponentLink\022 \n\004type\030\001 \001(\0162\022.Comp" + - "onentLinkType\022\014\n\004href\030\002 \001(\t\"\354\001\n\tComponen" + - "t\022\013\n\003ref\030\001 \001(\005\022\014\n\004path\030\002 \001(\t\022\014\n\004name\030\003 \001" + - "(\t\022\034\n\004type\030\004 \001(\0162\016.ComponentType\022\017\n\007is_t" + - "est\030\005 \001(\010\022\020\n\010language\030\006 \001(\t\022\025\n\tchild_ref" + - "\030\007 \003(\005B\002\020\001\022\034\n\004link\030\010 \003(\0132\016.ComponentLink", - "\022\017\n\007version\030\t \001(\t\022\013\n\003key\030\n \001(\t\022\r\n\005lines\030" + - "\013 \001(\005\022\023\n\013description\030\014 \001(\t\"\335\002\n\007Measure\022%" + - "\n\nvalue_type\030\001 \001(\0162\021.MeasureValueType\022\025\n" + - "\rboolean_value\030\002 \001(\010\022\021\n\tint_value\030\003 \001(\005\022" + - "\022\n\nlong_value\030\004 \001(\003\022\024\n\014double_value\030\005 \001(" + - "\001\022\024\n\014string_value\030\006 \001(\t\022\022\n\nmetric_key\030\007 " + - "\001(\t\022\023\n\013description\030\t \001(\t\022\031\n\021variation_va" + - "lue_1\030\016 \001(\001\022\031\n\021variation_value_2\030\017 \001(\001\022\031" + - "\n\021variation_value_3\030\020 \001(\001\022\031\n\021variation_v" + - "alue_4\030\021 \001(\001\022\031\n\021variation_value_5\030\022 \001(\001\022", - "\021\n\tperson_id\030\024 \001(\005\"<\n\010Measures\022\025\n\rcompon" + - "ent_ref\030\001 \001(\005\022\031\n\007measure\030\002 \003(\0132\010.Measure" + - "\"\242\001\n\005Issue\022\027\n\017rule_repository\030\001 \001(\t\022\020\n\010r" + - "ule_key\030\002 \001(\t\022\014\n\004line\030\003 \001(\005\022\013\n\003msg\030\004 \001(\t" + - "\022\033\n\010severity\030\005 \001(\0162\t.Severity\022\013\n\003tag\030\006 \003" + - "(\t\022\025\n\reffort_to_fix\030\007 \001(\001\022\022\n\nattributes\030" + - "\010 \001(\t\"6\n\006Issues\022\025\n\rcomponent_ref\030\001 \001(\005\022\025" + - "\n\005issue\030\002 \003(\0132\006.Issue\"\254\001\n\nChangesets\022\025\n\r" + - "component_ref\030\001 \001(\005\022(\n\tchangeset\030\002 \003(\0132\025" + - ".Changesets.Changeset\022 \n\024changesetIndexB", - "yLine\030\003 \003(\005B\002\020\001\032;\n\tChangeset\022\020\n\010revision" + - "\030\001 \001(\t\022\016\n\006author\030\002 \001(\t\022\014\n\004date\030\003 \001(\003\"R\n\t" + - "Duplicate\022\026\n\016other_file_ref\030\001 \001(\005\022\025\n\005ran" + - "ge\030\002 \001(\0132\006.Range\022\026\n\016other_file_key\030\003 \001(\t" + - "\"M\n\013Duplication\022\037\n\017origin_position\030\001 \001(\013" + - "2\006.Range\022\035\n\tduplicate\030\002 \003(\0132\n.Duplicate\"" + - "H\n\014Duplications\022\025\n\rcomponent_ref\030\001 \001(\005\022!" + - "\n\013duplication\030\002 \003(\0132\014.Duplication\"W\n\005Ran" + - "ge\022\022\n\nstart_line\030\001 \001(\005\022\020\n\010end_line\030\002 \001(\005" + - "\022\024\n\014start_offset\030\003 \001(\005\022\022\n\nend_offset\030\004 \001", - "(\005\"~\n\007Symbols\022\020\n\010file_ref\030\001 \001(\005\022\037\n\006symbo" + - "l\030\002 \003(\0132\017.Symbols.Symbol\032@\n\006Symbol\022\033\n\013de" + - "claration\030\001 \001(\0132\006.Range\022\031\n\treference\030\002 \003" + - "(\0132\006.Range\"\260\001\n\010Coverage\022\014\n\004line\030\001 \001(\005\022\022\n" + - "\nconditions\030\002 \001(\005\022\017\n\007ut_hits\030\003 \001(\010\022\017\n\007it" + - "_hits\030\004 \001(\010\022\035\n\025ut_covered_conditions\030\005 \001" + - "(\005\022\035\n\025it_covered_conditions\030\006 \001(\005\022\"\n\032ove" + - "rall_covered_conditions\030\007 \001(\005\"L\n\022SyntaxH" + - "ighlighting\022\025\n\005range\030\001 \001(\0132\006.Range\022\037\n\004ty" + - "pe\030\002 \001(\0162\021.HighlightingType\"j\n\004Test\022\014\n\004n", - "ame\030\001 \001(\t\022\033\n\006status\030\002 \001(\0162\013.TestStatus\022\026" + - "\n\016duration_in_ms\030\003 \001(\003\022\022\n\nstacktrace\030\004 \001" + - "(\t\022\013\n\003msg\030\005 \001(\t\"\221\001\n\016CoverageDetail\022\021\n\tte" + - "st_name\030\001 \001(\t\0221\n\014covered_file\030\002 \003(\0132\033.Co" + - "verageDetail.CoveredFile\0329\n\013CoveredFile\022" + - "\020\n\010file_ref\030\001 \001(\005\022\030\n\014covered_line\030\002 \003(\005B" + - "\002\020\001B#\n\037org.sonar.batch.protocol.outputH\001" + "mponent_ref\030\004 \001(\005\"\257\001\n\nActiveRule\022\027\n\017rule" + + "_repository\030\001 \001(\t\022\020\n\010rule_key\030\002 \001(\t\022\033\n\010s" + + "everity\030\003 \001(\0162\t.Severity\022*\n\005param\030\004 \003(\0132" + + "\033.ActiveRule.ActiveRuleParam\032-\n\017ActiveRu" + + "leParam\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"?\n\rC" + + "omponentLink\022 \n\004type\030\001 \001(\0162\022.ComponentLi" + + "nkType\022\014\n\004href\030\002 \001(\t\"\354\001\n\tComponent\022\013\n\003re", + "f\030\001 \001(\005\022\014\n\004path\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\034\n\004t" + + "ype\030\004 \001(\0162\016.ComponentType\022\017\n\007is_test\030\005 \001" + + "(\010\022\020\n\010language\030\006 \001(\t\022\025\n\tchild_ref\030\007 \003(\005B" + + "\002\020\001\022\034\n\004link\030\010 \003(\0132\016.ComponentLink\022\017\n\007ver" + + "sion\030\t \001(\t\022\013\n\003key\030\n \001(\t\022\r\n\005lines\030\013 \001(\005\022\023" + + "\n\013description\030\014 \001(\t\"\335\002\n\007Measure\022%\n\nvalue" + + "_type\030\001 \001(\0162\021.MeasureValueType\022\025\n\rboolea" + + "n_value\030\002 \001(\010\022\021\n\tint_value\030\003 \001(\005\022\022\n\nlong" + + "_value\030\004 \001(\003\022\024\n\014double_value\030\005 \001(\001\022\024\n\014st" + + "ring_value\030\006 \001(\t\022\022\n\nmetric_key\030\007 \001(\t\022\023\n\013", + "description\030\t \001(\t\022\031\n\021variation_value_1\030\016" + + " \001(\001\022\031\n\021variation_value_2\030\017 \001(\001\022\031\n\021varia" + + "tion_value_3\030\020 \001(\001\022\031\n\021variation_value_4\030" + + "\021 \001(\001\022\031\n\021variation_value_5\030\022 \001(\001\022\021\n\tpers" + + "on_id\030\024 \001(\005\"\242\001\n\005Issue\022\027\n\017rule_repository" + + "\030\001 \001(\t\022\020\n\010rule_key\030\002 \001(\t\022\014\n\004line\030\003 \001(\005\022\013" + + "\n\003msg\030\004 \001(\t\022\033\n\010severity\030\005 \001(\0162\t.Severity" + + "\022\013\n\003tag\030\006 \003(\t\022\025\n\reffort_to_fix\030\007 \001(\001\022\022\n\n" + + "attributes\030\010 \001(\t\"\254\001\n\nChangesets\022\025\n\rcompo" + + "nent_ref\030\001 \001(\005\022(\n\tchangeset\030\002 \003(\0132\025.Chan", + "gesets.Changeset\022 \n\024changesetIndexByLine" + + "\030\003 \003(\005B\002\020\001\032;\n\tChangeset\022\020\n\010revision\030\001 \001(" + + "\t\022\016\n\006author\030\002 \001(\t\022\014\n\004date\030\003 \001(\003\"R\n\tDupli" + + "cate\022\026\n\016other_file_ref\030\001 \001(\005\022\025\n\005range\030\002 " + + "\001(\0132\006.Range\022\026\n\016other_file_key\030\003 \001(\t\"M\n\013D" + + "uplication\022\037\n\017origin_position\030\001 \001(\0132\006.Ra" + + "nge\022\035\n\tduplicate\030\002 \003(\0132\n.Duplicate\"W\n\005Ra" + + "nge\022\022\n\nstart_line\030\001 \001(\005\022\020\n\010end_line\030\002 \001(" + + "\005\022\024\n\014start_offset\030\003 \001(\005\022\022\n\nend_offset\030\004 " + + "\001(\005\"@\n\006Symbol\022\033\n\013declaration\030\001 \001(\0132\006.Ran", + "ge\022\031\n\treference\030\002 \003(\0132\006.Range\"\260\001\n\010Covera" + + "ge\022\014\n\004line\030\001 \001(\005\022\022\n\nconditions\030\002 \001(\005\022\017\n\007" + + "ut_hits\030\003 \001(\010\022\017\n\007it_hits\030\004 \001(\010\022\035\n\025ut_cov" + + "ered_conditions\030\005 \001(\005\022\035\n\025it_covered_cond" + + "itions\030\006 \001(\005\022\"\n\032overall_covered_conditio" + + "ns\030\007 \001(\005\"L\n\022SyntaxHighlighting\022\025\n\005range\030" + + "\001 \001(\0132\006.Range\022\037\n\004type\030\002 \001(\0162\021.Highlighti" + + "ngType\"j\n\004Test\022\014\n\004name\030\001 \001(\t\022\033\n\006status\030\002" + + " \001(\0162\013.TestStatus\022\026\n\016duration_in_ms\030\003 \001(" + + "\003\022\022\n\nstacktrace\030\004 \001(\t\022\013\n\003msg\030\005 \001(\t\"\221\001\n\016C", + "overageDetail\022\021\n\ttest_name\030\001 \001(\t\0221\n\014cove" + + "red_file\030\002 \003(\0132\033.CoverageDetail.CoveredF" + + "ile\0329\n\013CoveredFile\022\020\n\010file_ref\030\001 \001(\005\022\030\n\014" + + "covered_line\030\002 \003(\005B\002\020\001B#\n\037org.sonar.batc" + + "h.protocol.outputH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -19423,45 +17803,45 @@ public final class BatchReport { internal_static_Metadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Metadata_descriptor, - new java.lang.String[] { "AnalysisDate", "ProjectKey", "Branch", "RootComponentRef", "ActiveRuleKey", }); - internal_static_ComponentLink_descriptor = + new java.lang.String[] { "AnalysisDate", "ProjectKey", "Branch", "RootComponentRef", }); + internal_static_ActiveRule_descriptor = getDescriptor().getMessageTypes().get(1); + internal_static_ActiveRule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ActiveRule_descriptor, + new java.lang.String[] { "RuleRepository", "RuleKey", "Severity", "Param", }); + internal_static_ActiveRule_ActiveRuleParam_descriptor = + internal_static_ActiveRule_descriptor.getNestedTypes().get(0); + internal_static_ActiveRule_ActiveRuleParam_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ActiveRule_ActiveRuleParam_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_ComponentLink_descriptor = + getDescriptor().getMessageTypes().get(2); internal_static_ComponentLink_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_ComponentLink_descriptor, new java.lang.String[] { "Type", "Href", }); internal_static_Component_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(3); internal_static_Component_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Component_descriptor, new java.lang.String[] { "Ref", "Path", "Name", "Type", "IsTest", "Language", "ChildRef", "Link", "Version", "Key", "Lines", "Description", }); internal_static_Measure_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(4); internal_static_Measure_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Measure_descriptor, new java.lang.String[] { "ValueType", "BooleanValue", "IntValue", "LongValue", "DoubleValue", "StringValue", "MetricKey", "Description", "VariationValue1", "VariationValue2", "VariationValue3", "VariationValue4", "VariationValue5", "PersonId", }); - internal_static_Measures_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_Measures_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Measures_descriptor, - new java.lang.String[] { "ComponentRef", "Measure", }); internal_static_Issue_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_Issue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Issue_descriptor, new java.lang.String[] { "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "Tag", "EffortToFix", "Attributes", }); - internal_static_Issues_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_Issues_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Issues_descriptor, - new java.lang.String[] { "ComponentRef", "Issue", }); internal_static_Changesets_descriptor = - getDescriptor().getMessageTypes().get(7); + getDescriptor().getMessageTypes().get(6); internal_static_Changesets_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Changesets_descriptor, @@ -19473,61 +17853,49 @@ public final class BatchReport { internal_static_Changesets_Changeset_descriptor, new java.lang.String[] { "Revision", "Author", "Date", }); internal_static_Duplicate_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(7); internal_static_Duplicate_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Duplicate_descriptor, new java.lang.String[] { "OtherFileRef", "Range", "OtherFileKey", }); internal_static_Duplication_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(8); internal_static_Duplication_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Duplication_descriptor, new java.lang.String[] { "OriginPosition", "Duplicate", }); - internal_static_Duplications_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_Duplications_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Duplications_descriptor, - new java.lang.String[] { "ComponentRef", "Duplication", }); internal_static_Range_descriptor = - getDescriptor().getMessageTypes().get(11); + getDescriptor().getMessageTypes().get(9); internal_static_Range_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Range_descriptor, new java.lang.String[] { "StartLine", "EndLine", "StartOffset", "EndOffset", }); - internal_static_Symbols_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_Symbols_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Symbols_descriptor, - new java.lang.String[] { "FileRef", "Symbol", }); - internal_static_Symbols_Symbol_descriptor = - internal_static_Symbols_descriptor.getNestedTypes().get(0); - internal_static_Symbols_Symbol_fieldAccessorTable = new + internal_static_Symbol_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_Symbol_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_Symbols_Symbol_descriptor, + internal_static_Symbol_descriptor, new java.lang.String[] { "Declaration", "Reference", }); internal_static_Coverage_descriptor = - getDescriptor().getMessageTypes().get(13); + getDescriptor().getMessageTypes().get(11); internal_static_Coverage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Coverage_descriptor, new java.lang.String[] { "Line", "Conditions", "UtHits", "ItHits", "UtCoveredConditions", "ItCoveredConditions", "OverallCoveredConditions", }); internal_static_SyntaxHighlighting_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(12); internal_static_SyntaxHighlighting_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_SyntaxHighlighting_descriptor, new java.lang.String[] { "Range", "Type", }); internal_static_Test_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(13); internal_static_Test_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_Test_descriptor, new java.lang.String[] { "Name", "Status", "DurationInMs", "Stacktrace", "Msg", }); internal_static_CoverageDetail_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(14); internal_static_CoverageDetail_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_CoverageDetail_descriptor, diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/ProtobufUtil.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/ProtobufUtil.java index 3962cfd4ed1..43d8af6bfbf 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/ProtobufUtil.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/ProtobufUtil.java @@ -19,72 +19,103 @@ */ package org.sonar.batch.protocol; +import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.Message; import com.google.protobuf.Parser; -import org.apache.commons.io.IOUtils; - import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import org.apache.commons.io.IOUtils; +import org.sonar.core.util.CloseableIterator; + +import static java.lang.String.format; public class ProtobufUtil { private ProtobufUtil() { // only static stuff } - public static T readFile(File file, Parser parser) { + /** + * Returns the message contained in the given file. Throws an unchecked exception + * if the file does not exist or is empty. + */ + public static MSG readFile(File file, Parser parser) { InputStream input = null; try { input = new BufferedInputStream(new FileInputStream(file)); return parser.parseFrom(input); } catch (IOException e) { - throw new IllegalStateException("Failed to read file: " + file, e); + throw new IllegalStateException(format("Unable to read file %s", file), e); } finally { IOUtils.closeQuietly(input); } } + /** + * Writes a single message to a file, by replacing existing content. The message is + * NOT appended. + */ public static void writeToFile(Message message, File toFile) { OutputStream out = null; try { out = new BufferedOutputStream(new FileOutputStream(toFile, false)); message.writeTo(out); } catch (IOException e) { - throw new IllegalStateException("Unable to write protocol buffer data to file " + toFile, e); + throw new IllegalStateException(format("Unable to write protobuf message to file %s", toFile), e); } finally { IOUtils.closeQuietly(out); } } - public static void appendToFile(Message message, File toFile) { + public static void writeStreamToFile(Iterable messages, File toFile, boolean append) { OutputStream out = null; try { - out = new BufferedOutputStream(new FileOutputStream(toFile, true)); - message.writeDelimitedTo(out); + out = new BufferedOutputStream(new FileOutputStream(toFile, append)); + for (Message message : messages) { + message.writeDelimitedTo(out); + } } catch (IOException e) { - throw new IllegalStateException("Unable to append protocol buffer data to file " + toFile, e); + throw new IllegalStateException(format("Unable to write protobuf messages to file %s", toFile), e); } finally { IOUtils.closeQuietly(out); } } - public static void writeMessagesToFile(Iterable messages, File file) { - OutputStream out = null; + public static CloseableIterator readStreamFromFile(File file, Parser parser) { try { - out = new BufferedOutputStream(new FileOutputStream(file, true)); - for (MESSAGE message : messages) { - message.writeDelimitedTo(out); - } - } catch (IOException e) { - throw new IllegalStateException("Failed to read file: " + file, e); - } finally { - IOUtils.closeQuietly(out); + return new ProtobufIterator<>(parser, new BufferedInputStream(new FileInputStream(file))); + } catch (FileNotFoundException e) { + throw new IllegalStateException(format("Unable to read protobuf file %s", file), e); } } + private static class ProtobufIterator extends CloseableIterator { + private final Parser parser; + private final InputStream input; + + private ProtobufIterator(Parser parser, InputStream input) { + this.parser = parser; + this.input = input; + } + + @Override + protected MSG doNext() { + try { + return parser.parseDelimitedFrom(input); + } catch (InvalidProtocolBufferException e) { + throw new IllegalStateException(e); + } + } + + @Override + protected void doClose() throws Exception { + IOUtils.closeQuietly(input); + } + } } diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java index 0c13820f339..70da7179b9f 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java @@ -20,10 +20,9 @@ package org.sonar.batch.protocol.output; import java.io.File; -import java.util.Collections; -import java.util.List; import javax.annotation.CheckForNull; import org.sonar.batch.protocol.ProtobufUtil; +import org.sonar.core.util.CloseableIterator; public class BatchReportReader { @@ -35,26 +34,32 @@ public class BatchReportReader { public BatchReport.Metadata readMetadata() { File file = fileStructure.metadataFile(); - if (!doesFileExists(file)) { + if (!fileExists(file)) { throw new IllegalStateException("Metadata file is missing in analysis report: " + file); } return ProtobufUtil.readFile(file, BatchReport.Metadata.PARSER); } - public List readComponentMeasures(int componentRef) { + public CloseableIterator readActiveRules() { + File file = fileStructure.activeRules(); + if (!fileExists(file)) { + return CloseableIterator.emptyCloseableIterator(); + } + return ProtobufUtil.readStreamFromFile(file, BatchReport.ActiveRule.PARSER); + } + + public CloseableIterator readComponentMeasures(int componentRef) { File file = fileStructure.fileFor(FileStructure.Domain.MEASURES, componentRef); - if (doesFileExists(file)) { - // all the measures are loaded in memory - BatchReport.Measures measures = ProtobufUtil.readFile(file, BatchReport.Measures.PARSER); - return measures.getMeasureList(); + if (fileExists(file)) { + return ProtobufUtil.readStreamFromFile(file, BatchReport.Measure.PARSER); } - return Collections.emptyList(); + return CloseableIterator.emptyCloseableIterator(); } @CheckForNull public BatchReport.Changesets readChangesets(int componentRef) { File file = fileStructure.fileFor(FileStructure.Domain.CHANGESETS, componentRef); - if (doesFileExists(file)) { + if (fileExists(file)) { return ProtobufUtil.readFile(file, BatchReport.Changesets.PARSER); } return null; @@ -62,40 +67,34 @@ public class BatchReportReader { public BatchReport.Component readComponent(int componentRef) { File file = fileStructure.fileFor(FileStructure.Domain.COMPONENT, componentRef); - if (!doesFileExists(file)) { + if (!fileExists(file)) { throw new IllegalStateException("Unable to find report for component #" + componentRef + ". File does not exist: " + file); } return ProtobufUtil.readFile(file, BatchReport.Component.PARSER); } - public List readComponentIssues(int componentRef) { + public CloseableIterator readComponentIssues(int componentRef) { File file = fileStructure.fileFor(FileStructure.Domain.ISSUES, componentRef); - if (doesFileExists(file)) { - // all the issues are loaded in memory - BatchReport.Issues issues = ProtobufUtil.readFile(file, BatchReport.Issues.PARSER); - return issues.getIssueList(); + if (fileExists(file)) { + return ProtobufUtil.readStreamFromFile(file, BatchReport.Issue.PARSER); } - return Collections.emptyList(); + return CloseableIterator.emptyCloseableIterator(); } - public List readComponentDuplications(int componentRef) { + public CloseableIterator readComponentDuplications(int componentRef) { File file = fileStructure.fileFor(FileStructure.Domain.DUPLICATIONS, componentRef); - if (doesFileExists(file)) { - // all the duplications are loaded in memory - BatchReport.Duplications duplications = ProtobufUtil.readFile(file, BatchReport.Duplications.PARSER); - return duplications.getDuplicationList(); + if (fileExists(file)) { + return ProtobufUtil.readStreamFromFile(file, BatchReport.Duplication.PARSER); } - return Collections.emptyList(); + return CloseableIterator.emptyCloseableIterator(); } - public List readComponentSymbols(int componentRef) { + public CloseableIterator readComponentSymbols(int componentRef) { File file = fileStructure.fileFor(FileStructure.Domain.SYMBOLS, componentRef); - if (doesFileExists(file)) { - // all the symbols are loaded in memory - BatchReport.Symbols symbols = ProtobufUtil.readFile(file, BatchReport.Symbols.PARSER); - return symbols.getSymbolList(); + if (fileExists(file)) { + return ProtobufUtil.readStreamFromFile(file, BatchReport.Symbol.PARSER); } - return Collections.emptyList(); + return CloseableIterator.emptyCloseableIterator(); } public boolean hasSyntaxHighlighting(int componentRef) { @@ -106,7 +105,7 @@ public class BatchReportReader { @CheckForNull public File readComponentSyntaxHighlighting(int fileRef) { File file = fileStructure.fileFor(FileStructure.Domain.SYNTAX_HIGHLIGHTINGS, fileRef); - if (doesFileExists(file)) { + if (fileExists(file)) { return file; } return null; @@ -115,7 +114,7 @@ public class BatchReportReader { @CheckForNull public File readComponentCoverage(int fileRef) { File file = fileStructure.fileFor(FileStructure.Domain.COVERAGES, fileRef); - if (doesFileExists(file)) { + if (fileExists(file)) { return file; } return null; @@ -123,7 +122,7 @@ public class BatchReportReader { public File readFileSource(int fileRef) { File file = fileStructure.fileFor(FileStructure.Domain.SOURCE, fileRef); - if (!doesFileExists(file)) { + if (!fileExists(file)) { throw new IllegalStateException("Unable to find source for file #" + fileRef + ". File does not exist: " + file); } return file; @@ -132,7 +131,7 @@ public class BatchReportReader { @CheckForNull public File readTests(int testFileRef) { File file = fileStructure.fileFor(FileStructure.Domain.TESTS, testFileRef); - if (doesFileExists(file)) { + if (fileExists(file)) { return file; } @@ -142,14 +141,14 @@ public class BatchReportReader { @CheckForNull public File readCoverageDetails(int testFileRef) { File file = fileStructure.fileFor(FileStructure.Domain.COVERAGE_DETAILS, testFileRef); - if (doesFileExists(file)) { + if (fileExists(file)) { return file; } return null; } - private static boolean doesFileExists(File file) { + private static boolean fileExists(File file) { return file.exists() && file.isFile(); } } diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportWriter.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportWriter.java index b9be0da6170..b7ac04ed116 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportWriter.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportWriter.java @@ -50,6 +50,11 @@ public class BatchReportWriter { return fileStructure.metadataFile(); } + public File writeActiveRules(Iterable activeRules) { + ProtobufUtil.writeStreamToFile(activeRules, fileStructure.activeRules(), false); + return fileStructure.metadataFile(); + } + public File writeComponent(BatchReport.Component component) { File file = fileStructure.fileFor(FileStructure.Domain.COMPONENT, component.getRef()); ProtobufUtil.writeToFile(component, file); @@ -57,20 +62,14 @@ public class BatchReportWriter { } public File writeComponentIssues(int componentRef, Iterable issues) { - BatchReport.Issues.Builder issuesBuilder = BatchReport.Issues.newBuilder(); - issuesBuilder.setComponentRef(componentRef); - issuesBuilder.addAllIssue(issues); File file = fileStructure.fileFor(FileStructure.Domain.ISSUES, componentRef); - ProtobufUtil.writeToFile(issuesBuilder.build(), file); + ProtobufUtil.writeStreamToFile(issues, file, false); return file; } public File writeComponentMeasures(int componentRef, Iterable measures) { - BatchReport.Measures.Builder measuresBuilder = BatchReport.Measures.newBuilder(); - measuresBuilder.setComponentRef(componentRef); - measuresBuilder.addAllMeasure(measures); File file = fileStructure.fileFor(FileStructure.Domain.MEASURES, componentRef); - ProtobufUtil.writeToFile(measuresBuilder.build(), file); + ProtobufUtil.writeStreamToFile(measures, file, false); return file; } @@ -81,44 +80,38 @@ public class BatchReportWriter { } public File writeComponentDuplications(int componentRef, Iterable duplications) { - BatchReport.Duplications.Builder builder = BatchReport.Duplications.newBuilder(); - builder.setComponentRef(componentRef); - builder.addAllDuplication(duplications); File file = fileStructure.fileFor(FileStructure.Domain.DUPLICATIONS, componentRef); - ProtobufUtil.writeToFile(builder.build(), file); + ProtobufUtil.writeStreamToFile(duplications, file, false); return file; } - public File writeComponentSymbols(int componentRef, Iterable symbols) { - BatchReport.Symbols.Builder builder = BatchReport.Symbols.newBuilder(); - builder.setFileRef(componentRef); - builder.addAllSymbol(symbols); + public File writeComponentSymbols(int componentRef, Iterable symbols) { File file = fileStructure.fileFor(FileStructure.Domain.SYMBOLS, componentRef); - ProtobufUtil.writeToFile(builder.build(), file); + ProtobufUtil.writeStreamToFile(symbols, file, false); return file; } public File writeComponentSyntaxHighlighting(int componentRef, Iterable syntaxHighlightingRules) { File file = fileStructure.fileFor(FileStructure.Domain.SYNTAX_HIGHLIGHTINGS, componentRef); - ProtobufUtil.writeMessagesToFile(syntaxHighlightingRules, file); + ProtobufUtil.writeStreamToFile(syntaxHighlightingRules, file, false); return file; } public File writeComponentCoverage(int componentRef, Iterable coverageList) { File file = fileStructure.fileFor(FileStructure.Domain.COVERAGES, componentRef); - ProtobufUtil.writeMessagesToFile(coverageList, file); + ProtobufUtil.writeStreamToFile(coverageList, file, false); return file; } public File writeTests(int componentRef, Iterable tests) { File file = fileStructure.fileFor(FileStructure.Domain.TESTS, componentRef); - ProtobufUtil.writeMessagesToFile(tests, file); + ProtobufUtil.writeStreamToFile(tests, file, false); return file; } public File writeCoverageDetails(int componentRef, Iterable tests) { File file = fileStructure.fileFor(FileStructure.Domain.COVERAGE_DETAILS, componentRef); - ProtobufUtil.writeMessagesToFile(tests, file); + ProtobufUtil.writeStreamToFile(tests, file, false); return file; } diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/FileStructure.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/FileStructure.java index da641621172..6d0c9f3fa67 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/FileStructure.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/FileStructure.java @@ -62,6 +62,10 @@ public class FileStructure { return new File(dir, "metadata.pb"); } + public File activeRules() { + return new File(dir, "activerules.pb"); + } + public File fileFor(Domain domain, int componentRef) { return new File(dir, domain.filePrefix + componentRef + domain.fileSuffix); } diff --git a/sonar-batch-protocol/src/main/protobuf/batch_report.proto b/sonar-batch-protocol/src/main/protobuf/batch_report.proto index 6632bb8a6f9..3520f5bee01 100644 --- a/sonar-batch-protocol/src/main/protobuf/batch_report.proto +++ b/sonar-batch-protocol/src/main/protobuf/batch_report.proto @@ -47,19 +47,17 @@ message Metadata { optional int32 root_component_ref = 4; } -message ActiveRuleParameter { - optional string key = 1; - optional string value = 2; -} - -/* - The rules that are enabled in the Quality profiles associated with the project -*/ message ActiveRule { optional string rule_repository = 1; optional string rule_key = 2; optional Severity severity = 3; - repeated ActiveRuleParameter parameter = 4; + repeated ActiveRuleParam param = 4; + + // TODO replace by map + message ActiveRuleParam { + optional string key = 1; + optional string value = 2; + } } message ComponentLink { @@ -107,12 +105,6 @@ message Measure { optional int32 person_id = 20; } -/* TODO to be removed. It prevents streaming */ -message Measures { - optional int32 component_ref = 1; - repeated Measure measure = 2; -} - message Issue { optional string rule_repository = 1; optional string rule_key = 2; @@ -124,12 +116,6 @@ message Issue { optional string attributes = 8; } -/* TODO to be removed. It prevents streaming */ -message Issues { - optional int32 component_ref = 1; - repeated Issue issue = 2; -} - message Changesets { optional int32 component_ref = 1; repeated Changeset changeset = 2; @@ -158,11 +144,6 @@ message Duplication { repeated Duplicate duplicate = 2; } -message Duplications { - optional int32 component_ref = 1; - repeated Duplication duplication = 2; -} - // Lines start at 1 and line offsets start at 0 message Range { // Should never be null @@ -175,14 +156,9 @@ message Range { optional int32 end_offset = 4; } -message Symbols { - optional int32 file_ref = 1; - repeated Symbol symbol = 2; - - message Symbol { - optional Range declaration = 1; - repeated Range reference = 2; - } +message Symbol { + optional Range declaration = 1; + repeated Range reference = 2; } // Only FILE component has coverage information, and only executable lines should contains this information. diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/ProtobufUtilTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/ProtobufUtilTest.java index e9e57cf74dd..04ebcf7f989 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/ProtobufUtilTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/ProtobufUtilTest.java @@ -19,16 +19,53 @@ */ package org.sonar.batch.protocol; +import java.io.File; +import org.apache.commons.io.FileUtils; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.junit.rules.TemporaryFolder; +import org.sonar.batch.protocol.output.BatchReport; import org.sonar.test.TestUtils; import static org.assertj.core.api.Assertions.assertThat; public class ProtobufUtilTest { + @Rule + public ExpectedException thrown = ExpectedException.none(); + + @Rule + public TemporaryFolder temp = new TemporaryFolder(); + @Test public void only_utils() { assertThat(TestUtils.hasOnlyPrivateConstructors(ProtobufUtil.class)); } + @Test + public void readFile_fails_if_file_does_not_exist() throws Exception { + thrown.expect(IllegalStateException.class); + + File file = temp.newFile(); + FileUtils.forceDelete(file); + ProtobufUtil.readFile(file, BatchReport.Metadata.PARSER); + } + + @Test + public void readFile_returns_empty_message_if_file_is_empty() throws Exception { + File file = temp.newFile(); + BatchReport.Metadata msg = ProtobufUtil.readFile(file, BatchReport.Metadata.PARSER); + assertThat(msg).isNotNull(); + assertThat(msg.isInitialized()).isTrue(); + } + + @Test + public void readFile_returns_message() throws Exception { + File file = temp.newFile(); + ProtobufUtil.writeToFile(BatchReport.Metadata.getDefaultInstance(), file); + BatchReport.Metadata message = ProtobufUtil.readFile(file, BatchReport.Metadata.PARSER); + assertThat(message).isNotNull(); + assertThat(message.isInitialized()).isTrue(); + } } diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java index 50afe349b6d..9250a23042e 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java @@ -42,12 +42,12 @@ public class BatchReportReaderTest { File dir; - BatchReportReader underTest; + BatchReportReader sut; @Before public void setUp() throws Exception { dir = temp.newFolder(); - underTest = new BatchReportReader(dir); + sut = new BatchReportReader(dir); } @Test @@ -59,7 +59,7 @@ public class BatchReportReaderTest { .setRootComponentRef(1); writer.writeMetadata(metadata.build()); - BatchReport.Metadata readMetadata = underTest.readMetadata(); + BatchReport.Metadata readMetadata = sut.readMetadata(); assertThat(readMetadata.getAnalysisDate()).isEqualTo(15000000L); assertThat(readMetadata.getProjectKey()).isEqualTo("PROJECT_A"); assertThat(readMetadata.getRootComponentRef()).isEqualTo(1); @@ -67,7 +67,7 @@ public class BatchReportReaderTest { @Test(expected = IllegalStateException.class) public void fail_if_missing_metadata_file() { - underTest.readMetadata(); + sut.readMetadata(); } @Test @@ -78,12 +78,12 @@ public class BatchReportReaderTest { .setPath("src/main/java/Foo.java"); writer.writeComponent(component.build()); - assertThat(underTest.readComponent(1).getPath()).isEqualTo("src/main/java/Foo.java"); + assertThat(sut.readComponent(1).getPath()).isEqualTo("src/main/java/Foo.java"); } @Test(expected = IllegalStateException.class) public void fail_if_missing_file_on_component() { - underTest.readComponent(UNKNOWN_COMPONENT_REF); + sut.readComponent(UNKNOWN_COMPONENT_REF); } @Test @@ -94,13 +94,13 @@ public class BatchReportReaderTest { .build(); writer.writeComponentIssues(1, Arrays.asList(issue)); - assertThat(underTest.readComponentIssues(1)).hasSize(1); - assertThat(underTest.readComponentIssues(200)).isEmpty(); + assertThat(sut.readComponentIssues(1)).hasSize(1); + assertThat(sut.readComponentIssues(200)).isEmpty(); } @Test public void empty_list_if_no_issue_found() { - assertThat(underTest.readComponentIssues(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(sut.readComponentIssues(UNKNOWN_COMPONENT_REF)).isEmpty(); } @Test @@ -110,13 +110,12 @@ public class BatchReportReaderTest { .setStringValue("value_a"); writer.writeComponentMeasures(1, Arrays.asList(measure.build())); - assertThat(underTest.readComponentMeasures(1)).hasSize(1); - assertThat(underTest.readComponentMeasures(1).get(0).getStringValue()).isEqualTo("value_a"); + assertThat(sut.readComponentMeasures(1)).hasSize(1); } @Test public void empty_list_if_no_measure_found() { - assertThat(underTest.readComponentMeasures(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(sut.readComponentMeasures(UNKNOWN_COMPONENT_REF)).isEmpty(); } @Test @@ -127,13 +126,13 @@ public class BatchReportReaderTest { .addChangeset(BatchReport.Changesets.Changeset.newBuilder().setDate(123_456_789).setAuthor("jack.daniels").setRevision("123-456-789")); writer.writeComponentChangesets(scm.build()); - assertThat(underTest.readChangesets(1).getChangesetList()).hasSize(1); - assertThat(underTest.readChangesets(1).getChangeset(0).getDate()).isEqualTo(123_456_789L); + assertThat(sut.readChangesets(1).getChangesetList()).hasSize(1); + assertThat(sut.readChangesets(1).getChangeset(0).getDate()).isEqualTo(123_456_789L); } @Test public void null_if_no_changeset_found() { - assertThat(underTest.readChangesets(UNKNOWN_COMPONENT_REF)).isNull(); + assertThat(sut.readChangesets(UNKNOWN_COMPONENT_REF)).isNull(); } @Test @@ -160,15 +159,13 @@ public class BatchReportReaderTest { .build(); writer.writeComponentDuplications(1, Arrays.asList(duplication)); - BatchReportReader underTest = new BatchReportReader(dir); - assertThat(underTest.readComponentDuplications(1)).hasSize(1); - assertThat(underTest.readComponentDuplications(1).get(0).getOriginPosition()).isNotNull(); - assertThat(underTest.readComponentDuplications(1).get(0).getDuplicateList()).hasSize(1); + BatchReportReader sut = new BatchReportReader(dir); + assertThat(sut.readComponentDuplications(1)).hasSize(1); } @Test public void empty_list_if_no_duplication_found() { - assertThat(underTest.readComponentDuplications(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(sut.readComponentDuplications(UNKNOWN_COMPONENT_REF)).isEmpty(); } @Test @@ -188,9 +185,9 @@ public class BatchReportReaderTest { .build()) .setType(Constants.HighlightingType.ANNOTATION) .build() - )); + )); - try (InputStream inputStream = FileUtils.openInputStream(underTest.readComponentSyntaxHighlighting(1))) { + try (InputStream inputStream = FileUtils.openInputStream(sut.readComponentSyntaxHighlighting(1))) { BatchReport.SyntaxHighlighting syntaxHighlighting = BatchReport.SyntaxHighlighting.PARSER.parseDelimitedFrom(inputStream); assertThat(syntaxHighlighting.getRange()).isNotNull(); assertThat(syntaxHighlighting.getRange().getStartLine()).isEqualTo(1); @@ -201,7 +198,7 @@ public class BatchReportReaderTest { @Test public void return_null_if_no_highlighting_found() { - assertThat(underTest.readComponentSyntaxHighlighting(UNKNOWN_COMPONENT_REF)).isNull(); + assertThat(sut.readComponentSyntaxHighlighting(UNKNOWN_COMPONENT_REF)).isNull(); } @Test @@ -213,7 +210,7 @@ public class BatchReportReaderTest { writer.writeComponent(BatchReport.Component.newBuilder() .setRef(1).build()); - writer.writeComponentSymbols(1, Arrays.asList(BatchReport.Symbols.Symbol.newBuilder() + writer.writeComponentSymbols(1, Arrays.asList(BatchReport.Symbol.newBuilder() .setDeclaration(BatchReport.Range.newBuilder() .setStartLine(1) .setStartOffset(3) @@ -228,15 +225,13 @@ public class BatchReportReaderTest { .build()) .build())); - underTest = new BatchReportReader(dir); - assertThat(underTest.readComponentSymbols(1)).hasSize(1); - assertThat(underTest.readComponentSymbols(1).get(0).getDeclaration().getStartLine()).isEqualTo(1); - assertThat(underTest.readComponentSymbols(1).get(0).getReference(0).getStartLine()).isEqualTo(10); + sut = new BatchReportReader(dir); + assertThat(sut.readComponentSymbols(1)).hasSize(1); } @Test public void empty_list_if_no_symbol_found() { - assertThat(underTest.readComponentSymbols(UNKNOWN_COMPONENT_REF)).isEmpty(); + assertThat(sut.readComponentSymbols(UNKNOWN_COMPONENT_REF)).isEmpty(); } @Test @@ -268,7 +263,7 @@ public class BatchReportReaderTest { .setOverallCoveredConditions(5) .build())); - underTest = new BatchReportReader(dir); + sut = new BatchReportReader(dir); try (InputStream inputStream = FileUtils.openInputStream(new BatchReportReader(dir).readComponentCoverage(1))) { BatchReport.Coverage coverage = BatchReport.Coverage.PARSER.parseDelimitedFrom(inputStream); @@ -293,7 +288,7 @@ public class BatchReportReaderTest { @Test public void return_null_if_no_coverage_found() { - assertThat(underTest.readComponentCoverage(UNKNOWN_COMPONENT_REF)).isNull(); + assertThat(sut.readComponentCoverage(UNKNOWN_COMPONENT_REF)).isNull(); } @Test @@ -317,7 +312,7 @@ public class BatchReportReaderTest { .setStatus(Constants.TestStatus.OK) .build())); - try (InputStream inputStream = FileUtils.openInputStream(underTest.readTests(1))) { + try (InputStream inputStream = FileUtils.openInputStream(sut.readTests(1))) { BatchReport.Test testResult = BatchReport.Test.PARSER.parseDelimitedFrom(inputStream); assertThat(testResult.getDurationInMs()).isEqualTo(60_000); assertThat(testResult.getStacktrace()).isEqualTo("stacktrace"); @@ -328,7 +323,7 @@ public class BatchReportReaderTest { @Test public void null_if_no_test_found() { - assertThat(underTest.readTests(UNKNOWN_COMPONENT_REF)).isNull(); + assertThat(sut.readTests(UNKNOWN_COMPONENT_REF)).isNull(); } @Test @@ -338,13 +333,13 @@ public class BatchReportReaderTest { BatchReport.CoverageDetail.newBuilder() .setTestName("test-name") .addCoveredFile(BatchReport.CoverageDetail.CoveredFile.newBuilder() - .addAllCoveredLine(Arrays.asList(1, 2, 3, 5, 7)) - .setFileRef(2) + .addAllCoveredLine(Arrays.asList(1, 2, 3, 5, 7)) + .setFileRef(2) ) .build() - )); + )); - try (InputStream inputStream = FileUtils.openInputStream(underTest.readCoverageDetails(1))) { + try (InputStream inputStream = FileUtils.openInputStream(sut.readCoverageDetails(1))) { BatchReport.CoverageDetail coverageDetail = BatchReport.CoverageDetail.PARSER.parseDelimitedFrom(inputStream); assertThat(coverageDetail.getTestName()).isEqualTo("test-name"); assertThat(coverageDetail.getCoveredFile(0).getFileRef()).isEqualTo(2); @@ -354,7 +349,7 @@ public class BatchReportReaderTest { @Test public void null_if_no_coverage_detail_found() { - assertThat(underTest.readCoverageDetails(UNKNOWN_COMPONENT_REF)).isNull(); + assertThat(sut.readCoverageDetails(UNKNOWN_COMPONENT_REF)).isNull(); } } diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportWriterTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportWriterTest.java index 18716f7332f..9154effb05c 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportWriterTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportWriterTest.java @@ -19,6 +19,9 @@ */ package org.sonar.batch.protocol.output; +import com.google.common.collect.Iterators; +import java.io.File; +import java.util.Arrays; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Rule; @@ -27,9 +30,7 @@ import org.junit.rules.TemporaryFolder; import org.sonar.batch.protocol.Constants; import org.sonar.batch.protocol.ProtobufUtil; import org.sonar.batch.protocol.output.BatchReport.Range; - -import java.io.File; -import java.util.Arrays; +import org.sonar.core.util.CloseableIterator; import static org.assertj.core.api.Assertions.assertThat; @@ -110,9 +111,9 @@ public class BatchReportWriterTest { assertThat(underTest.hasComponentData(FileStructure.Domain.ISSUES, 1)).isTrue(); File file = underTest.getFileStructure().fileFor(FileStructure.Domain.ISSUES, 1); assertThat(file).exists().isFile(); - BatchReport.Issues read = ProtobufUtil.readFile(file, BatchReport.Issues.PARSER); - assertThat(read.getComponentRef()).isEqualTo(1); - assertThat(read.getIssueCount()).isEqualTo(1); + try (CloseableIterator read = ProtobufUtil.readStreamFromFile(file, BatchReport.Issue.PARSER)) { + assertThat(Iterators.size(read)).isEqualTo(1); + } } @Test @@ -131,13 +132,9 @@ public class BatchReportWriterTest { assertThat(underTest.hasComponentData(FileStructure.Domain.MEASURES, 1)).isTrue(); File file = underTest.getFileStructure().fileFor(FileStructure.Domain.MEASURES, 1); assertThat(file).exists().isFile(); - BatchReport.Measures measures = ProtobufUtil.readFile(file, BatchReport.Measures.PARSER); - assertThat(measures.getComponentRef()).isEqualTo(1); - assertThat(measures.getMeasureCount()).isEqualTo(1); - assertThat(measures.getMeasure(0).getStringValue()).isEqualTo("text-value"); - assertThat(measures.getMeasure(0).getDoubleValue()).isEqualTo(2.5d); - assertThat(measures.getMeasure(0).getValueType()).isEqualTo(Constants.MeasureValueType.DOUBLE); - assertThat(measures.getMeasure(0).getDescription()).isEqualTo("description"); + try (CloseableIterator read = ProtobufUtil.readStreamFromFile(file, BatchReport.Measure.PARSER)) { + assertThat(Iterators.size(read)).isEqualTo(1); + } } @Test @@ -188,11 +185,11 @@ public class BatchReportWriterTest { assertThat(underTest.hasComponentData(FileStructure.Domain.DUPLICATIONS, 1)).isTrue(); File file = underTest.getFileStructure().fileFor(FileStructure.Domain.DUPLICATIONS, 1); assertThat(file).exists().isFile(); - BatchReport.Duplications duplications = ProtobufUtil.readFile(file, BatchReport.Duplications.PARSER); - assertThat(duplications.getComponentRef()).isEqualTo(1); - assertThat(duplications.getDuplicationList()).hasSize(1); - assertThat(duplications.getDuplication(0).getOriginPosition()).isNotNull(); - assertThat(duplications.getDuplication(0).getDuplicateList()).hasSize(1); + try (CloseableIterator duplications = ProtobufUtil.readStreamFromFile(file, BatchReport.Duplication.PARSER)) { + BatchReport.Duplication dup = duplications.next(); + assertThat(dup.getOriginPosition()).isNotNull(); + assertThat(dup.getDuplicateList()).hasSize(1); + } } @Test @@ -201,7 +198,7 @@ public class BatchReportWriterTest { assertThat(underTest.hasComponentData(FileStructure.Domain.SYMBOLS, 1)).isFalse(); // write data - BatchReport.Symbols.Symbol symbol = BatchReport.Symbols.Symbol.newBuilder() + BatchReport.Symbol symbol = BatchReport.Symbol.newBuilder() .setDeclaration(BatchReport.Range.newBuilder() .setStartLine(1) .setStartOffset(3) @@ -222,11 +219,9 @@ public class BatchReportWriterTest { File file = underTest.getFileStructure().fileFor(FileStructure.Domain.SYMBOLS, 1); assertThat(file).exists().isFile(); - BatchReport.Symbols read = ProtobufUtil.readFile(file, BatchReport.Symbols.PARSER); - assertThat(read.getFileRef()).isEqualTo(1); - assertThat(read.getSymbolList()).hasSize(1); - assertThat(read.getSymbol(0).getDeclaration().getStartLine()).isEqualTo(1); - assertThat(read.getSymbol(0).getReference(0).getStartLine()).isEqualTo(10); + try (CloseableIterator read = ProtobufUtil.readStreamFromFile(file, BatchReport.Symbol.PARSER)) { + assertThat(read).hasSize(1); + } } @Test -- cgit v1.2.3