From a3c98b7bf61a18da71ca341f454d14d87f46f777 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Sun, 2 Aug 2015 20:49:09 +0200 Subject: [PATCH] Draft of WS api/issues/search2 - protobuf specification of response - do not rely on ES docs to return data (will allow to remove _source from ES index) - sanitize response format - sanitize request parameters (no more 'hideXXX' and 'f') --- .../main/gen-java/org/sonarqube/ws/Rules.java | 1537 -- .../main/java/org/sonar/server/es/Facets.java | 17 +- .../org/sonar/server/issue/ActionService.java | 183 +- .../issue/InternalRubyIssueService.java | 30 +- .../server/issue/IssueCommentService.java | 22 +- .../org/sonar/server/issue/IssueService.java | 2 +- .../server/issue/ws/IssueActionsWriter.java | 3 - .../sonar/server/issue/ws/Search2Action.java | 369 + .../sonar/server/issue/ws/SearchAction.java | 6 +- .../issue/ws/SearchAdditionalField.java | 83 + .../server/issue/ws/SearchResponseData.java | 167 + .../server/issue/ws/SearchResponseFormat.java | 291 + .../server/issue/ws/SearchResponseLoader.java | 241 + .../platformlevel/PlatformLevel4.java | 7 + .../org/sonar/server/rule/ws/ListAction.java | 10 +- .../server/ws/WsResponseCommonFormat.java | 111 + .../java/org/sonar/server/ws/WsUtils.java | 54 + .../src/main/protobuf/ws-rules.proto | 39 - .../sonar/server/issue/ActionServiceTest.java | 243 - .../issue/InternalRubyIssueServiceTest.java | 10 - .../issue/IssueCommentServiceMediumTest.java | 4 +- .../server/issue/IssueCommentServiceTest.java | 28 +- .../server/issue/IssueServiceMediumTest.java | 3 +- .../issue/ws/IssueActionsWriterTest.java | 24 +- .../ws/SearchActionComponentsMediumTest.java | 199 +- .../issue/ws/SearchActionMediumTest.java | 191 +- .../sonar/server/rule/ws/ListActionTest.java | 6 +- .../java/org/sonar/server/ws/TestRequest.java | 2 +- .../java/org/sonar/server/ws/WsUtilsTest.java | 38 + .../display_file_facet.json | 25 +- .../display_module_facet.json | 31 +- .../display_non_sticky_project_facet.json | 11 +- .../display_sticky_project_facet.json | 29 +- .../issues_on_different_projects.json | 26 +- .../search_by_authors.json | 4 +- .../search_by_developer.json | 10 +- .../search_by_directory_uuid.json | 6 +- .../search_by_file_key.json | 6 +- .../search_by_file_uuid.json | 6 +- .../search_by_project_uuid.json | 7 +- .../search_by_test_key.json | 6 +- .../search_by_view_uuid.json | 7 +- .../assigned_to_me_facet_sticky.json | 3 +- .../components_contains_sub_projects.json | 5 - .../default_page_size_is_100.json | 1 - .../deprecated_paging.json | 1 - .../display_facets.json | 7 +- .../display_facets_debt.json | 16 +- .../display_zero_facets.json | 8 +- .../SearchActionMediumTest/empty_result.json | 5 +- .../filter_by_assigned_to_me.json | 4 +- .../ws/SearchActionMediumTest/hide_rules.json | 4 +- .../ws/SearchActionMediumTest/issue.json | 62 - ...d_file.json => issue_on_removed_file.json} | 8 +- .../issue_with_action_plan.json | 5 +- .../issue_with_comment.json | 26 - .../issue_with_comments.json | 41 + .../issue_with_snippet.json | 58 - ...ields.json => load_additional_fields.json} | 8 +- ...s_all_fields_except_additional_fields.json | 24 + .../sort_by_updated_at.json | 12 +- .../org/sonar/api/issue/action/Actions.java | 2 + .../gen-java/org/sonarqube/ws/Common.java | 886 +- .../gen-java/org/sonarqube/ws/Issues.java | 11788 ++++++++++------ sonar-ws/src/main/protobuf/ws-common.proto | 29 +- sonar-ws/src/main/protobuf/ws-issues.proto | 85 +- 66 files changed, 10240 insertions(+), 6942 deletions(-) delete mode 100644 server/sonar-server/src/main/gen-java/org/sonarqube/ws/Rules.java create mode 100644 server/sonar-server/src/main/java/org/sonar/server/issue/ws/Search2Action.java create mode 100644 server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAdditionalField.java create mode 100644 server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseData.java create mode 100644 server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java create mode 100644 server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java create mode 100644 server/sonar-server/src/main/java/org/sonar/server/ws/WsResponseCommonFormat.java create mode 100644 server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java delete mode 100644 server/sonar-server/src/main/protobuf/ws-rules.proto delete mode 100644 server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java create mode 100644 server/sonar-server/src/test/java/org/sonar/server/ws/WsUtilsTest.java delete mode 100644 server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue.json rename server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/{issue_linked_on_removed_file.json => issue_on_removed_file.json} (75%) delete mode 100644 server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_comment.json create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_comments.json delete mode 100644 server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_snippet.json rename server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/{issue_with_extra_fields.json => load_additional_fields.json} (75%) create mode 100644 server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/response_contains_all_fields_except_additional_fields.json diff --git a/server/sonar-server/src/main/gen-java/org/sonarqube/ws/Rules.java b/server/sonar-server/src/main/gen-java/org/sonarqube/ws/Rules.java deleted file mode 100644 index 346793fee19..00000000000 --- a/server/sonar-server/src/main/gen-java/org/sonarqube/ws/Rules.java +++ /dev/null @@ -1,1537 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: ws-rules.proto - -package org.sonarqube.ws; - -public final class Rules { - private Rules() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - } - public interface ListResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:sonarqube.ws.rules.ListResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - java.util.List - getRulesList(); - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - org.sonarqube.ws.Rules.ListResponse.Rule getRules(int index); - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - int getRulesCount(); - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - java.util.List - getRulesOrBuilderList(); - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder getRulesOrBuilder( - int index); - } - /** - * Protobuf type {@code sonarqube.ws.rules.ListResponse} - * - *
-   * WS api/rules/list for internal use only
-   * 
- */ - public static final class ListResponse extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:sonarqube.ws.rules.ListResponse) - ListResponseOrBuilder { - // Use ListResponse.newBuilder() to construct. - private ListResponse(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private ListResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final ListResponse defaultInstance; - public static ListResponse getDefaultInstance() { - return defaultInstance; - } - - public ListResponse getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListResponse( - 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: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rules_.add(input.readMessage(org.sonarqube.ws.Rules.ListResponse.Rule.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_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonarqube.ws.Rules.ListResponse.class, org.sonarqube.ws.Rules.ListResponse.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public ListResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListResponse(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - public interface RuleOrBuilder extends - // @@protoc_insertion_point(interface_extends:sonarqube.ws.rules.ListResponse.Rule) - com.google.protobuf.MessageOrBuilder { - - /** - * optional string repository = 1; - */ - boolean hasRepository(); - /** - * optional string repository = 1; - */ - java.lang.String getRepository(); - /** - * optional string repository = 1; - */ - com.google.protobuf.ByteString - getRepositoryBytes(); - - /** - * optional string key = 2; - */ - boolean hasKey(); - /** - * optional string key = 2; - */ - java.lang.String getKey(); - /** - * optional string key = 2; - */ - com.google.protobuf.ByteString - getKeyBytes(); - - /** - * optional string internal_key = 3; - */ - boolean hasInternalKey(); - /** - * optional string internal_key = 3; - */ - java.lang.String getInternalKey(); - /** - * optional string internal_key = 3; - */ - com.google.protobuf.ByteString - getInternalKeyBytes(); - } - /** - * Protobuf type {@code sonarqube.ws.rules.ListResponse.Rule} - */ - public static final class Rule extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:sonarqube.ws.rules.ListResponse.Rule) - RuleOrBuilder { - // Use Rule.newBuilder() to construct. - private Rule(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Rule(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Rule defaultInstance; - public static Rule getDefaultInstance() { - return defaultInstance; - } - - public Rule getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Rule( - 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; - repository_ = bs; - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - key_ = bs; - break; - } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - internalKey_ = 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.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonarqube.ws.Rules.ListResponse.Rule.class, org.sonarqube.ws.Rules.ListResponse.Rule.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Rule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Rule(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int REPOSITORY_FIELD_NUMBER = 1; - private java.lang.Object repository_; - /** - * optional string repository = 1; - */ - public boolean hasRepository() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string repository = 1; - */ - public java.lang.String getRepository() { - java.lang.Object ref = repository_; - 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()) { - repository_ = s; - } - return s; - } - } - /** - * optional string repository = 1; - */ - public com.google.protobuf.ByteString - getRepositoryBytes() { - java.lang.Object ref = repository_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - repository_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int KEY_FIELD_NUMBER = 2; - private java.lang.Object key_; - /** - * optional string key = 2; - */ - public boolean hasKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string key = 2; - */ - 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 = 2; - */ - 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; - } - } - - public static final int INTERNAL_KEY_FIELD_NUMBER = 3; - private java.lang.Object internalKey_; - /** - * optional string internal_key = 3; - */ - public boolean hasInternalKey() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string internal_key = 3; - */ - public java.lang.String getInternalKey() { - java.lang.Object ref = internalKey_; - 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()) { - internalKey_ = s; - } - return s; - } - } - /** - * optional string internal_key = 3; - */ - public com.google.protobuf.ByteString - getInternalKeyBytes() { - java.lang.Object ref = internalKey_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - internalKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private void initFields() { - repository_ = ""; - key_ = ""; - internalKey_ = ""; - } - 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, getRepositoryBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getKeyBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getInternalKeyBytes()); - } - 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, getRepositoryBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getKeyBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getInternalKeyBytes()); - } - 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.sonarqube.ws.Rules.ListResponse.Rule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonarqube.ws.Rules.ListResponse.Rule 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.sonarqube.ws.Rules.ListResponse.Rule 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 sonarqube.ws.rules.ListResponse.Rule} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:sonarqube.ws.rules.ListResponse.Rule) - org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonarqube.ws.Rules.ListResponse.Rule.class, org.sonarqube.ws.Rules.ListResponse.Rule.Builder.class); - } - - // Construct using org.sonarqube.ws.Rules.ListResponse.Rule.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(); - repository_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - key_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - internalKey_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; - } - - public org.sonarqube.ws.Rules.ListResponse.Rule getDefaultInstanceForType() { - return org.sonarqube.ws.Rules.ListResponse.Rule.getDefaultInstance(); - } - - public org.sonarqube.ws.Rules.ListResponse.Rule build() { - org.sonarqube.ws.Rules.ListResponse.Rule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.sonarqube.ws.Rules.ListResponse.Rule buildPartial() { - org.sonarqube.ws.Rules.ListResponse.Rule result = new org.sonarqube.ws.Rules.ListResponse.Rule(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.repository_ = repository_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.key_ = key_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.internalKey_ = internalKey_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonarqube.ws.Rules.ListResponse.Rule) { - return mergeFrom((org.sonarqube.ws.Rules.ListResponse.Rule)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.sonarqube.ws.Rules.ListResponse.Rule other) { - if (other == org.sonarqube.ws.Rules.ListResponse.Rule.getDefaultInstance()) return this; - if (other.hasRepository()) { - bitField0_ |= 0x00000001; - repository_ = other.repository_; - onChanged(); - } - if (other.hasKey()) { - bitField0_ |= 0x00000002; - key_ = other.key_; - onChanged(); - } - if (other.hasInternalKey()) { - bitField0_ |= 0x00000004; - internalKey_ = other.internalKey_; - 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.sonarqube.ws.Rules.ListResponse.Rule parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonarqube.ws.Rules.ListResponse.Rule) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.lang.Object repository_ = ""; - /** - * optional string repository = 1; - */ - public boolean hasRepository() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional string repository = 1; - */ - public java.lang.String getRepository() { - java.lang.Object ref = repository_; - 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()) { - repository_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string repository = 1; - */ - public com.google.protobuf.ByteString - getRepositoryBytes() { - java.lang.Object ref = repository_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - repository_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string repository = 1; - */ - public Builder setRepository( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - repository_ = value; - onChanged(); - return this; - } - /** - * optional string repository = 1; - */ - public Builder clearRepository() { - bitField0_ = (bitField0_ & ~0x00000001); - repository_ = getDefaultInstance().getRepository(); - onChanged(); - return this; - } - /** - * optional string repository = 1; - */ - public Builder setRepositoryBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - repository_ = value; - onChanged(); - return this; - } - - private java.lang.Object key_ = ""; - /** - * optional string key = 2; - */ - public boolean hasKey() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string key = 2; - */ - 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 = 2; - */ - 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 = 2; - */ - public Builder setKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - key_ = value; - onChanged(); - return this; - } - /** - * optional string key = 2; - */ - public Builder clearKey() { - bitField0_ = (bitField0_ & ~0x00000002); - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - * optional string key = 2; - */ - public Builder setKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000002; - key_ = value; - onChanged(); - return this; - } - - private java.lang.Object internalKey_ = ""; - /** - * optional string internal_key = 3; - */ - public boolean hasInternalKey() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional string internal_key = 3; - */ - public java.lang.String getInternalKey() { - java.lang.Object ref = internalKey_; - 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()) { - internalKey_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string internal_key = 3; - */ - public com.google.protobuf.ByteString - getInternalKeyBytes() { - java.lang.Object ref = internalKey_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - internalKey_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * optional string internal_key = 3; - */ - public Builder setInternalKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - internalKey_ = value; - onChanged(); - return this; - } - /** - * optional string internal_key = 3; - */ - public Builder clearInternalKey() { - bitField0_ = (bitField0_ & ~0x00000004); - internalKey_ = getDefaultInstance().getInternalKey(); - onChanged(); - return this; - } - /** - * optional string internal_key = 3; - */ - public Builder setInternalKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - internalKey_ = value; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:sonarqube.ws.rules.ListResponse.Rule) - } - - static { - defaultInstance = new Rule(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.ListResponse.Rule) - } - - public static final int RULES_FIELD_NUMBER = 1; - private java.util.List rules_; - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public java.util.List getRulesList() { - return rules_; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public int getRulesCount() { - return rules_.size(); - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public org.sonarqube.ws.Rules.ListResponse.Rule getRules(int index) { - return rules_.get(index); - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } - - private void initFields() { - rules_ = 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(); - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(1, rules_.get(i)); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < rules_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, rules_.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.sonarqube.ws.Rules.ListResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonarqube.ws.Rules.ListResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonarqube.ws.Rules.ListResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonarqube.ws.Rules.ListResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonarqube.ws.Rules.ListResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonarqube.ws.Rules.ListResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonarqube.ws.Rules.ListResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonarqube.ws.Rules.ListResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonarqube.ws.Rules.ListResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonarqube.ws.Rules.ListResponse 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.sonarqube.ws.Rules.ListResponse 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 sonarqube.ws.rules.ListResponse} - * - *
-     * WS api/rules/list for internal use only
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:sonarqube.ws.rules.ListResponse) - org.sonarqube.ws.Rules.ListResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonarqube.ws.Rules.ListResponse.class, org.sonarqube.ws.Rules.ListResponse.Builder.class); - } - - // Construct using org.sonarqube.ws.Rules.ListResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - rulesBuilder_.clear(); - } - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_descriptor; - } - - public org.sonarqube.ws.Rules.ListResponse getDefaultInstanceForType() { - return org.sonarqube.ws.Rules.ListResponse.getDefaultInstance(); - } - - public org.sonarqube.ws.Rules.ListResponse build() { - org.sonarqube.ws.Rules.ListResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.sonarqube.ws.Rules.ListResponse buildPartial() { - org.sonarqube.ws.Rules.ListResponse result = new org.sonarqube.ws.Rules.ListResponse(this); - int from_bitField0_ = bitField0_; - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonarqube.ws.Rules.ListResponse) { - return mergeFrom((org.sonarqube.ws.Rules.ListResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.sonarqube.ws.Rules.ListResponse other) { - if (other == org.sonarqube.ws.Rules.ListResponse.getDefaultInstance()) return this; - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000001); - rulesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRulesFieldBuilder() : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } - } - } - 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.sonarqube.ws.Rules.ListResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonarqube.ws.Rules.ListResponse) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Rules.ListResponse.Rule, org.sonarqube.ws.Rules.ListResponse.Rule.Builder, org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder> rulesBuilder_; - - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public org.sonarqube.ws.Rules.ListResponse.Rule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder setRules( - int index, org.sonarqube.ws.Rules.ListResponse.Rule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder setRules( - int index, org.sonarqube.ws.Rules.ListResponse.Rule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder addRules(org.sonarqube.ws.Rules.ListResponse.Rule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder addRules( - int index, org.sonarqube.ws.Rules.ListResponse.Rule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder addRules( - org.sonarqube.ws.Rules.ListResponse.Rule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder addRules( - int index, org.sonarqube.ws.Rules.ListResponse.Rule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder addAllRules( - java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - rulesBuilder_.clear(); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public org.sonarqube.ws.Rules.ListResponse.Rule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public org.sonarqube.ws.Rules.ListResponse.Rule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - org.sonarqube.ws.Rules.ListResponse.Rule.getDefaultInstance()); - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public org.sonarqube.ws.Rules.ListResponse.Rule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, org.sonarqube.ws.Rules.ListResponse.Rule.getDefaultInstance()); - } - /** - * repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1; - */ - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Rules.ListResponse.Rule, org.sonarqube.ws.Rules.ListResponse.Rule.Builder, org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Rules.ListResponse.Rule, org.sonarqube.ws.Rules.ListResponse.Rule.Builder, org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } - - // @@protoc_insertion_point(builder_scope:sonarqube.ws.rules.ListResponse) - } - - static { - defaultInstance = new ListResponse(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.ListResponse) - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_sonarqube_ws_rules_ListResponse_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_sonarqube_ws_rules_ListResponse_Rule_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n\016ws-rules.proto\022\022sonarqube.ws.rules\"\203\001\n" + - "\014ListResponse\0224\n\005rules\030\001 \003(\0132%.sonarqube" + - ".ws.rules.ListResponse.Rule\032=\n\004Rule\022\022\n\nr" + - "epository\030\001 \001(\t\022\013\n\003key\030\002 \001(\t\022\024\n\014internal" + - "_key\030\003 \001(\tB\033\n\020org.sonarqube.wsB\005RulesH\001" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_sonarqube_ws_rules_ListResponse_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_sonarqube_ws_rules_ListResponse_descriptor, - new java.lang.String[] { "Rules", }); - internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor = - internal_static_sonarqube_ws_rules_ListResponse_descriptor.getNestedTypes().get(0); - internal_static_sonarqube_ws_rules_ListResponse_Rule_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor, - new java.lang.String[] { "Repository", "Key", "InternalKey", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/server/sonar-server/src/main/java/org/sonar/server/es/Facets.java b/server/sonar-server/src/main/java/org/sonar/server/es/Facets.java index 9bc8519608e..9f0bed117e8 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/es/Facets.java +++ b/server/sonar-server/src/main/java/org/sonar/server/es/Facets.java @@ -28,6 +28,7 @@ import org.apache.commons.lang.builder.ReflectionToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.search.aggregations.Aggregation; +import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.HasAggregations; import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogram; import org.elasticsearch.search.aggregations.bucket.missing.Missing; @@ -38,20 +39,22 @@ public class Facets { public static final String TOTAL = "total"; - private final Map> facetsByName = new LinkedHashMap<>(); + private final LinkedHashMap> facetsByName; + + public Facets(LinkedHashMap> facetsByName) { + this.facetsByName = facetsByName; + } public Facets(SearchResponse response) { - if (response.getAggregations() != null) { - for (Aggregation facet : response.getAggregations()) { + this.facetsByName = new LinkedHashMap<>(); + Aggregations aggregations = response.getAggregations(); + if (aggregations != null) { + for (Aggregation facet : aggregations) { processAggregation(facet); } } } - public Facets(Terms terms) { - processTermsAggregation(terms); - } - private void processAggregation(Aggregation aggregation) { if (Missing.class.isAssignableFrom(aggregation.getClass())) { processMissingAggregation((Missing) aggregation); diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ActionService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ActionService.java index f9947d7314d..42da9fd1b8e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/ActionService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ActionService.java @@ -20,29 +20,10 @@ package org.sonar.server.issue; -import com.google.common.base.Preconditions; -import com.google.common.base.Predicate; -import com.google.common.base.Strings; -import com.google.common.collect.Iterables; -import java.util.Date; import java.util.List; -import javax.annotation.CheckForNull; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; -import org.sonar.api.component.Component; -import org.sonar.api.config.Settings; -import org.sonar.api.issue.Issue; -import org.sonar.api.issue.action.Action; -import org.sonar.api.issue.action.Actions; -import org.sonar.api.issue.action.Function; import org.sonar.api.server.ServerSide; -import org.sonar.core.issue.DefaultIssue; -import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; -import org.sonar.db.DbClient; -import org.sonar.db.DbSession; -import org.sonar.db.property.PropertiesDao; -import org.sonar.db.property.PropertyDto; +import org.sonar.api.web.UserRole; +import org.sonar.db.issue.IssueDto; import org.sonar.server.user.UserSession; import static com.google.common.collect.Lists.newArrayList; @@ -53,144 +34,30 @@ import static com.google.common.collect.Lists.newArrayList; @ServerSide public class ActionService { - private final DbClient dbClient; - private final IssueService issueService; - private final IssueStorage issueStorage; - private final IssueUpdater updater; - private final Settings settings; - private final PropertiesDao propertiesDao; - private final Actions actions; - - public ActionService(DbClient dbClient, IssueService issueService, IssueStorage issueStorage, IssueUpdater updater, Settings settings, PropertiesDao propertiesDao, - Actions actions) { - this.dbClient = dbClient; - this.issueService = issueService; - this.issueStorage = issueStorage; - this.updater = updater; - this.settings = settings; - this.propertiesDao = propertiesDao; - this.actions = actions; - } - - public List listAllActions() { - return actions.list(); - } - - public List listAvailableActions(String issueKey) { - DbSession session = dbClient.openSession(false); - try { - return listAvailableActions(issueService.getByKeyForUpdate(session, issueKey).toDefaultIssue()); - } finally { - session.close(); - } - } - - public List listAvailableActions(Issue issue) { - return newArrayList(Iterables.filter(actions.list(), new SupportIssue(issue))); - } - - public Issue execute(String issueKey, String actionKey, UserSession userSession) { - Preconditions.checkArgument(!Strings.isNullOrEmpty(actionKey), "Missing action"); - - DbSession session = dbClient.openSession(false); - try { - DefaultIssue issue = issueService.getByKeyForUpdate(session, issueKey).toDefaultIssue(); - Action action = getAction(actionKey); - if (action == null) { - throw new IllegalArgumentException("Action is not found : " + actionKey); + private final UserSession userSession; + + public ActionService(UserSession userSession) { + this.userSession = userSession; + } + + public List listAvailableActions(IssueDto issue) { + List actions = newArrayList(); + String login = userSession.getLogin(); + if (login != null) { + actions.add("comment"); + if (issue.getResolution() == null) { + actions.add("assign"); + actions.add("set_tags"); + if (!login.equals(issue.getAssignee())) { + actions.add("assign_to_me"); + } + actions.add("plan"); + String projectUuid = issue.getProjectUuid(); + if (projectUuid != null && userSession.hasProjectPermissionByUuid(UserRole.ISSUE_ADMIN, projectUuid)) { + actions.add("set_severity"); + } } - if (!action.supports(issue)) { - throw new IllegalStateException("A condition is not respected"); - } - - IssueChangeContext changeContext = IssueChangeContext.createUser(new Date(), userSession.getLogin()); - Component project = dbClient.componentDao().selectOrFailByKey(session, issue.projectKey()); - FunctionContext functionContext = new FunctionContext(issue, updater, changeContext, getProjectSettings(project)); - for (Function function : action.functions()) { - function.execute(functionContext); - } - issueStorage.save(issue); - return issue; - } finally { - session.close(); - } - } - - @CheckForNull - private Action getAction(final String actionKey) { - return Iterables.find(actions.list(), new ActionMatchKey(actionKey), null); - } - - // TODO org.sonar.server.properties.ProjectSettings should be used instead - public Settings getProjectSettings(Component project) { - Settings projectSettings = new Settings(settings); - List properties = propertiesDao.selectProjectProperties(project.key()); - for (PropertyDto dto : properties) { - projectSettings.setProperty(dto.getKey(), dto.getValue()); - } - return projectSettings; - } - - static class FunctionContext implements Function.Context { - - private final DefaultIssue issue; - private final IssueUpdater updater; - private final IssueChangeContext changeContext; - private final Settings projectSettings; - - FunctionContext(DefaultIssue issue, IssueUpdater updater, IssueChangeContext changeContext, Settings projectSettings) { - this.updater = updater; - this.issue = issue; - this.changeContext = changeContext; - this.projectSettings = projectSettings; - } - - @Override - public Issue issue() { - return issue; - } - - @Override - public Settings projectSettings() { - return projectSettings; - } - - @Override - public Function.Context setAttribute(String key, @Nullable String value) { - updater.setAttribute(issue, key, value, changeContext); - return this; - } - - @Override - public Function.Context addComment(String text) { - updater.addComment(issue, text, changeContext); - return this; - } - } - - private static class SupportIssue implements Predicate { - private final Issue issue; - - public SupportIssue(Issue issue) { - this.issue = issue; - } - - @Override - public boolean apply(@Nonnull Action action) { - return action.supports(issue); - } - } - - private static class ActionMatchKey implements Predicate { - private final String key; - - public ActionMatchKey(String key) { - this.key = key; - } - - @Override - public boolean apply(@Nonnull Action action) { - return action.key().equals(key); } + return actions; } } diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java index 8244370a01b..2690882d762 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/InternalRubyIssueService.java @@ -27,7 +27,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; @@ -81,7 +80,6 @@ import org.sonar.server.user.ws.UserJsonWriter; import org.sonar.server.util.RubyUtils; import org.sonar.server.util.Validation; -import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Maps.newHashMap; /** @@ -176,10 +174,6 @@ public class InternalRubyIssueService { return changelogService.formatDiffs(diffs); } - public List listPluginActions() { - return newArrayList(Iterables.transform(actionService.listAllActions(), ActionToKey.INSTANCE)); - } - public List findComments(String issueKey) { return commentService.findComments(issueKey); } @@ -231,7 +225,7 @@ public class InternalRubyIssueService { public Result addComment(String issueKey, String text) { Result result = Result.of(); try { - result.set(commentService.addComment(issueKey, text, userSession)); + result.set(commentService.addComment(issueKey, text)); } catch (Exception e) { result.addError(e.getMessage()); } @@ -239,13 +233,13 @@ public class InternalRubyIssueService { } public IssueComment deleteComment(String commentKey) { - return commentService.deleteComment(commentKey, userSession); + return commentService.deleteComment(commentKey); } public Result editComment(String commentKey, String newText) { Result result = Result.of(); try { - result.set(commentService.editComment(commentKey, newText, userSession)); + result.set(commentService.editComment(commentKey, newText)); } catch (Exception e) { result.addError(e.getMessage()); } @@ -434,24 +428,6 @@ public class InternalRubyIssueService { return result; } - public Result executeAction(String issueKey, String actionKey) { - Result result = Result.of(); - try { - result.set(actionService.execute(issueKey, actionKey, userSession)); - } catch (Exception e) { - result.addError(e.getMessage()); - } - return result; - } - - public List listActions(String issueKey) { - return actionService.listAvailableActions(issueKey); - } - - public List listActions(Issue issue) { - return actionService.listAvailableActions(issue); - } - public IssueQuery emptyIssueQuery() { return issueQueryService.createFromMap(Maps.newHashMap()); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueCommentService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueCommentService.java index d821248ac6b..b6f511e18b7 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueCommentService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueCommentService.java @@ -44,28 +44,26 @@ import java.util.List; import static com.google.common.collect.Lists.newArrayList; -/** - * @since 3.6 - */ -@ServerSide public class IssueCommentService { private final DbClient dbClient; private final IssueService issueService; private final IssueUpdater updater; + private final UserSession userSession; - public IssueCommentService(DbClient dbClient, IssueService issueService, IssueUpdater updater) { + public IssueCommentService(DbClient dbClient, IssueService issueService, IssueUpdater updater, UserSession userSession) { this.dbClient = dbClient; this.issueService = issueService; this.updater = updater; + this.userSession = userSession; } public List findComments(String issueKey) { return findComments(newArrayList(issueKey)); } - public List findComments(DbSession session, String issueKey) { - return findComments(session, newArrayList(issueKey)); + public List findComments(DbSession dbSession, String issueKey) { + return findComments(dbSession, newArrayList(issueKey)); } public List findComments(Collection issueKeys) { @@ -85,7 +83,7 @@ public class IssueCommentService { return dbClient.issueChangeDao().selectCommentByKey(commentKey); } - public IssueComment addComment(String issueKey, String text, UserSession userSession) { + public IssueComment addComment(String issueKey, String text) { verifyLoggedIn(userSession); if (StringUtils.isBlank(text)) { throw new BadRequestException("Cannot add empty comments to an issue"); @@ -110,7 +108,7 @@ public class IssueCommentService { } } - public IssueComment deleteComment(String commentKey, UserSession userSession) { + public IssueComment deleteComment(String commentKey) { DefaultIssueComment comment = dbClient.issueChangeDao().selectCommentByKey(commentKey); if (comment == null) { throw new NotFoundException("Comment not found: " + commentKey); @@ -126,7 +124,7 @@ public class IssueCommentService { return comment; } - public IssueComment editComment(String commentKey, String text, UserSession userSession) { + public IssueComment editComment(String commentKey, String text) { DefaultIssueComment comment = dbClient.issueChangeDao().selectCommentByKey(commentKey); if (StringUtils.isBlank(text)) { throw new BadRequestException("Cannot add empty comments to an issue"); @@ -149,6 +147,10 @@ public class IssueCommentService { return comment; } + public boolean canEditOrDelete(IssueChangeDto dto) { + return userSession.isLoggedIn() && userSession.getLogin().equals(dto.getUserLogin()); + } + private void verifyLoggedIn(UserSession userSession) { if (!userSession.isLoggedIn()) { throw new UnauthorizedException("User is not logged in"); diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueService.java b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueService.java index 64faa57caad..88409c3bcce 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/IssueService.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/IssueService.java @@ -135,7 +135,7 @@ public class IssueService { List allowedTransitions = new ArrayList<>(); for (Transition transition : outTransitions) { String projectUuid = issue.projectUuid(); - if (StringUtils.isBlank(transition.requiredProjectPermission()) || + if (userSession.isLoggedIn() && StringUtils.isBlank(transition.requiredProjectPermission()) || (projectUuid != null && userSession.hasProjectPermissionByUuid(transition.requiredProjectPermission(), projectUuid))) { allowedTransitions.add(transition); } diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/IssueActionsWriter.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/IssueActionsWriter.java index 705f45de7e1..d9023ea75ae 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/IssueActionsWriter.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/IssueActionsWriter.java @@ -80,9 +80,6 @@ public class IssueActionsWriter { if (projectUuid != null && userSession.hasProjectPermissionByUuid(UserRole.ISSUE_ADMIN, projectUuid)) { actions.add("set_severity"); } - for (Action action : actionService.listAvailableActions(issue)) { - actions.add(action.key()); - } } } return actions; diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/Search2Action.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/Search2Action.java new file mode 100644 index 00000000000..7b49c1c3ad2 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/Search2Action.java @@ -0,0 +1,369 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.issue.ws; + +import com.google.common.base.Function; +import com.google.common.collect.Lists; +import com.google.common.io.Resources; +import java.util.Collection; +import java.util.EnumSet; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import javax.annotation.Nullable; +import org.sonar.api.issue.Issue; +import org.sonar.api.rule.Severity; +import org.sonar.api.server.ws.Request; +import org.sonar.api.server.ws.Response; +import org.sonar.api.server.ws.WebService; +import org.sonar.api.server.ws.WebService.Param; +import org.sonar.api.utils.Paging; +import org.sonar.core.rule.RuleKeyFunctions; +import org.sonar.server.es.Facets; +import org.sonar.server.es.SearchOptions; +import org.sonar.server.es.SearchResult; +import org.sonar.server.issue.IssueQuery; +import org.sonar.server.issue.IssueQueryService; +import org.sonar.server.issue.IssueService; +import org.sonar.server.issue.filter.IssueFilterParameters; +import org.sonar.server.issue.index.IssueDoc; +import org.sonar.server.issue.index.IssueIndex; +import org.sonar.server.user.UserSession; +import org.sonar.server.ws.WsUtils; +import org.sonarqube.ws.Issues; + +import static com.google.common.collect.FluentIterable.from; +import static com.google.common.collect.Iterables.concat; +import static java.util.Collections.singletonList; + +public class Search2Action implements IssuesWsAction { + + private static final String INTERNAL_PARAMETER_DISCLAIMER = "This parameter is mostly used by the Issues page, please prefer usage of the componentKeys parameter. "; + public static final String ADDITIONAL_FIELDS = "additionalFields"; + public static final String SEARCH_ACTION = "search2"; + + private final UserSession userSession; + private final IssueService service; + private final IssueQueryService issueQueryService; + private final SearchResponseLoader searchResponseLoader; + private final SearchResponseFormat searchResponseFormat; + + public Search2Action(UserSession userSession, IssueService service, IssueQueryService issueQueryService, + SearchResponseLoader searchResponseLoader, SearchResponseFormat searchResponseFormat) { + this.userSession = userSession; + this.service = service; + this.issueQueryService = issueQueryService; + this.searchResponseLoader = searchResponseLoader; + this.searchResponseFormat = searchResponseFormat; + } + + @Override + public void define(WebService.NewController controller) { + WebService.NewAction action = controller + .createAction(SEARCH_ACTION) + .setHandler(this) + .setDescription( + "Search for issues. Requires Browse permission on project(s)") + .setSince("3.6") + .setResponseExample(Resources.getResource(this.getClass(), "example-search.json")); + + action.addPagingParams(100); + action.createParam(Param.FACETS) + .setDescription("Comma-separated list of the facets to be computed. No facet is computed by default.") + .setPossibleValues(IssueIndex.SUPPORTED_FACETS); + action.createParam(IssueFilterParameters.FACET_MODE) + .setDefaultValue(IssueFilterParameters.FACET_MODE_COUNT) + .setDescription("Choose the returned value for facet items, either count of issues or sum of debt.") + .setPossibleValues(IssueFilterParameters.FACET_MODE_COUNT, IssueFilterParameters.FACET_MODE_DEBT); + action.addSortParams(IssueQuery.SORTS, null, true); + action.createParam(ADDITIONAL_FIELDS) + .setDescription("Comma-separated list of the optional fields to be returned in response.") + .setPossibleValues(SearchAdditionalField.possibleValues()); + addComponentRelatedParams(action); + action.createParam(IssueFilterParameters.ISSUES) + .setDescription("Comma-separated list of issue keys") + .setExampleValue("5bccd6e8-f525-43a2-8d76-fcb13dde79ef"); + action.createParam(IssueFilterParameters.SEVERITIES) + .setDescription("Comma-separated list of severities") + .setExampleValue(Severity.BLOCKER + "," + Severity.CRITICAL) + .setPossibleValues(Severity.ALL); + action.createParam(IssueFilterParameters.STATUSES) + .setDescription("Comma-separated list of statuses") + .setExampleValue(Issue.STATUS_OPEN + "," + Issue.STATUS_REOPENED) + .setPossibleValues(Issue.STATUSES); + action.createParam(IssueFilterParameters.RESOLUTIONS) + .setDescription("Comma-separated list of resolutions") + .setExampleValue(Issue.RESOLUTION_FIXED + "," + Issue.RESOLUTION_REMOVED) + .setPossibleValues(Issue.RESOLUTIONS); + action.createParam(IssueFilterParameters.RESOLVED) + .setDescription("To match resolved or unresolved issues") + .setBooleanPossibleValues(); + action.createParam(IssueFilterParameters.RULES) + .setDescription("Comma-separated list of coding rule keys. Format is :") + .setExampleValue("squid:AvoidCycles"); + action.createParam(IssueFilterParameters.TAGS) + .setDescription("Comma-separated list of tags.") + .setExampleValue("security,convention"); + action.createParam(IssueFilterParameters.ACTION_PLANS) + .setDescription("Comma-separated list of action plan keys (not names)") + .setExampleValue("3f19de90-1521-4482-a737-a311758ff513"); + action.createParam(IssueFilterParameters.PLANNED) + .setDescription("To retrieve issues associated to an action plan or not") + .setBooleanPossibleValues(); + action.createParam(IssueFilterParameters.REPORTERS) + .setDescription("Comma-separated list of reporter logins") + .setExampleValue("admin"); + action.createParam(IssueFilterParameters.AUTHORS) + .setDescription("Comma-separated list of SCM accounts") + .setExampleValue("torvalds@linux-foundation.org"); + action.createParam(IssueFilterParameters.ASSIGNEES) + .setDescription("Comma-separated list of assignee logins. The value '__me__' can be used as a placeholder for user who performs the request") + .setExampleValue("admin,usera,__me__"); + action.createParam(IssueFilterParameters.ASSIGNED) + .setDescription("To retrieve assigned or unassigned issues") + .setBooleanPossibleValues(); + action.createParam(IssueFilterParameters.LANGUAGES) + .setDescription("Comma-separated list of languages. Available since 4.4") + .setExampleValue("java,js"); + action.createParam(IssueFilterParameters.CREATED_AT) + .setDescription("To retrieve issues created at a given date. Format: date or datetime ISO formats") + .setExampleValue("2013-05-01 (or 2013-05-01T13:00:00+0100)"); + action.createParam(IssueFilterParameters.CREATED_AFTER) + .setDescription("To retrieve issues created after the given date (exclusive). Format: date or datetime ISO formats. If this parameter is set, createdSince must not be set") + .setExampleValue("2013-05-01 (or 2013-05-01T13:00:00+0100)"); + action.createParam(IssueFilterParameters.CREATED_BEFORE) + .setDescription("To retrieve issues created before the given date (exclusive). Format: date or datetime ISO formats") + .setExampleValue("2013-05-01 (or 2013-05-01T13:00:00+0100)"); + action.createParam(IssueFilterParameters.CREATED_IN_LAST) + .setDescription("To retrieve issues created during a time span before the current time (exclusive). " + + "Accepted units are 'y' for year, 'm' for month, 'w' for week and 'd' for day. " + + "If this parameter is set, createdAfter must not be set") + .setExampleValue("1m2w (1 month 2 weeks)"); + } + + private static void addComponentRelatedParams(WebService.NewAction action) { + action.createParam(IssueFilterParameters.ON_COMPONENT_ONLY) + .setDescription("Return only issues at a component's level, not on its descendants (modules, directories, files, etc). " + + "This parameter is only considered when componentKeys or componentUuids is set. " + + "Using the deprecated componentRoots or componentRootUuids parameters will set this parameter to false. " + + "Using the deprecated components parameter will set this parameter to true.") + .setBooleanPossibleValues() + .setDefaultValue("false"); + + action.createParam(IssueFilterParameters.COMPONENT_KEYS) + .setDescription("To retrieve issues associated to a specific list of components sub-components (comma-separated list of component keys). " + + "A component can be a view, developer, project, module, directory or file. " + + "If this parameter is set, componentUuids must not be set.") + .setExampleValue("org.apache.struts:struts:org.apache.struts.Action"); + action.createParam(IssueFilterParameters.COMPONENTS) + .setDescription("Deprecated since 5.1. If used, will have the same meaning as componentKeys AND onComponentOnly=true."); + action.createParam(IssueFilterParameters.COMPONENT_UUIDS) + .setDescription("To retrieve issues associated to a specific list of components their sub-components (comma-separated list of component UUIDs). " + + INTERNAL_PARAMETER_DISCLAIMER + + "A component can be a project, module, directory or file. " + + "If this parameter is set, componentKeys must not be set.") + .setExampleValue("584a89f2-8037-4f7b-b82c-8b45d2d63fb2"); + + action.createParam(IssueFilterParameters.COMPONENT_ROOTS) + .setDescription("Deprecated since 5.1. If used, will have the same meaning as componentKeys AND onComponentOnly=false."); + action.createParam(IssueFilterParameters.COMPONENT_ROOT_UUIDS) + .setDescription("Deprecated since 5.1. If used, will have the same meaning as componentUuids AND onComponentOnly=false."); + + action.createParam(IssueFilterParameters.PROJECTS) + .setDescription("Deprecated since 5.1. See projectKeys"); + action.createParam(IssueFilterParameters.PROJECT_KEYS) + .setDescription("To retrieve issues associated to a specific list of projects (comma-separated list of project keys). " + + INTERNAL_PARAMETER_DISCLAIMER + + "If this parameter is set, projectUuids must not be set.") + .setDeprecatedKey(IssueFilterParameters.PROJECTS) + .setExampleValue("org.apache.struts:struts:org.apache.struts.Action"); + action.createParam(IssueFilterParameters.PROJECT_UUIDS) + .setDescription("To retrieve issues associated to a specific list of projects (comma-separated list of project UUIDs). " + + INTERNAL_PARAMETER_DISCLAIMER + + "Views are not supported. If this parameter is set, projectKeys must not be set.") + .setExampleValue("7d8749e8-3070-4903-9188-bdd82933bb92"); + + action.createParam(IssueFilterParameters.MODULE_UUIDS) + .setDescription("To retrieve issues associated to a specific list of modules (comma-separated list of module UUIDs). " + + INTERNAL_PARAMETER_DISCLAIMER + + "Views are not supported. If this parameter is set, moduleKeys must not be set.") + .setExampleValue("7d8749e8-3070-4903-9188-bdd82933bb92"); + + action.createParam(IssueFilterParameters.DIRECTORIES) + .setDescription("Since 5.1. To retrieve issues associated to a specific list of directories (comma-separated list of directory paths). " + + "This parameter is only meaningful when a module is selected. " + + INTERNAL_PARAMETER_DISCLAIMER) + .setExampleValue("src/main/java/org/sonar/server/"); + + action.createParam(IssueFilterParameters.FILE_UUIDS) + .setDescription("To retrieve issues associated to a specific list of files (comma-separated list of file UUIDs). " + + INTERNAL_PARAMETER_DISCLAIMER) + .setExampleValue("bdd82933-3070-4903-9188-7d8749e8bb92"); + } + + @Override + public final void handle(Request request, Response response) throws Exception { + // prepare the Elasticsearch request + SearchOptions options = new SearchOptions(); + options.setPage(request.mandatoryParamAsInt(Param.PAGE), request.mandatoryParamAsInt(Param.PAGE_SIZE)); + options.addFacets(request.paramAsStrings(Param.FACETS)); + EnumSet additionalFields = SearchAdditionalField.getFromRequest(request); + IssueQuery query = issueQueryService.createFromRequest(request); + + // execute request + SearchResult result = service.search(query, options); + List issueKeys = from(result.getDocs()).transform(IssueDocToKey.INSTANCE).toList(); + + // load the additional information to be returned in response + SearchResponseLoader.Collector collector = new SearchResponseLoader.Collector(additionalFields, issueKeys); + collectLoggedInUser(collector); + collectRequestParams(collector, request); + Facets facets = null; + if (!options.getFacets().isEmpty()) { + facets = result.getFacets(); + // add missing values to facets. For example if assignee "john" and facet on "assignees" are requested, then + // "john" should always be listed in the facet. If it is not present, then it is added with value zero. + // This is a constraint from webapp UX. + completeFacets(facets, options, request); + collectFacets(collector, facets); + } + SearchResponseData data = searchResponseLoader.load(collector, facets); + + // format response + + // Filter and reorder facets according to the requested ordered names. + // Must be done after loading of data as the "hidden" facet "debt" + // can be used to get total debt. + facets = reorderFacets(facets, options.getFacets()); + + // FIXME allow long in Paging + Paging paging = Paging.create(options.getLimit(), options.getPage(), (int) result.getTotal()); + Issues.Search responseBody = searchResponseFormat.format(additionalFields, data, paging, facets); + WsUtils.writeProtobuf(responseBody, request, response); + } + + private Facets reorderFacets(@Nullable Facets facets, Collection orderedNames) { + if (facets == null) { + return null; + } + LinkedHashMap> orderedFacets = new LinkedHashMap<>(); + for (String facetName : orderedNames) { + LinkedHashMap facet = facets.get(facetName); + if (facet != null) { + orderedFacets.put(facetName, facet); + } + } + return new Facets(orderedFacets); + } + + private void completeFacets(Facets facets, SearchOptions options, Request request) { + addMandatoryValuesToFacet(facets, IssueFilterParameters.SEVERITIES, Severity.ALL); + addMandatoryValuesToFacet(facets, IssueFilterParameters.STATUSES, Issue.STATUSES); + addMandatoryValuesToFacet(facets, IssueFilterParameters.RESOLUTIONS, concat(singletonList(""), Issue.RESOLUTIONS)); + addMandatoryValuesToFacet(facets, IssueFilterParameters.PROJECT_UUIDS, request.paramAsStrings(IssueFilterParameters.PROJECT_UUIDS)); + + List assignees = Lists.newArrayList(""); + List assigneesFromRequest = request.paramAsStrings(IssueFilterParameters.ASSIGNEES); + if (assigneesFromRequest != null) { + assignees.addAll(assigneesFromRequest); + assignees.remove(IssueQueryService.LOGIN_MYSELF); + } + addMandatoryValuesToFacet(facets, IssueFilterParameters.ASSIGNEES, assignees); + addMandatoryValuesToFacet(facets, IssueFilterParameters.FACET_ASSIGNED_TO_ME, singletonList(userSession.getLogin())); + addMandatoryValuesToFacet(facets, IssueFilterParameters.REPORTERS, request.paramAsStrings(IssueFilterParameters.REPORTERS)); + addMandatoryValuesToFacet(facets, IssueFilterParameters.RULES, request.paramAsStrings(IssueFilterParameters.RULES)); + addMandatoryValuesToFacet(facets, IssueFilterParameters.LANGUAGES, request.paramAsStrings(IssueFilterParameters.LANGUAGES)); + addMandatoryValuesToFacet(facets, IssueFilterParameters.TAGS, request.paramAsStrings(IssueFilterParameters.TAGS)); + List actionPlans = Lists.newArrayList(""); + List actionPlansFromRequest = request.paramAsStrings(IssueFilterParameters.ACTION_PLANS); + if (actionPlansFromRequest != null) { + actionPlans.addAll(actionPlansFromRequest); + } + addMandatoryValuesToFacet(facets, IssueFilterParameters.ACTION_PLANS, actionPlans); + addMandatoryValuesToFacet(facets, IssueFilterParameters.COMPONENT_UUIDS, request.paramAsStrings(IssueFilterParameters.COMPONENT_UUIDS)); + + for (String facetName : options.getFacets()) { + LinkedHashMap buckets = facets.get(facetName); + if (!IssueFilterParameters.FACET_ASSIGNED_TO_ME.equals(facetName)) { + if (buckets != null) { + List requestParams = request.paramAsStrings(facetName); + if (requestParams != null) { + for (String param : requestParams) { + if (!buckets.containsKey(param) && !IssueQueryService.LOGIN_MYSELF.equals(param)) { + // Prevent appearance of a glitch value due to dedicated parameter for this facet + buckets.put(param, 0L); + } + } + } + } + } + } + } + + private void addMandatoryValuesToFacet(Facets facets, String facetName, @Nullable Iterable mandatoryValues) { + Map buckets = facets.get(facetName); + if (buckets != null && mandatoryValues != null) { + for (String mandatoryValue : mandatoryValues) { + if (!buckets.containsKey(mandatoryValue)) { + buckets.put(mandatoryValue, 0L); + } + } + } + } + + private void collectLoggedInUser(SearchResponseLoader.Collector collector) { + if (userSession.isLoggedIn()) { + collector.add(SearchAdditionalField.USERS, userSession.getLogin()); + } + } + + private void collectFacets(SearchResponseLoader.Collector collector, Facets facets) { + Set facetRules = facets.getBucketKeys(IssueFilterParameters.RULES); + if (facetRules != null) { + collector.addAll(SearchAdditionalField.RULES, from(facetRules).transform(RuleKeyFunctions.stringToRuleKey())); + } + collector.addProjectUuids(facets.getBucketKeys(IssueFilterParameters.PROJECT_UUIDS)); + collector.addComponentUuids(facets.getBucketKeys(IssueFilterParameters.COMPONENT_UUIDS)); + collector.addComponentUuids(facets.getBucketKeys(IssueFilterParameters.FILE_UUIDS)); + collector.addComponentUuids(facets.getBucketKeys(IssueFilterParameters.MODULE_UUIDS)); + collector.addAll(SearchAdditionalField.USERS, facets.getBucketKeys(IssueFilterParameters.ASSIGNEES)); + collector.addAll(SearchAdditionalField.USERS, facets.getBucketKeys(IssueFilterParameters.REPORTERS)); + collector.addAll(SearchAdditionalField.ACTION_PLANS, facets.getBucketKeys(IssueFilterParameters.ACTION_PLANS)); + } + + private void collectRequestParams(SearchResponseLoader.Collector collector, Request request) { + collector.addProjectUuids(request.paramAsStrings(IssueFilterParameters.PROJECT_UUIDS)); + collector.addComponentUuids(request.paramAsStrings(IssueFilterParameters.FILE_UUIDS)); + collector.addComponentUuids(request.paramAsStrings(IssueFilterParameters.MODULE_UUIDS)); + collector.addComponentUuids(request.paramAsStrings(IssueFilterParameters.COMPONENT_ROOT_UUIDS)); + collector.addAll(SearchAdditionalField.USERS, request.paramAsStrings(IssueFilterParameters.ASSIGNEES)); + collector.addAll(SearchAdditionalField.USERS, request.paramAsStrings(IssueFilterParameters.REPORTERS)); + collector.addAll(SearchAdditionalField.ACTION_PLANS, request.paramAsStrings(IssueFilterParameters.ACTION_PLANS)); + } + + private enum IssueDocToKey implements Function { + INSTANCE; + @Override + public String apply(IssueDoc input) { + return input.key(); + } + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java index d0958780989..d9729d25d67 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAction.java @@ -273,7 +273,7 @@ public class SearchAction implements IssuesWsAction { options.addFacets(request.paramAsStrings(WebService.Param.FACETS)); IssueQuery query = issueQueryService.createFromRequest(request); - SearchResult result = execute(query, options); + SearchResult result = service.search(query, options); JsonWriter json = response.newJsonWriter().beginObject(); options.writeJson(json, result.getTotal()); @@ -286,10 +286,6 @@ public class SearchAction implements IssuesWsAction { json.endObject().close(); } - private SearchResult execute(IssueQuery query, SearchOptions options) { - return service.search(query, options); - } - private void writeResponse(Request request, SearchResult result, JsonWriter json) { Map debtFacet = result.getFacets().get(IssueIndex.DEBT_AGGREGATION_NAME); if (debtFacet != null) { diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAdditionalField.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAdditionalField.java new file mode 100644 index 00000000000..25a553b908f --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchAdditionalField.java @@ -0,0 +1,83 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.issue.ws; + +import com.google.common.collect.Lists; +import java.util.Collection; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.CheckForNull; +import org.sonar.api.server.ws.Request; + +public enum SearchAdditionalField { + + ACTIONS("actions"), + ACTION_PLANS("actionPlans"), + COMMENTS("comments"), + LANGUAGES("languages"), + RULES("rules"), + TRANSITIONS("transitions"), + USERS("users"); + + public static final String ALL_ALIAS = "_all"; + public static final EnumSet ALL_ADDITIONAL_FIELDS = EnumSet.allOf(SearchAdditionalField.class); + + private final String label; + + SearchAdditionalField(String label) { + this.label = label; + } + + private static final Map BY_LABELS = new HashMap<>(); + + static { + for (SearchAdditionalField f : values()) { + BY_LABELS.put(f.label, f); + } + } + + @CheckForNull + public static SearchAdditionalField findByLabel(String label) { + return BY_LABELS.get(label); + } + + public static Collection possibleValues() { + List possibles = Lists.newArrayList(ALL_ALIAS); + possibles.addAll(BY_LABELS.keySet()); + return possibles; + } + + public static EnumSet getFromRequest(Request request) { + List labels = request.paramAsStrings(Search2Action.ADDITIONAL_FIELDS); + if (labels == null) { + return EnumSet.noneOf(SearchAdditionalField.class); + } + EnumSet fields = EnumSet.noneOf(SearchAdditionalField.class); + for (String label : labels) { + if (label.equals(ALL_ALIAS)) { + return EnumSet.allOf(SearchAdditionalField.class); + } + fields.add(findByLabel(label)); + } + return fields; + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseData.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseData.java new file mode 100644 index 00000000000..0c51f2742d5 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseData.java @@ -0,0 +1,167 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.issue.ws; + +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import javax.annotation.CheckForNull; +import javax.annotation.Nullable; +import org.sonar.core.issue.workflow.Transition; +import org.sonar.db.component.ComponentDto; +import org.sonar.db.issue.ActionPlanDto; +import org.sonar.db.issue.IssueChangeDto; +import org.sonar.db.issue.IssueDto; +import org.sonar.db.rule.RuleDto; +import org.sonar.db.user.UserDto; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * All the data required to write response of api/issues/search + */ +public class SearchResponseData { + + private final List issues; + + private Long debtTotal = null; + private List users = null; + private List rules = null; + private List actionPlans = null; + private final Map componentsByUuid = new HashMap<>(); + private final ListMultimap commentsByIssueKey = ArrayListMultimap.create(); + private final ListMultimap actionsByIssueKey = ArrayListMultimap.create(); + private final ListMultimap transitionsByIssueKey = ArrayListMultimap.create(); + private final Set updatableComments = new HashSet<>(); + + public SearchResponseData(List issues) { + checkNotNull(issues); + this.issues = issues; + } + + public List getIssues() { + return issues; + } + + @CheckForNull + public Collection getComponents() { + return componentsByUuid.values(); + } + + @CheckForNull + public ComponentDto getComponentByUuid(String uuid) { + return componentsByUuid.get(uuid); + } + + @CheckForNull + public List getUsers() { + return users; + } + + @CheckForNull + public List getRules() { + return rules; + } + + @CheckForNull + public List getActionPlans() { + return actionPlans; + } + + @CheckForNull + public List getCommentsForIssueKey(String issueKey) { + if (commentsByIssueKey.containsKey(issueKey)) { + return commentsByIssueKey.get(issueKey); + } + return null; + } + + @CheckForNull + public List getActionsForIssueKey(String issueKey) { + if (actionsByIssueKey.containsKey(issueKey)) { + return actionsByIssueKey.get(issueKey); + } + return null; + } + + @CheckForNull + public List getTransitionsForIssueKey(String issueKey) { + if (transitionsByIssueKey.containsKey(issueKey)) { + return transitionsByIssueKey.get(issueKey); + } + return null; + } + + public void setUsers(@Nullable List users) { + this.users = users; + } + + public void setRules(@Nullable List rules) { + this.rules = rules; + } + + public void setActionPlans(@Nullable List actionPlans) { + this.actionPlans = actionPlans; + } + + public void setComments(@Nullable List comments) { + for (IssueChangeDto comment : comments) { + commentsByIssueKey.put(comment.getIssueKey(), comment); + } + } + + public void addComponents(@Nullable Collection dtos) { + if (dtos != null) { + for (ComponentDto dto : dtos) { + componentsByUuid.put(dto.uuid(), dto); + } + } + } + + public void addActions(String issueKey, List actions) { + actionsByIssueKey.putAll(issueKey, actions); + } + + public void addTransitions(String issueKey, List transitions) { + transitionsByIssueKey.putAll(issueKey, transitions); + } + + public void addUpdatableComment(String commentKey) { + updatableComments.add(commentKey); + } + + public boolean isUpdatableComment(String commentKey) { + return updatableComments.contains(commentKey); + } + + @CheckForNull + public Long getDebtTotal() { + return debtTotal; + } + + public void setDebtTotal(@Nullable Long debtTotal) { + this.debtTotal = debtTotal; + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java new file mode 100644 index 00000000000..29c1a79b398 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseFormat.java @@ -0,0 +1,291 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.issue.ws; + +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import javax.annotation.Nullable; +import org.sonar.api.resources.Language; +import org.sonar.api.resources.Languages; +import org.sonar.api.utils.DateUtils; +import org.sonar.api.utils.Duration; +import org.sonar.api.utils.Durations; +import org.sonar.api.utils.Paging; +import org.sonar.core.issue.workflow.Transition; +import org.sonar.db.component.ComponentDto; +import org.sonar.db.issue.ActionPlanDto; +import org.sonar.db.issue.IssueChangeDto; +import org.sonar.db.issue.IssueDto; +import org.sonar.db.rule.RuleDto; +import org.sonar.db.user.UserDto; +import org.sonar.markdown.Markdown; +import org.sonar.server.es.Facets; +import org.sonar.server.ws.WsResponseCommonFormat; +import org.sonarqube.ws.Common; +import org.sonarqube.ws.Issues; + +import static com.google.common.base.Strings.nullToEmpty; + +public class SearchResponseFormat { + + private final Durations durations; + private final WsResponseCommonFormat commonFormat; + private final Languages languages; + + public SearchResponseFormat(Durations durations, WsResponseCommonFormat commonFormat, Languages languages) { + this.durations = durations; + this.commonFormat = commonFormat; + this.languages = languages; + } + + public Issues.Search format(Set fields, SearchResponseData data, + @Nullable Paging paging, @Nullable Facets facets) { + Issues.Search.Builder response = Issues.Search.newBuilder(); + + if (paging != null) { + formatPaging(paging, response); + } + formatDebtTotal(data, response); + formatIssues(fields, data, response); + formatComponents(data, response); + if (facets != null) { + formatFacets(facets, response); + } + if (fields.contains(SearchAdditionalField.RULES)) { + formatRules(data, response); + } + if (fields.contains(SearchAdditionalField.USERS)) { + formatUsers(data, response); + } + if (fields.contains(SearchAdditionalField.ACTION_PLANS)) { + formatActionPlans(data, response); + } + if (fields.contains(SearchAdditionalField.LANGUAGES)) { + formatLanguages(response); + } + return response.build(); + } + + private void formatDebtTotal(SearchResponseData data, Issues.Search.Builder response) { + Long debt = data.getDebtTotal(); + if (debt != null) { + response.setDebtTotal(debt); + } + } + + private void formatPaging(Paging paging, Issues.Search.Builder response) { + response.setP(paging.pageIndex()); + response.setPs(paging.pageSize()); + response.setTotal(paging.total()); + response.setPaging(commonFormat.formatPaging(paging)); + } + + private void formatIssues(Set fields, SearchResponseData data, Issues.Search.Builder response) { + Issues.Issue.Builder issueBuilder = Issues.Issue.newBuilder(); + for (IssueDto dto : data.getIssues()) { + issueBuilder.clear(); + formatIssue(issueBuilder, dto, data); + if (fields.contains(SearchAdditionalField.ACTIONS)) { + formatIssueActions(data, issueBuilder, dto); + } + if (fields.contains(SearchAdditionalField.TRANSITIONS)) { + formatIssueTransitions(data, issueBuilder, dto); + } + if (fields.contains(SearchAdditionalField.COMMENTS)) { + formatIssueComments(data, issueBuilder, dto); + } + // TODO attributes + response.addIssues(issueBuilder.build()); + } + } + + private void formatIssue(Issues.Issue.Builder issueBuilder, IssueDto dto, SearchResponseData data) { + issueBuilder.setKey(dto.getKey()); + ComponentDto component = data.getComponentByUuid(dto.getComponentUuid()); + issueBuilder.setComponent(dto.getComponentUuid()); + // Only used for the compatibility with the Issues Java WS Client <= 4.4 used by Eclipse + issueBuilder.setComponentId(component.getId()); + + ComponentDto project = data.getComponentByUuid(dto.getProjectUuid()); + if (project != null) { + issueBuilder.setProject(project.uuid()); + } + issueBuilder.setRule(dto.getRuleKey().toString()); + issueBuilder.setSeverity(Common.Severity.valueOf(dto.getSeverity())); + issueBuilder.setAssignee(nullToEmpty(dto.getAssignee())); + issueBuilder.setReporter(nullToEmpty(dto.getReporter())); + issueBuilder.setResolution(nullToEmpty(dto.getResolution())); + issueBuilder.setStatus(nullToEmpty(dto.getStatus())); + issueBuilder.setActionPlan(nullToEmpty(dto.getActionPlanKey())); + issueBuilder.setMessage(nullToEmpty(dto.getMessage())); + issueBuilder.addAllTags(dto.getTags()); + Long debt = dto.getDebt(); + if (debt != null) { + issueBuilder.setDebt(durations.encode(Duration.create(debt))); + } + Integer line = dto.getLine(); + if (line != null) { + issueBuilder.setLine(line); + } + issueBuilder.setAuthor(nullToEmpty(dto.getAuthorLogin())); + Date date = dto.getIssueCreationDate(); + if (date != null) { + issueBuilder.setCreationDate(DateUtils.formatDateTime(date)); + } + date = dto.getIssueUpdateDate(); + if (date != null) { + issueBuilder.setUpdateDate(DateUtils.formatDateTime(date)); + } + date = dto.getIssueCloseDate(); + if (date != null) { + issueBuilder.setCloseDate(DateUtils.formatDateTime(date)); + } + } + + private void formatIssueTransitions(SearchResponseData data, Issues.Issue.Builder issueBuilder, IssueDto dto) { + issueBuilder.setTransitionsPresentIfEmpty(true); + List transitions = data.getTransitionsForIssueKey(dto.getKey()); + if (transitions != null) { + for (Transition transition : transitions) { + issueBuilder.addTransitions(transition.key()); + } + } + } + + private void formatIssueActions(SearchResponseData data, Issues.Issue.Builder issueBuilder, IssueDto dto) { + issueBuilder.setActionsPresentIfEmpty(true); + List actions = data.getActionsForIssueKey(dto.getKey()); + if (actions != null) { + issueBuilder.addAllActions(actions); + } + } + + private void formatIssueComments(SearchResponseData data, Issues.Issue.Builder issueBuilder, IssueDto dto) { + issueBuilder.setCommentsPresentIfEmpty(true); + List comments = data.getCommentsForIssueKey(dto.getKey()); + if (comments != null) { + Issues.Comment.Builder commentBuilder = Issues.Comment.newBuilder(); + for (IssueChangeDto comment : comments) { + String markdown = comment.getChangeData(); + commentBuilder + .clear() + .setKey(comment.getKey()) + .setLogin(nullToEmpty(comment.getUserLogin())) + .setUpdatable(data.isUpdatableComment(comment.getKey())) + .setCreatedAt(DateUtils.formatDateTime(new Date(comment.getCreatedAt()))); + if (markdown != null) { + commentBuilder + .setHtmlText(Markdown.convertToHtml(markdown)) + .setMarkdown(markdown); + } + issueBuilder.addComments(commentBuilder.build()); + } + } + } + + private void formatRules(SearchResponseData data, Issues.Search.Builder response) { + response.setRulesPresentIfEmpty(true); + List rules = data.getRules(); + if (rules != null) { + for (RuleDto rule : rules) { + response.addRules(commonFormat.formatRule(rule)); + } + } + } + + private void formatComponents(SearchResponseData data, Issues.Search.Builder response) { + response.setComponentsPresentIfEmpty(true); + Collection components = data.getComponents(); + if (components != null) { + for (ComponentDto dto : components) { + response.addComponents(commonFormat.formatComponent(dto)); + } + } + } + + private void formatUsers(SearchResponseData data, Issues.Search.Builder response) { + response.setUsersPresentIfEmpty(true); + List users = data.getUsers(); + if (users != null) { + for (UserDto user : users) { + response.addUsers(commonFormat.formatUser(user)); + } + } + } + + private void formatActionPlans(SearchResponseData data, Issues.Search.Builder response) { + response.setActionPlansPresentIfEmpty(true); + List actionPlans = data.getActionPlans(); + if (actionPlans != null) { + Issues.ActionPlan.Builder planBuilder = Issues.ActionPlan.newBuilder(); + for (ActionPlanDto actionPlan : actionPlans) { + planBuilder + .clear() + .setKey(actionPlan.getKey()) + .setName(nullToEmpty(actionPlan.getName())) + .setStatus(nullToEmpty(actionPlan.getStatus())) + .setProject(nullToEmpty(actionPlan.getProjectUuid())); + Date deadLine = actionPlan.getDeadLine(); + if (deadLine != null) { + planBuilder.setDeadLine(DateUtils.formatDateTime(deadLine)); + } + response.addActionPlans(planBuilder.build()); + } + } + } + + private void formatLanguages(Issues.Search.Builder response) { + response.setLanguagesPresentIfEmpty(true); + Issues.Language.Builder builder = Issues.Language.newBuilder(); + for (Language lang : languages.all()) { + builder + .clear() + .setKey(lang.getKey()) + .setName(lang.getName()); + response.addLanguages(builder.build()); + } + } + + private void formatFacets(Facets facets, Issues.Search.Builder response) { + response.setFacetsPresentIfEmpty(true); + Common.Facet.Builder facetBuilder = Common.Facet.newBuilder(); + for (Map.Entry> facet : facets.getAll().entrySet()) { + facetBuilder.clear(); + facetBuilder.setProperty(facet.getKey()); + LinkedHashMap buckets = facet.getValue(); + if (buckets != null) { + for (Map.Entry bucket : buckets.entrySet()) { + Common.FacetValue.Builder valueBuilder = facetBuilder.addValuesBuilder(); + valueBuilder.setVal(bucket.getKey()); + valueBuilder.setCount(bucket.getValue()); + valueBuilder.build(); + } + } else { + facetBuilder.addAllValues(Collections.emptyList()); + } + response.addFacets(facetBuilder.build()); + } + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java new file mode 100644 index 00000000000..1a4a9ac98a7 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/issue/ws/SearchResponseLoader.java @@ -0,0 +1,241 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.issue.ws; + +import com.google.common.collect.MultimapBuilder; +import com.google.common.collect.SetMultimap; +import java.util.Collection; +import java.util.EnumSet; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import javax.annotation.Nullable; +import org.sonar.api.rule.RuleKey; +import org.sonar.core.issue.DefaultIssue; +import org.sonar.db.DbClient; +import org.sonar.db.DbSession; +import org.sonar.db.component.ComponentDto; +import org.sonar.db.issue.IssueChangeDto; +import org.sonar.db.issue.IssueDto; +import org.sonar.server.es.Facets; +import org.sonar.server.issue.ActionService; +import org.sonar.server.issue.IssueCommentService; +import org.sonar.server.issue.IssueService; +import org.sonar.server.issue.index.IssueIndex; + +import static com.google.common.collect.Lists.newArrayList; +import static org.sonar.server.issue.ws.SearchAdditionalField.ACTIONS; +import static org.sonar.server.issue.ws.SearchAdditionalField.ACTION_PLANS; +import static org.sonar.server.issue.ws.SearchAdditionalField.COMMENTS; +import static org.sonar.server.issue.ws.SearchAdditionalField.RULES; +import static org.sonar.server.issue.ws.SearchAdditionalField.TRANSITIONS; +import static org.sonar.server.issue.ws.SearchAdditionalField.USERS; + +/** + * Loads all the information required for the response of api/issues/search. + */ +public class SearchResponseLoader { + + private final DbClient dbClient; + private final IssueService issueService; + private final ActionService actionService; + private final IssueCommentService commentService; + + public SearchResponseLoader(DbClient dbClient, IssueService issueService, ActionService actionService, IssueCommentService commentService) { + this.dbClient = dbClient; + this.issueService = issueService; + this.actionService = actionService; + this.commentService = commentService; + } + + /** + * The issue keys are given by the multi-criteria search in Elasticsearch index. + */ + public SearchResponseData load(Collector collector, @Nullable Facets facets) { + DbSession dbSession = dbClient.openSession(false); + try { + SearchResponseData result = new SearchResponseData(dbClient.issueDao().selectByOrderedKeys(dbSession, collector.getIssueKeys())); + collector.collect(result.getIssues()); + + loadRules(collector, dbSession, result); + // order is important - loading of comments complete the list of users: loadComments() is + // before loadUsers() + loadComments(collector, dbSession, result); + loadUsers(collector, dbSession, result); + loadActionPlans(collector, dbSession, result); + loadComponents(collector, dbSession, result); + loadActionsAndTransitions(collector, result); + completeTotalDebtFromFacet(facets, result); + return result; + } finally { + dbClient.closeSession(dbSession); + } + } + + private void loadUsers(Collector collector, DbSession dbSession, SearchResponseData result) { + if (collector.contains(USERS)) { + result.setUsers(dbClient.userDao().selectByLogins(dbSession, collector.get(USERS))); + } + } + + private void loadComments(Collector collector, DbSession dbSession, SearchResponseData result) { + if (collector.contains(COMMENTS)) { + List comments = dbClient.issueChangeDao().selectByTypeAndIssueKeys(dbSession, collector.getIssueKeys(), IssueChangeDto.TYPE_COMMENT); + result.setComments(comments); + for (IssueChangeDto comment : comments) { + collector.add(USERS, comment.getUserLogin()); + if (commentService.canEditOrDelete(comment)) { + result.addUpdatableComment(comment.getKey()); + } + } + } + } + + private void loadActionPlans(Collector collector, DbSession dbSession, SearchResponseData result) { + if (collector.contains(ACTION_PLANS)) { + result.setActionPlans(dbClient.actionPlanDao().selectByKeys(dbSession, collector.get(ACTION_PLANS))); + } + } + + private void loadRules(Collector collector, DbSession dbSession, SearchResponseData result) { + if (collector.contains(RULES)) { + result.setRules(dbClient.ruleDao().selectByKeys(dbSession, collector.get(RULES))); + } + } + + private void loadComponents(Collector collector, DbSession dbSession, SearchResponseData result) { + // always load components and projects, because some issue fields still relate to component ids/keys. + // They should be dropped but are kept for backward-compatibility (see SearchResponseFormat) + result.addComponents(dbClient.componentDao().selectByUuids(dbSession, collector.getComponentUuids())); + result.addComponents(dbClient.componentDao().selectSubProjectsByComponentUuids(dbSession, collector.getComponentUuids())); + for (ComponentDto component : result.getComponents()) { + collector.addProjectUuid(component.projectUuid()); + } + List projects = dbClient.componentDao().selectByUuids(dbSession, collector.getProjectUuids()); + result.addComponents(projects); + } + + private void loadActionsAndTransitions(Collector collector, SearchResponseData result) { + if (collector.contains(ACTIONS) || collector.contains(TRANSITIONS)) { + for (IssueDto dto : result.getIssues()) { + // so that IssueDto can be used. + if (collector.contains(ACTIONS)) { + result.addActions(dto.getKey(), actionService.listAvailableActions(dto)); + } + if (collector.contains(TRANSITIONS)) { + // TODO workflow and action engines must not depend on org.sonar.api.issue.Issue but on a generic interface + DefaultIssue issue = dto.toDefaultIssue(); + result.addTransitions(issue.key(), issueService.listTransitions(issue)); + } + } + } + } + + private void completeTotalDebtFromFacet(@Nullable Facets facets, SearchResponseData result) { + if (facets != null) { + Map debtFacet = facets.get(IssueIndex.DEBT_AGGREGATION_NAME); + if (debtFacet != null) { + result.setDebtTotal(debtFacet.get(Facets.TOTAL)); + } + } + } + + /** + * Collects the keys of all the data to be loaded (users, rules, ...) + */ + public static class Collector { + private final EnumSet fields; + private final SetMultimap fieldValues = MultimapBuilder.enumKeys(SearchAdditionalField.class).hashSetValues().build(); + private final Set componentUuids = new HashSet<>(); + private final Set projectUuids = new HashSet<>(); + private final List issueKeys; + + public Collector(EnumSet fields, List issueKeys) { + this.fields = fields; + this.issueKeys = issueKeys; + } + + void collect(List issues) { + for (IssueDto issue : issues) { + componentUuids.add(issue.getComponentUuid()); + projectUuids.add(issue.getProjectUuid()); + add(ACTION_PLANS, issue.getActionPlanKey()); + add(RULES, issue.getRuleKey()); + add(USERS, issue.getReporter()); + add(USERS, issue.getAssignee()); + } + } + + public void add(SearchAdditionalField key, @Nullable Object value) { + if (value != null) { + fieldValues.put(key, value); + } + } + + public void addComponentUuid(String uuid) { + this.componentUuids.add(uuid); + } + + public void addComponentUuids(@Nullable Collection uuids) { + if (uuids != null) { + this.componentUuids.addAll(uuids); + } + } + + public void addProjectUuid(String uuid) { + this.projectUuids.add(uuid); + } + + public void addProjectUuids(@Nullable Collection uuids) { + if (uuids != null) { + this.projectUuids.addAll(uuids); + } + } + + public void addAll(SearchAdditionalField key, @Nullable Iterable values) { + if (values != null) { + for (Object value : values) { + add(key, value); + } + } + } + + List get(SearchAdditionalField key) { + return newArrayList((Set) fieldValues.get(key)); + } + + boolean contains(SearchAdditionalField field) { + return fields.contains(field); + } + + public List getIssueKeys() { + return issueKeys; + } + + public Set getComponentUuids() { + return componentUuids; + } + + public Set getProjectUuids() { + return projectUuids; + } + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java index b79fb1fba47..b4e68e63bb3 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java @@ -158,6 +158,8 @@ import org.sonar.server.issue.ws.IssueActionsWriter; import org.sonar.server.issue.ws.IssueComponentHelper; import org.sonar.server.issue.ws.IssueJsonWriter; import org.sonar.server.issue.ws.IssuesWs; +import org.sonar.server.issue.ws.SearchResponseFormat; +import org.sonar.server.issue.ws.SearchResponseLoader; import org.sonar.server.issue.ws.SetTagsAction; import org.sonar.server.language.ws.LanguageWs; import org.sonar.server.measure.MeasureFilterEngine; @@ -321,6 +323,7 @@ import org.sonar.server.view.index.ViewIndexDefinition; import org.sonar.server.view.index.ViewIndexer; import org.sonar.server.ws.ListingWs; import org.sonar.server.ws.WebServiceEngine; +import org.sonar.server.ws.WsResponseCommonFormat; public class PlatformLevel4 extends PlatformLevel { @@ -602,8 +605,12 @@ public class PlatformLevel4 extends PlatformLevel { IssuesWs.class, IssueJsonWriter.class, IssueComponentHelper.class, + WsResponseCommonFormat.class, + SearchResponseLoader.class, + SearchResponseFormat.class, org.sonar.server.issue.ws.ShowAction.class, org.sonar.server.issue.ws.SearchAction.class, + org.sonar.server.issue.ws.Search2Action.class, org.sonar.server.issue.ws.TagsAction.class, SetTagsAction.class, ComponentTagsAction.class, diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/ListAction.java b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/ListAction.java index 52be58caef3..ffef9a8e601 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/ListAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/ListAction.java @@ -31,6 +31,8 @@ import org.sonar.db.rule.RuleDto; import org.sonar.server.plugins.MimeTypes; import org.sonarqube.ws.Rules.ListResponse; +import static com.google.common.base.Strings.nullToEmpty; + public class ListAction implements RulesWsAction { private final DbClient dbClient; @@ -62,11 +64,9 @@ public class ListAction implements RulesWsAction { ruleBuilder .clear() .setRepository(dto.getRepositoryKey()) - .setKey(dto.getRuleKey()); - String internalKey = dto.getConfigKey(); - if (!Strings.isNullOrEmpty(internalKey)) { - ruleBuilder.setInternalKey(internalKey); - } + .setKey(dto.getRuleKey()) + .setName(nullToEmpty(dto.getName())) + .setInternalKey(nullToEmpty(dto.getConfigKey())); listResponseBuilder.addRules(ruleBuilder.build()); } }); diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/WsResponseCommonFormat.java b/server/sonar-server/src/main/java/org/sonar/server/ws/WsResponseCommonFormat.java new file mode 100644 index 00000000000..04fc387b615 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/ws/WsResponseCommonFormat.java @@ -0,0 +1,111 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.ws; + +import com.google.common.base.Strings; +import org.sonar.api.resources.Language; +import org.sonar.api.resources.Languages; +import org.sonar.api.utils.Paging; +import org.sonar.db.component.ComponentDto; +import org.sonar.db.rule.RuleDto; +import org.sonar.db.user.UserDto; +import org.sonar.markdown.Markdown; +import org.sonarqube.ws.Common; + +import static com.google.common.base.Strings.nullToEmpty; +import static java.lang.String.format; + +public class WsResponseCommonFormat { + + private final Languages languages; + + public WsResponseCommonFormat(Languages languages) { + this.languages = languages; + } + + public Common.Paging.Builder formatPaging(Paging paging) { + return Common.Paging.newBuilder() + .setPageIndex(paging.pageIndex()) + .setPages(paging.pages()) + .setPageSize(paging.pageSize()) + .setTotal(paging.total()); + } + + public Common.Rule.Builder formatRule(RuleDto rule) { + Common.Rule.Builder builder = Common.Rule.newBuilder() + .setKey(rule.getKey().toString()) + .setDesc(nullToEmpty(rule.getDescription())) + .setStatus(Common.RuleStatus.valueOf(rule.getStatus().name())); + + builder.setLang(nullToEmpty(rule.getLanguage())); + Language lang = languages.get(rule.getLanguage()); + if (lang != null) { + builder.setLangName(lang.getName()); + } + + String desc = rule.getDescription(); + if (desc != null) { + switch (rule.getDescriptionFormat()) { + case HTML: + builder.setDesc(desc); + break; + case MARKDOWN: + builder.setDesc(Markdown.convertToHtml(desc)); + break; + default: + throw new IllegalArgumentException(format("Unknown description format '%s' on rule '%s'", rule.getDescriptionFormat(), rule.getKey())); + } + } + return builder; + } + + public Common.Component.Builder formatComponent(ComponentDto dto) { + Common.Component.Builder builder = Common.Component.newBuilder() + .setId(dto.uuid()) + .setKey(dto.key()) + .setQualifier(dto.qualifier()) + .setName(nullToEmpty(dto.name())) + .setLongName(nullToEmpty(dto.longName())) + .setEnabled(dto.isEnabled()); + String path = dto.path(); + // path is not applicable to the components that are not files. + // Value must not be "" in this case. + if (!Strings.isNullOrEmpty(path)) { + builder.setPath(path); + } + + // On a root project, parentProjectId is null but projectId is equal to itself, which make no sense. + if (dto.projectUuid() != null && dto.parentProjectId() != null) { + builder.setProject(dto.projectUuid()); + } + if (dto.parentProjectId() != null) { + builder.setSubProject(dto.moduleUuid()); + } + return builder; + } + + public Common.User.Builder formatUser(UserDto user) { + return Common.User.newBuilder() + .setLogin(user.getLogin()) + .setName(nullToEmpty(user.getName())) + .setEmail(nullToEmpty(user.getEmail())) + .setActive(user.isActive()); + } +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java b/server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java new file mode 100644 index 00000000000..a075735b391 --- /dev/null +++ b/server/sonar-server/src/main/java/org/sonar/server/ws/WsUtils.java @@ -0,0 +1,54 @@ +/* + * SonarQube, open source software quality management tool. + * Copyright (C) 2008-2014 SonarSource + * mailto:contact AT sonarsource DOT com + * + * SonarQube is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * SonarQube is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.server.ws; + +import com.google.protobuf.Message; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import org.apache.commons.io.IOUtils; +import org.sonar.api.server.ws.Request; +import org.sonar.api.server.ws.Response; +import org.sonar.api.utils.text.JsonWriter; +import org.sonar.core.util.ProtobufJsonFormat; +import org.sonar.server.plugins.MimeTypes; + +public class WsUtils { + + private WsUtils() { + // only statics + } + + public static void writeProtobuf(Message msg, Request request, Response response) throws Exception { + OutputStream output = response.stream().output(); + try { + if (request.getMediaType().equals(MimeTypes.PROTOBUF)) { + response.stream().setMediaType(MimeTypes.PROTOBUF); + msg.writeTo(output); + } else { + response.stream().setMediaType(MimeTypes.JSON); + try (OutputStreamWriter writer = new OutputStreamWriter(output)) { + ProtobufJsonFormat.write(msg, JsonWriter.of(writer)); + } + } + } finally { + IOUtils.closeQuietly(output); + } + } +} diff --git a/server/sonar-server/src/main/protobuf/ws-rules.proto b/server/sonar-server/src/main/protobuf/ws-rules.proto deleted file mode 100644 index 43a04956ebb..00000000000 --- a/server/sonar-server/src/main/protobuf/ws-rules.proto +++ /dev/null @@ -1,39 +0,0 @@ -// SonarQube, open source software quality management tool. -// Copyright (C) 2008-2015 SonarSource -// mailto:contact AT sonarsource DOT com -// -// SonarQube is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 3 of the License, or (at your option) any later version. -// -// SonarQube is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with this program; if not, write to the Free Software Foundation, -// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -syntax = "proto2"; - -package sonarqube.ws.rules; - -option java_package = "org.sonarqube.ws"; -option java_outer_classname = "Rules"; -option optimize_for = SPEED; - -// WS api/rules/list for internal use only -message ListResponse { - - message Rule { - optional string repository = 1; - optional string key = 2; - optional string internal_key = 3; - optional string name = 4; - } - - repeated Rule rules = 1; - -} diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java deleted file mode 100644 index 85f01b75a75..00000000000 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ActionServiceTest.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -package org.sonar.server.issue; - -import java.util.List; -import org.junit.Before; -import org.junit.Test; -import org.sonar.api.component.Component; -import org.sonar.api.config.Settings; -import org.sonar.api.issue.Issue; -import org.sonar.api.issue.action.Actions; -import org.sonar.api.issue.action.Function; -import org.sonar.api.issue.condition.Condition; -import org.sonar.core.issue.DefaultIssue; -import org.sonar.core.issue.IssueChangeContext; -import org.sonar.core.issue.IssueUpdater; -import org.sonar.db.DbClient; -import org.sonar.db.DbSession; -import org.sonar.db.component.ComponentDao; -import org.sonar.db.component.ComponentDto; -import org.sonar.db.issue.IssueDto; -import org.sonar.db.property.PropertiesDao; -import org.sonar.db.property.PropertyDto; -import org.sonar.db.rule.RuleTesting; -import org.sonar.server.component.ComponentTesting; -import org.sonar.server.user.ThreadLocalUserSession; -import org.sonar.server.user.UserSession; - -import static com.google.common.collect.Lists.newArrayList; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.fail; -import static org.mockito.Mockito.any; -import static org.mockito.Mockito.anyString; -import static org.mockito.Mockito.eq; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.verifyZeroInteractions; -import static org.mockito.Mockito.when; - -public class ActionServiceTest { - - DbClient dbClient; - DbSession session; - - ComponentDao componentDao; - IssueService issueService; - IssueStorage issueStorage; - IssueUpdater updater; - PropertiesDao propertiesDao; - Settings settings; - Actions actions; - ActionService actionService; - - IssueDto issue; - - @Before - public void before() { - dbClient = mock(DbClient.class); - session = mock(DbSession.class); - when(dbClient.openSession(false)).thenReturn(session); - - componentDao = mock(ComponentDao.class); - when(dbClient.componentDao()).thenReturn(componentDao); - issueService = mock(IssueService.class); - issueStorage = mock(IssueStorage.class); - updater = mock(IssueUpdater.class); - propertiesDao = mock(PropertiesDao.class); - settings = new Settings(); - actions = new Actions(); - - ComponentDto project = ComponentTesting.newProjectDto(); - issue = IssueTesting.newDto(RuleTesting.newXooX1().setId(10), ComponentTesting.newFileDto(project), project).setKee("ABCD"); - - actionService = new ActionService(dbClient, issueService, issueStorage, updater, settings, propertiesDao, actions); - } - - @Test - public void execute_functions() { - Function function1 = mock(Function.class); - Function function2 = mock(Function.class); - - when(componentDao.selectOrFailByKey(eq(session), anyString())).thenReturn(mock(ComponentDto.class)); - when(issueService.getByKeyForUpdate(session, "ABCD")).thenReturn(issue); - - actions.add("link-to-jira").setConditions(new AlwaysMatch()).setFunctions(function1, function2); - - assertThat(actionService.execute("ABCD", "link-to-jira", mock(ThreadLocalUserSession.class))).isNotNull(); - - verify(function1).execute(any(Function.Context.class)); - verify(function2).execute(any(Function.Context.class)); - verifyNoMoreInteractions(function1, function2); - } - - @Test - public void modify_issue_when_executing_a_function() { - Function function = new TweetFunction(); - - UserSession userSession = mock(ThreadLocalUserSession.class); - when(userSession.getLogin()).thenReturn("arthur"); - - when(componentDao.selectOrFailByKey(eq(session), anyString())).thenReturn(mock(ComponentDto.class)); - when(issueService.getByKeyForUpdate(session, "ABCD")).thenReturn(issue); - - actions.add("link-to-jira").setConditions(new AlwaysMatch()).setFunctions(function); - assertThat(actionService.execute("ABCD", "link-to-jira", userSession)).isNotNull(); - - verify(updater).addComment(any(DefaultIssue.class), eq("New tweet on issue ABCD"), any(IssueChangeContext.class)); - verify(updater).setAttribute(any(DefaultIssue.class), eq("tweet"), eq("tweet sent"), any(IssueChangeContext.class)); - } - - @Test - public void inject_project_settings_when_executing_a_function() { - Function function = new TweetFunction(); - - UserSession userSession = mock(ThreadLocalUserSession.class); - when(userSession.getLogin()).thenReturn("arthur"); - - when(componentDao.selectOrFailByKey(session, "struts")).thenReturn(new ComponentDto().setKey("struts")); - when(issueService.getByKeyForUpdate(session, "ABCD")).thenReturn(issue.setProjectKey("struts")); - - actions.add("link-to-jira").setConditions(new AlwaysMatch()).setFunctions(function); - assertThat(actionService.execute("ABCD", "link-to-jira", userSession)).isNotNull(); - - verify(propertiesDao).selectProjectProperties(eq("struts")); - } - - @Test - public void not_execute_function_if_action_not_found() { - Function function = mock(Function.class); - - when(componentDao.selectOrFailByKey(eq(session), anyString())).thenReturn(mock(ComponentDto.class)); - when(issueService.getByKeyForUpdate(session, "ABCD")).thenReturn(issue); - - actions.add("link-to-jira").setConditions(new AlwaysMatch()).setFunctions(function); - try { - actionService.execute("ABCD", "tweet", mock(ThreadLocalUserSession.class)); - fail(); - } catch (Exception e) { - assertThat(e).isInstanceOf(IllegalArgumentException.class).hasMessage("Action is not found : tweet"); - } - verifyZeroInteractions(function); - } - - @Test - public void not_execute_function_if_action_is_not_supported() { - Function function = mock(Function.class); - - when(componentDao.selectOrFailByKey(eq(session), anyString())).thenReturn(mock(ComponentDto.class)); - when(issueService.getByKeyForUpdate(session, "ABCD")).thenReturn(issue); - - actions.add("link-to-jira").setConditions(new NeverMatch()).setFunctions(function); - try { - actionService.execute("ABCD", "link-to-jira", mock(ThreadLocalUserSession.class)); - fail(); - } catch (Exception e) { - assertThat(e).isInstanceOf(IllegalStateException.class).hasMessage("A condition is not respected"); - } - verifyZeroInteractions(function); - } - - @Test - public void list_available_supported_actions() { - when(componentDao.selectOrFailByKey(eq(session), anyString())).thenReturn(mock(ComponentDto.class)); - when(issueService.getByKeyForUpdate(session, "ABCD")).thenReturn(issue); - - actions.add("link-to-jira").setConditions(new AlwaysMatch()); - actions.add("tweet").setConditions(new NeverMatch()); - assertThat(actionService.listAvailableActions("ABCD")).hasSize(1); - } - - @Test - public void return_no_action() { - when(componentDao.selectOrFailByKey(eq(session), anyString())).thenReturn(mock(ComponentDto.class)); - when(issueService.getByKeyForUpdate(session, "ABCD")).thenReturn(issue); - - assertThat(actionService.listAvailableActions("ABCD")).isEmpty(); - } - - @Test - public void get_project_settings() { - Component project = mock(Component.class); - when(project.key()).thenReturn("struts"); - - // Global property - settings.appendProperty("sonar.core.version", "3.6"); - - // Project property - List projectProperties = newArrayList(new PropertyDto().setKey("sonar.jira.project.key").setValue("STRUTS")); - when(propertiesDao.selectProjectProperties("struts")).thenReturn(projectProperties); - - Settings result = actionService.getProjectSettings(project); - assertThat(result).isNotNull(); - assertThat(result.hasKey("sonar.core.version")).isTrue(); - assertThat(result.hasKey("sonar.jira.project.key")).isTrue(); - } - - @Test - public void list_all_actions() { - actions.add("link-to-jira").setConditions(new AlwaysMatch()); - assertThat(actionService.listAllActions()).hasSize(1); - } - - public class AlwaysMatch implements Condition { - @Override - public boolean matches(Issue issue) { - return true; - } - } - - public class NeverMatch implements Condition { - @Override - public boolean matches(Issue issue) { - return false; - } - } - - public class TweetFunction implements Function { - @Override - public void execute(Context context) { - context.addComment("New tweet on issue " + context.issue().key()); - context.setAttribute("tweet", "tweet sent"); - } - } -} diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/InternalRubyIssueServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/InternalRubyIssueServiceTest.java index bde40d2a12a..51022792640 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/InternalRubyIssueServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/InternalRubyIssueServiceTest.java @@ -158,16 +158,6 @@ public class InternalRubyIssueServiceTest { assertThat(service.listResolutions()).isEqualTo(Issue.RESOLUTIONS); } - @Test - public void list_plugin_actions() { - Action action = mock(Action.class); - when(action.key()).thenReturn("link-to-jira"); - - when(actionService.listAllActions()).thenReturn(newArrayList(action)); - - assertThat(service.listPluginActions()).containsOnly("link-to-jira"); - } - @Test public void find_comments_by_issue_key() { service.findComments("ABCD"); diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceMediumTest.java index 96bb512ae24..2834e980860 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceMediumTest.java @@ -114,7 +114,7 @@ public class IssueCommentServiceMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - service.addComment(issue.getKey(), "my comment", userSessionRule); + service.addComment(issue.getKey(), "my comment"); List comments = service.findComments(issue.getKey()); assertThat(comments).hasSize(1); @@ -131,7 +131,7 @@ public class IssueCommentServiceMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - service.addComment(issue.getKey(), "my comment", userSessionRule); + service.addComment(issue.getKey(), "my comment"); List comments = service.findComments(issue.getKey()); assertThat(comments).hasSize(1); diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java index 45881b463cf..daa60c94211 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueCommentServiceTest.java @@ -88,7 +88,7 @@ public class IssueCommentServiceTest { when(dbClient.openSession(false)).thenReturn(session); when(dbClient.issueChangeDao()).thenReturn(changeDao); - issueCommentService = new IssueCommentService(dbClient, issueService, updater); + issueCommentService = new IssueCommentService(dbClient, issueService, updater, userSessionRule); } @Test @@ -109,7 +109,7 @@ public class IssueCommentServiceTest { when(issueService.getByKeyForUpdate(session, "ABCD")).thenReturn(issueDto); when(issueCommentService.findComments(session, "ABCD")).thenReturn(newArrayList(new DefaultIssueComment())); - issueCommentService.addComment("ABCD", "my comment", userSessionRule); + issueCommentService.addComment("ABCD", "my comment"); verify(updater).addComment(eq(issueDto.toDefaultIssue()), eq("my comment"), any(IssueChangeContext.class)); verify(issueService).saveIssue(eq(session), eq(issueDto.toDefaultIssue()), any(IssueChangeContext.class), eq("my comment")); @@ -120,7 +120,7 @@ public class IssueCommentServiceTest { throwable.expect(UnauthorizedException.class); userSessionRule.anonymous(); - issueCommentService.addComment("myIssue", "my comment", userSessionRule); + issueCommentService.addComment("myIssue", "my comment"); verify(updater, never()).addComment(any(DefaultIssue.class), anyString(), any(IssueChangeContext.class)); verifyZeroInteractions(issueService); @@ -130,7 +130,7 @@ public class IssueCommentServiceTest { public void should_prevent_adding_empty_comment() { throwable.expect(BadRequestException.class); - issueCommentService.addComment("myIssue", " ", userSessionRule); + issueCommentService.addComment("myIssue", " "); verify(updater, never()).addComment(any(DefaultIssue.class), anyString(), any(IssueChangeContext.class)); verifyZeroInteractions(issueService); @@ -140,7 +140,7 @@ public class IssueCommentServiceTest { public void should_prevent_adding_null_comment() { throwable.expect(BadRequestException.class); - issueCommentService.addComment("myIssue", null, userSessionRule); + issueCommentService.addComment("myIssue", null); verify(updater, never()).addComment(any(DefaultIssue.class), anyString(), any(IssueChangeContext.class)); verifyZeroInteractions(issueService); @@ -154,7 +154,7 @@ public class IssueCommentServiceTest { when(issueCommentService.findComments(session, "ABCD")).thenReturn(Collections.emptyList()); try { - issueCommentService.addComment("ABCD", "my comment", userSessionRule); + issueCommentService.addComment("ABCD", "my comment"); fail(); } catch (Exception e) { assertThat(e).isInstanceOf(BadRequestException.class).hasMessage("Fail to add a comment on issue ABCD"); @@ -165,7 +165,7 @@ public class IssueCommentServiceTest { public void should_delete_comment() { when(changeDao.selectCommentByKey("ABCD")).thenReturn(new DefaultIssueComment().setUserLogin("admin").setIssueKey("EFGH")); - issueCommentService.deleteComment("ABCD", userSessionRule); + issueCommentService.deleteComment("ABCD"); verify(changeDao).delete("ABCD"); verify(issueService).getByKey("EFGH"); @@ -177,7 +177,7 @@ public class IssueCommentServiceTest { when(changeDao.selectCommentByKey("ABCD")).thenReturn(null); - issueCommentService.deleteComment("ABCD", userSessionRule); + issueCommentService.deleteComment("ABCD"); verify(changeDao, never()).delete(anyString()); } @@ -188,7 +188,7 @@ public class IssueCommentServiceTest { when(changeDao.selectCommentByKey("ABCD")).thenReturn(new DefaultIssueComment().setUserLogin("julien")); - issueCommentService.deleteComment("ABCD", userSessionRule); + issueCommentService.deleteComment("ABCD"); verify(changeDao, never()).delete(anyString()); } @@ -197,7 +197,7 @@ public class IssueCommentServiceTest { public void should_update_comment() { when(changeDao.selectCommentByKey("ABCD")).thenReturn(new DefaultIssueComment().setIssueKey("EFGH").setUserLogin("admin")); - issueCommentService.editComment("ABCD", "updated comment", userSessionRule); + issueCommentService.editComment("ABCD", "updated comment"); verify(changeDao).update(any(IssueChangeDto.class)); verify(issueService).getByKey("EFGH"); @@ -209,7 +209,7 @@ public class IssueCommentServiceTest { when(changeDao.selectCommentByKey("ABCD")).thenReturn(null); - issueCommentService.editComment("ABCD", "updated comment", userSessionRule); + issueCommentService.editComment("ABCD", "updated comment"); verify(changeDao, never()).update(any(IssueChangeDto.class)); } @@ -218,7 +218,7 @@ public class IssueCommentServiceTest { public void should_prevent_updating_empty_comment() { throwable.expect(BadRequestException.class); - issueCommentService.editComment("ABCD", "", userSessionRule); + issueCommentService.editComment("ABCD", ""); verify(changeDao, never()).update(any(IssueChangeDto.class)); } @@ -227,7 +227,7 @@ public class IssueCommentServiceTest { public void should_prevent_updating_null_comment() { throwable.expect(BadRequestException.class); - issueCommentService.editComment("ABCD", null, userSessionRule); + issueCommentService.editComment("ABCD", null); verify(changeDao, never()).update(any(IssueChangeDto.class)); } @@ -238,7 +238,7 @@ public class IssueCommentServiceTest { when(changeDao.selectCommentByKey("ABCD")).thenReturn(new DefaultIssueComment().setUserLogin("julien")); - issueCommentService.editComment("ABCD", "updated comment", userSessionRule); + issueCommentService.editComment("ABCD", "updated comment"); verify(changeDao, never()).update(any(IssueChangeDto.class)); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java index 7e6004f5be6..82d29ebb5a8 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/IssueServiceMediumTest.java @@ -59,6 +59,7 @@ import org.sonar.server.exceptions.ForbiddenException; import org.sonar.server.exceptions.NotFoundException; import org.sonar.server.issue.index.IssueDoc; import org.sonar.server.issue.index.IssueIndex; +import org.sonar.server.issue.index.IssueIndexDefinition; import org.sonar.server.issue.index.IssueIndexer; import org.sonar.server.permission.PermissionService; import org.sonar.server.permission.PermissionChange; @@ -478,7 +479,7 @@ public class IssueServiceMediumTest { ComponentDto file = newFile(project); saveIssue(IssueTesting.newDto(rule, file, project)); - List result = service.search(IssueQuery.builder(userSessionRule).build(), new SearchOptions()).getDocs(); + List result = service.search(IssueQuery.builder(userSessionRule).build(), new SearchOptions().addFields(IssueIndexDefinition.FIELD_ISSUE_KEY)).getDocs(); assertThat(result).hasSize(1); } diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueActionsWriterTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueActionsWriterTest.java index d80a5470154..7e9eb3d2d57 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueActionsWriterTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/IssueActionsWriterTest.java @@ -28,11 +28,10 @@ import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.sonar.api.issue.Issue; -import org.sonar.api.issue.action.Action; -import org.sonar.core.issue.DefaultIssue; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.text.JsonWriter; import org.sonar.api.web.UserRole; +import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.workflow.Transition; import org.sonar.server.issue.ActionService; import org.sonar.server.issue.IssueService; @@ -41,7 +40,6 @@ import org.sonar.test.JsonAssert; import static com.google.common.collect.Lists.newArrayList; import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) @@ -81,26 +79,6 @@ public class IssueActionsWriterTest { "]}"); } - @Test - public void write_plugin_actions() { - Issue issue = new DefaultIssue() - .setKey("ABCD") - .setComponentKey("sample:src/main/xoo/sample/Sample.xoo") - .setProjectKey("sample") - .setRuleKey(RuleKey.of("squid", "AvoidCycle")); - - userSessionRule.login("john"); - Action action = mock(Action.class); - when(action.key()).thenReturn("link-to-jira"); - when(actionService.listAvailableActions(eq(issue))).thenReturn(newArrayList(action)); - - testActions(issue, - "{\"actions\": " + - "[" + - "\"comment\", \"assign\", \"set_tags\", \"assign_to_me\", \"plan\", \"link-to-jira\"\n" + - "]}"); - } - @Test public void write_only_comment_action() { Issue issue = new DefaultIssue() diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java index f43c95315dd..c14fe737f41 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionComponentsMediumTest.java @@ -43,8 +43,8 @@ import org.sonar.server.component.ComponentTesting; import org.sonar.server.issue.IssueTesting; import org.sonar.server.issue.filter.IssueFilterParameters; import org.sonar.server.issue.index.IssueIndexer; -import org.sonar.server.permission.PermissionService; import org.sonar.server.permission.PermissionChange; +import org.sonar.server.permission.PermissionService; import org.sonar.server.rule.db.RuleDao; import org.sonar.server.tester.ServerTester; import org.sonar.server.tester.UserSessionRule; @@ -83,9 +83,9 @@ public class SearchActionComponentsMediumTest { @Test public void issues_on_different_projects() throws Exception { RuleDto rule = newRule(); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(rule, file, project) .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2") .setStatus("OPEN").setResolution("OPEN") @@ -94,9 +94,9 @@ public class SearchActionComponentsMediumTest { .setIssueUpdateDate(DateUtils.parseDateTime("2017-12-04T00:00:00+0100")); db.issueDao().insert(session, issue); - ComponentDto project2 = insertComponent(ComponentTesting.newProjectDto("DBCA").setKey("MyProject2")); + ComponentDto project2 = insertComponent(ComponentTesting.newProjectDto("P2").setKey("MyProject2")); setDefaultProjectPermission(project2); - ComponentDto file2 = insertComponent(ComponentTesting.newFileDto(project2, "EDCB").setKey("MyComponent2")); + ComponentDto file2 = insertComponent(ComponentTesting.newFileDto(project2, "F2").setKey("MyComponent2")); IssueDto issue2 = IssueTesting.newDto(rule, file2, project2) .setKee("92fd47d4-b650-4037-80bc-7b112bd4eac2") .setStatus("OPEN").setResolution("OPEN") @@ -107,36 +107,36 @@ public class SearchActionComponentsMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).execute(); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION).execute(); result.assertJson(this.getClass(), "issues_on_different_projects.json"); } @Test public void search_by_project_uuid() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); db.issueDao().insert(session, issue); session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.PROJECT_UUIDS, project.uuid()) .execute() .assertJson(this.getClass(), "search_by_project_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.PROJECT_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, project.uuid()) .execute() .assertJson(this.getClass(), "search_by_project_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); @@ -144,15 +144,15 @@ public class SearchActionComponentsMediumTest { @Test public void project_facet_is_sticky() throws Exception { - ComponentDto project1 = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject1")); - ComponentDto project2 = insertComponent(ComponentTesting.newProjectDto("BCDE").setKey("MyProject2")); - ComponentDto project3 = insertComponent(ComponentTesting.newProjectDto("CDEF").setKey("MyProject3")); + ComponentDto project1 = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject1")); + ComponentDto project2 = insertComponent(ComponentTesting.newProjectDto("P2").setKey("MyProject2")); + ComponentDto project3 = insertComponent(ComponentTesting.newProjectDto("P3").setKey("MyProject3")); setDefaultProjectPermission(project1); setDefaultProjectPermission(project2); setDefaultProjectPermission(project3); - ComponentDto file1 = insertComponent(ComponentTesting.newFileDto(project1, "FEDC").setKey("MyComponent1")); - ComponentDto file2 = insertComponent(ComponentTesting.newFileDto(project2, "EDCB").setKey("MyComponent2")); - ComponentDto file3 = insertComponent(ComponentTesting.newFileDto(project3, "DCBA").setKey("MyComponent3")); + ComponentDto file1 = insertComponent(ComponentTesting.newFileDto(project1, "F1").setKey("MyComponent1")); + ComponentDto file2 = insertComponent(ComponentTesting.newFileDto(project2, "F2").setKey("MyComponent2")); + ComponentDto file3 = insertComponent(ComponentTesting.newFileDto(project3, "F3").setKey("MyComponent3")); RuleDto rule = newRule(); IssueDto issue1 = IssueTesting.newDto(rule, file1, project1).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); IssueDto issue2 = IssueTesting.newDto(rule, file2, project2).setKee("2bd4eac2-b650-4037-80bc-7b1182fd47d4"); @@ -161,7 +161,7 @@ public class SearchActionComponentsMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.PROJECT_UUIDS, project1.uuid()) .setParam(WebService.Param.FACETS, "projectUuids") .execute() @@ -170,30 +170,30 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_file_uuid() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); db.issueDao().insert(session, issue); session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.FILE_UUIDS, file.uuid()) .execute() .assertJson(this.getClass(), "search_by_file_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.FILE_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, file.uuid()) .execute() .assertJson(this.getClass(), "search_by_file_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); @@ -201,10 +201,10 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_file_key() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); - ComponentDto unitTest = insertComponent(ComponentTesting.newFileDto(project, "CDEF").setQualifier(Qualifiers.UNIT_TEST_FILE).setKey("MyComponentTest")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); + ComponentDto unitTest = insertComponent(ComponentTesting.newFileDto(project, "F2").setQualifier(Qualifiers.UNIT_TEST_FILE).setKey("MyComponentTest")); RuleDto rule = newRule(); IssueDto issueOnFile = IssueTesting.newDto(rule, file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); IssueDto issueOnTest = IssueTesting.newDto(rule, unitTest, project).setKee("2bd4eac2-b650-4037-80bc-7b1182fd47d4"); @@ -212,12 +212,12 @@ public class SearchActionComponentsMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENTS, file.key()) .execute() .assertJson(this.getClass(), "search_by_file_key.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENTS, unitTest.key()) .execute() .assertJson(this.getClass(), "search_by_test_key.json"); @@ -226,11 +226,11 @@ public class SearchActionComponentsMediumTest { @Test public void display_file_facet() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file1 = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent1")); - ComponentDto file2 = insertComponent(ComponentTesting.newFileDto(project, "CDEF").setKey("MyComponent2")); - ComponentDto file3 = insertComponent(ComponentTesting.newFileDto(project, "DEFA").setKey("MyComponent3")); + ComponentDto file1 = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent1")); + ComponentDto file2 = insertComponent(ComponentTesting.newFileDto(project, "F2").setKey("MyComponent2")); + ComponentDto file3 = insertComponent(ComponentTesting.newFileDto(project, "F3").setKey("MyComponent3")); RuleDto newRule = newRule(); IssueDto issue1 = IssueTesting.newDto(newRule, file1, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); IssueDto issue2 = IssueTesting.newDto(newRule, file2, project).setKee("2bd4eac2-b650-4037-80bc-7b1182fd47d4"); @@ -238,7 +238,7 @@ public class SearchActionComponentsMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, project.uuid()) .setParam(IssueFilterParameters.FILE_UUIDS, file1.uuid() + "," + file3.uuid()) .setParam(WebService.Param.FACETS, "fileUuids") @@ -248,31 +248,31 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_directory_path() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto directory = insertComponent(ComponentTesting.newDirectory(project, "src/main/java/dir")); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent").setPath(directory.path() + "/MyComponent.java")); + ComponentDto directory = insertComponent(ComponentTesting.newDirectory(project, "D1", "src/main/java/dir")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent").setPath(directory.path() + "/MyComponent.java")); IssueDto issue = IssueTesting.newDto(newRule(), file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); db.issueDao().insert(session, issue); session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, directory.uuid()) .execute() .assertJson(this.getClass(), "search_by_file_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java/dir") .execute() .assertJson(this.getClass(), "search_by_file_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java") .execute() .assertJson(this.getClass(), "no_issue.json"); @@ -280,14 +280,14 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_directory_path_in_different_modules() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto module1 = insertComponent(ComponentTesting.newModuleDto(project).setKey("module1")); - ComponentDto module2 = insertComponent(ComponentTesting.newModuleDto(project).setKey("module2")); - ComponentDto directory1 = insertComponent(ComponentTesting.newDirectory(module1, "src/main/java/dir")); - ComponentDto directory2 = insertComponent(ComponentTesting.newDirectory(module2, "src/main/java/dir")); - ComponentDto file1 = insertComponent(ComponentTesting.newFileDto(module1, "BCDE").setKey("module1:MyComponent").setPath(directory1.path() + "/MyComponent.java")); - insertComponent(ComponentTesting.newFileDto(module2, "CDEF").setKey("module2:MyComponent").setPath(directory2.path() + "/MyComponent.java")); + ComponentDto module1 = insertComponent(ComponentTesting.newModuleDto("M1", project).setKey("module1")); + ComponentDto module2 = insertComponent(ComponentTesting.newModuleDto("M2", project).setKey("module2")); + ComponentDto directory1 = insertComponent(ComponentTesting.newDirectory(module1, "D1", "src/main/java/dir")); + ComponentDto directory2 = insertComponent(ComponentTesting.newDirectory(module2, "D2", "src/main/java/dir")); + ComponentDto file1 = insertComponent(ComponentTesting.newFileDto(module1, "F1").setKey("module1:MyComponent").setPath(directory1.path() + "/MyComponent.java")); + insertComponent(ComponentTesting.newFileDto(module2, "F2").setKey("module2:MyComponent").setPath(directory2.path() + "/MyComponent.java")); RuleDto rule = newRule(); IssueDto issue1 = IssueTesting.newDto(rule, file1, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); db.issueDao().insert(session, issue1); @@ -295,34 +295,34 @@ public class SearchActionComponentsMediumTest { tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, directory1.uuid()) .execute() .assertJson(this.getClass(), "search_by_directory_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, directory2.uuid()) .execute() .assertJson(this.getClass(), "no_issue.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.MODULE_UUIDS, module1.uuid()) .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java/dir") .execute() .assertJson(this.getClass(), "search_by_directory_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.MODULE_UUIDS, module2.uuid()) .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java/dir") .execute() .assertJson(this.getClass(), "no_issue.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java/dir") .execute() .assertJson(this.getClass(), "search_by_directory_uuid.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.DIRECTORIES, "src/main/java") .execute() .assertJson(this.getClass(), "no_issue.json"); @@ -330,14 +330,14 @@ public class SearchActionComponentsMediumTest { @Test public void display_module_facet() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto module = insertComponent(ComponentTesting.newModuleDto("BCDE", project).setKey("MyModule")); - ComponentDto subModule1 = insertComponent(ComponentTesting.newModuleDto("CDEF", module).setKey("MySubModule1")); - ComponentDto subModule2 = insertComponent(ComponentTesting.newModuleDto("DEFA", module).setKey("MySubModule2")); - ComponentDto subModule3 = insertComponent(ComponentTesting.newModuleDto("EFAB", module).setKey("MySubModule3")); - ComponentDto file1 = insertComponent(ComponentTesting.newFileDto(subModule1, "FEDC").setKey("MyComponent1")); - ComponentDto file2 = insertComponent(ComponentTesting.newFileDto(subModule2, "EDCB").setKey("MyComponent2")); + ComponentDto module = insertComponent(ComponentTesting.newModuleDto("M1", project).setKey("MyModule")); + ComponentDto subModule1 = insertComponent(ComponentTesting.newModuleDto("SUBM1", module).setKey("MySubModule1")); + ComponentDto subModule2 = insertComponent(ComponentTesting.newModuleDto("SUBM2", module).setKey("MySubModule2")); + ComponentDto subModule3 = insertComponent(ComponentTesting.newModuleDto("SUBM3", module).setKey("MySubModule3")); + ComponentDto file1 = insertComponent(ComponentTesting.newFileDto(subModule1, "F1").setKey("MyComponent1")); + ComponentDto file2 = insertComponent(ComponentTesting.newFileDto(subModule2, "F2").setKey("MyComponent2")); RuleDto newRule = newRule(); IssueDto issue1 = IssueTesting.newDto(newRule, file1, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); IssueDto issue2 = IssueTesting.newDto(newRule, file2, project).setKee("2bd4eac2-b650-4037-80bc-7b1182fd47d4"); @@ -345,7 +345,7 @@ public class SearchActionComponentsMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, module.uuid()) .setParam(IssueFilterParameters.MODULE_UUIDS, subModule1.uuid() + "," + subModule3.uuid()) .setParam(WebService.Param.FACETS, "moduleUuids") @@ -355,17 +355,17 @@ public class SearchActionComponentsMediumTest { @Test public void display_directory_facet() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto directory = insertComponent(ComponentTesting.newDirectory(project, "src/main/java/dir")); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent").setPath(directory.path() + "/MyComponent.java")); + ComponentDto directory = insertComponent(ComponentTesting.newDirectory(project, "D1", "src/main/java/dir")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent").setPath(directory.path() + "/MyComponent.java")); IssueDto issue = IssueTesting.newDto(newRule(), file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); db.issueDao().insert(session, issue); session.commit(); tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john"); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam("resolved", "false") .setParam(WebService.Param.FACETS, "directories") .execute(); @@ -374,18 +374,18 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_view_uuid() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); insertIssue(IssueTesting.newDto(newRule(), file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2")); - ComponentDto view = insertComponent(ComponentTesting.newProjectDto("CDEF").setQualifier(Qualifiers.VIEW).setKey("MyView")); + ComponentDto view = insertComponent(ComponentTesting.newProjectDto("V1").setQualifier(Qualifiers.VIEW).setKey("MyView")); indexView(view.uuid(), newArrayList(project.uuid())); setAnyoneProjectPermission(view, UserRole.USER); userSessionRule.login("john").addProjectUuidPermissions(UserRole.USER, view.uuid()); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, view.uuid()) .execute() .assertJson(this.getClass(), "search_by_view_uuid.json"); @@ -393,19 +393,19 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_view_uuid_return_only_authorized_view() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); insertIssue(IssueTesting.newDto(newRule(), file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2")); - ComponentDto view = insertComponent(ComponentTesting.newProjectDto("CDEF").setQualifier(Qualifiers.VIEW).setKey("MyView")); + ComponentDto view = insertComponent(ComponentTesting.newProjectDto("V1").setQualifier(Qualifiers.VIEW).setKey("MyView")); indexView(view.uuid(), newArrayList(project.uuid())); setAnyoneProjectPermission(view, UserRole.USER); // User has wrong permission on the view, no issue will be returned userSessionRule.login("john").addProjectUuidPermissions(UserRole.CODEVIEWER, view.uuid()); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, view.uuid()) .execute() .assertJson(this.getClass(), "no_issue.json"); @@ -413,20 +413,20 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_sub_view_uuid() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); insertIssue(IssueTesting.newDto(newRule(), file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2")); - ComponentDto view = insertComponent(ComponentTesting.newProjectDto("CDEF").setQualifier(Qualifiers.VIEW).setKey("MyView")); + ComponentDto view = insertComponent(ComponentTesting.newProjectDto("V1").setQualifier(Qualifiers.VIEW).setKey("MyView")); indexView(view.uuid(), newArrayList(project.uuid())); - ComponentDto subView = insertComponent(ComponentTesting.newProjectDto("DEFG").setQualifier(Qualifiers.SUBVIEW).setKey("MySubView")); + ComponentDto subView = insertComponent(ComponentTesting.newProjectDto("SV1").setQualifier(Qualifiers.SUBVIEW).setKey("MySubView")); indexView(subView.uuid(), newArrayList(project.uuid())); setAnyoneProjectPermission(view, UserRole.USER); userSessionRule.login("john").addComponentUuidPermission(UserRole.USER, view.uuid(), subView.uuid()); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, subView.uuid()) .execute() .assertJson(this.getClass(), "search_by_view_uuid.json"); @@ -434,30 +434,31 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_sub_view_uuid_return_only_authorized_view() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); insertIssue(IssueTesting.newDto(newRule(), file, project).setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2")); - ComponentDto view = insertComponent(ComponentTesting.newProjectDto("CDEF").setQualifier(Qualifiers.VIEW).setKey("MyView")); + ComponentDto view = insertComponent(ComponentTesting.newProjectDto("V1").setQualifier(Qualifiers.VIEW).setKey("MyView")); indexView(view.uuid(), newArrayList(project.uuid())); - ComponentDto subView = insertComponent(ComponentTesting.newProjectDto("DEFG").setQualifier(Qualifiers.SUBVIEW).setKey("MySubView")); + ComponentDto subView = insertComponent(ComponentTesting.newProjectDto("SV1").setQualifier(Qualifiers.SUBVIEW).setKey("MySubView")); indexView(subView.uuid(), newArrayList(project.uuid())); setAnyoneProjectPermission(view, UserRole.USER); // User has wrong permission on the view, no issue will be returned userSessionRule.login("john").addComponentUuidPermission(UserRole.CODEVIEWER, view.uuid(), subView.uuid()); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, subView.uuid()) .execute() .assertJson(this.getClass(), "no_issue.json"); } + @Test public void search_by_author() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); RuleDto newRule = newRule(); IssueDto issue1 = IssueTesting.newDto(newRule, file, project).setAuthorLogin("leia").setKee("2bd4eac2-b650-4037-80bc-7b112bd4eac2"); IssueDto issue2 = IssueTesting.newDto(newRule, file, project).setAuthorLogin("luke@skywalker.name").setKee("82fd47d4-b650-4037-80bc-7b1182fd47d4"); @@ -466,13 +467,13 @@ public class SearchActionComponentsMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.AUTHORS, "leia") .setParam(WebService.Param.FACETS, "authors") .execute() .assertJson(this.getClass(), "search_by_authors.json"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.AUTHORS, "unknown") .execute() .assertJson(this.getClass(), "no_issue.json"); @@ -481,9 +482,9 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_developer() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); ComponentDto developer = insertComponent(ComponentTesting.newDeveloper("Anakin Skywalker")); db.authorDao().insertAuthor("vader", developer.getId()); db.authorDao().insertAuthor("anakin@skywalker.name", developer.getId()); @@ -495,7 +496,7 @@ public class SearchActionComponentsMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, developer.uuid()) .execute() .assertJson(this.getClass(), "search_by_developer.json"); @@ -503,17 +504,17 @@ public class SearchActionComponentsMediumTest { @Test public void search_by_developer_technical_project() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("P1").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "F1").setKey("MyComponent")); - ComponentDto otherProject = insertComponent(ComponentTesting.newProjectDto("XXXX").setKey("OtherProject")); + ComponentDto otherProject = insertComponent(ComponentTesting.newProjectDto("P2").setKey("OtherProject")); setDefaultProjectPermission(otherProject); - ComponentDto otherFile = insertComponent(ComponentTesting.newFileDto(otherProject, "YYYY").setKey("OtherComponent")); + ComponentDto otherFile = insertComponent(ComponentTesting.newFileDto(otherProject, "F2").setKey("OtherComponent")); ComponentDto developer = insertComponent(ComponentTesting.newDeveloper("Anakin Skywalker")); - ComponentDto technicalProject = insertComponent(ComponentTesting.newDevProjectCopy("CDEF", project, developer)); - insertComponent(ComponentTesting.newDevProjectCopy("DEFG", otherProject, developer)); + ComponentDto technicalProject = insertComponent(ComponentTesting.newDevProjectCopy("COPY_P1", project, developer)); + insertComponent(ComponentTesting.newDevProjectCopy("COPY_P2", otherProject, developer)); db.authorDao().insertAuthor("vader", developer.getId()); db.authorDao().insertAuthor("anakin@skywalker.name", developer.getId()); @@ -527,7 +528,7 @@ public class SearchActionComponentsMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam(IssueFilterParameters.COMPONENT_UUIDS, technicalProject.uuid()) .execute(); result diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java index 617f4d675a5..739e7cbdc46 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java @@ -24,8 +24,10 @@ import com.google.common.collect.ImmutableMap; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; +import org.sonar.api.issue.Issue; import org.sonar.api.rule.RuleStatus; import org.sonar.api.security.DefaultGroups; import org.sonar.api.server.ws.WebService; @@ -50,14 +52,15 @@ import org.sonar.server.issue.IssueQuery; import org.sonar.server.issue.IssueTesting; import org.sonar.server.issue.filter.IssueFilterParameters; import org.sonar.server.issue.index.IssueIndexer; -import org.sonar.server.permission.PermissionService; import org.sonar.server.permission.PermissionChange; +import org.sonar.server.permission.PermissionService; import org.sonar.server.rule.db.RuleDao; import org.sonar.server.search.QueryContext; import org.sonar.server.tester.ServerTester; import org.sonar.server.tester.UserSessionRule; import org.sonar.server.ws.WsTester; +import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; public class SearchActionMediumTest { @@ -89,19 +92,19 @@ public class SearchActionMediumTest { public void define_action() { WebService.Controller controller = wsTester.controller("api/issues"); - WebService.Action show = controller.action("search"); + WebService.Action show = controller.action("search2"); assertThat(show).isNotNull(); assertThat(show.handler()).isNotNull(); assertThat(show.since()).isEqualTo("3.6"); assertThat(show.isPost()).isFalse(); assertThat(show.isInternal()).isFalse(); assertThat(show.responseExampleAsString()).isNotEmpty(); - assertThat(show.params()).hasSize(40); + assertThat(show.params()).hasSize(37); } @Test public void empty_search() throws Exception { - WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION); + WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION); WsTester.Result result = request.execute(); assertThat(result).isNotNull(); @@ -109,40 +112,43 @@ public class SearchActionMediumTest { } @Test - public void issue() throws Exception { + public void response_contains_all_fields_except_additional_fields() throws Exception { db.userDao().insert(session, new UserDto().setLogin("simon").setName("Simon").setEmail("simon@email.com")); db.userDao().insert(session, new UserDto().setLogin("fabrice").setName("Fabrice").setEmail("fabrice@email.com")); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project) - .setDebt(10L) - .setStatus("OPEN").setResolution("OPEN") .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2") + .setDebt(10L) + .setMessage("the message") + .setStatus(Issue.STATUS_RESOLVED) + .setResolution(Issue.RESOLUTION_FIXED) .setSeverity("MAJOR") .setAuthorLogin("John") .setAssignee("simon") .setReporter("fabrice") .setActionPlanKey("AP-ABCD") + .setTags(asList("bug", "owasp")) .setIssueCreationDate(DateUtils.parseDateTime("2014-09-04T00:00:00+0100")) .setIssueUpdateDate(DateUtils.parseDateTime("2017-12-04T00:00:00+0100")); db.issueDao().insert(session, issue); session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).execute(); - result.assertJson(this.getClass(), "issue.json"); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION).execute(); + result.assertJson(this.getClass(), "response_contains_all_fields_except_additional_fields.json"); } @Test - public void issue_with_comment() throws Exception { + public void issue_with_comments() throws Exception { db.userDao().insert(session, new UserDto().setLogin("john").setName("John")); db.userDao().insert(session, new UserDto().setLogin("fabrice").setName("Fabrice").setEmail("fabrice@email.com")); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project) .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); db.issueDao().insert(session, issue); @@ -153,20 +159,22 @@ public class SearchActionMediumTest { .setChangeData("*My comment*") .setChangeType(IssueChangeDto.TYPE_COMMENT) .setUserLogin("john") - .setCreatedAt(DateUtils.parseDate("2014-09-09").getTime())); + .setCreatedAt(DateUtils.parseDateTime("2014-09-09T12:00:00+0000").getTime())); tester.get(IssueChangeDao.class).insert(session, new IssueChangeDto().setIssueKey(issue.getKey()) .setKey("COMMENT-ABCE") .setChangeData("Another comment") .setChangeType(IssueChangeDto.TYPE_COMMENT) .setUserLogin("fabrice") - .setCreatedAt(DateUtils.parseDate("2014-09-10").getTime())); + .setCreatedAt(DateUtils.parseDateTime("2014-09-10T12:00:00+0000").getTime())); session.commit(); tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john"); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).execute(); - result.assertJson(this.getClass(), "issue_with_comment.json"); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) + .setParam("additionalFields", "comments,users") + .execute(); + result.assertJson(this.getClass(), "issue_with_comments.json"); } @Test @@ -174,9 +182,9 @@ public class SearchActionMediumTest { db.userDao().insert(session, new UserDto().setLogin("john").setName("John").setEmail("john@email.com")); db.userDao().insert(session, new UserDto().setLogin("fabrice").setName("Fabrice").setEmail("fabrice@email.com")); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project) .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2"); db.issueDao().insert(session, issue); @@ -187,28 +195,28 @@ public class SearchActionMediumTest { .setChangeData("*My comment*") .setChangeType(IssueChangeDto.TYPE_COMMENT) .setUserLogin("john") - .setCreatedAt(DateUtils.parseDate("2014-09-09").getTime())); + .setCreatedAt(DateUtils.parseDateTime("2014-09-09T12:00:00+0000").getTime())); tester.get(IssueChangeDao.class).insert(session, new IssueChangeDto().setIssueKey(issue.getKey()) .setKey("COMMENT-ABCE") .setChangeData("Another comment") .setChangeType(IssueChangeDto.TYPE_COMMENT) .setUserLogin("fabrice") - .setCreatedAt(DateUtils.parseDate("2014-09-10").getTime())); + .setCreatedAt(DateUtils.parseDateTime("2014-09-10T19:10:03+0000").getTime())); session.commit(); tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john"); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).setParam(IssueFilterParameters.HIDE_COMMENTS, "true").execute(); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION).setParam(IssueFilterParameters.HIDE_COMMENTS, "true").execute(); result.assertJson(this.getClass(), "issue_with_comment_hidden.json"); assertThat(result.outputAsString()).doesNotContain("fabrice"); } @Test public void issue_with_action_plan() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); tester.get(ActionPlanDao.class).save(new ActionPlanDto() .setKey("AP-ABCD") @@ -227,15 +235,18 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).execute(); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) + .setParam("additionalFields", "actionPlans") + .execute(); result.assertJson(this.getClass(), "issue_with_action_plan.json"); } + @Ignore("temporarily disabled") @Test public void issue_with_attributes() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project) .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2") .setIssueAttributes(KeyValueFormat.format(ImmutableMap.of("jira-issue-key", "SONAR-1234"))); @@ -243,17 +254,18 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).execute(); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) + .execute(); result.assertJson(this.getClass(), "issue_with_attributes.json"); } @Test - public void issue_with_extra_fields() throws Exception { + public void load_additional_fields() throws Exception { db.userDao().insert(session, new UserDto().setLogin("simon").setName("Simon").setEmail("simon@email.com")); db.userDao().insert(session, new UserDto().setLogin("fabrice").setName("Fabrice").setEmail("fabrice@email.com")); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); tester.get(ActionPlanDao.class).save(new ActionPlanDto() .setKey("AP-ABCD") @@ -273,17 +285,17 @@ public class SearchActionMediumTest { tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john"); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) - .setParam("f", "assignee,reporter,actionPlan,actions,transitions,actionPlanName").execute(); - result.assertJson(this.getClass(), "issue_with_extra_fields.json"); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) + .setParam("additionalFields", "_all").execute(); + result.assertJson(this.getClass(), "load_additional_fields.json"); } @Test - public void issue_linked_on_removed_file() throws Exception { + public void issue_on_removed_file() throws Exception { RuleDto rule = newRule(); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto removedFile = insertComponent(ComponentTesting.newFileDto(project).setUuid("EDCB") + ComponentDto removedFile = insertComponent(ComponentTesting.newFileDto(project).setUuid("REMOVED_FILE_ID") .setEnabled(false) .setKey("RemovedComponent")); @@ -298,30 +310,31 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).execute(); - result.assertJson(this.getClass(), "issue_linked_on_removed_file.json"); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) + .execute(); + result.assertJson(this.getClass(), "issue_on_removed_file.json"); } @Test public void issue_contains_component_id_for_eclipse() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project); db.issueDao().insert(session, issue); session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).execute(); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION).execute(); assertThat(result.outputAsString()).contains("\"componentId\":" + file.getId() + ","); } @Test public void apply_paging_with_one_component() throws Exception { RuleDto rule = newRule(); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); for (int i = 0; i < QueryContext.MAX_LIMIT + 1; i++) { IssueDto issue = IssueTesting.newDto(rule, file, project); tester.get(IssueDao.class).insert(session, issue); @@ -329,13 +342,13 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).setParam(IssueFilterParameters.COMPONENTS, file.getKey()).execute(); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION).setParam(IssueFilterParameters.COMPONENTS, file.getKey()).execute(); result.assertJson(this.getClass(), "apply_paging_with_one_component.json"); } @Test public void components_contains_sub_projects() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("ProjectHavingModule")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("ProjectHavingModule")); setDefaultProjectPermission(project); ComponentDto module = insertComponent(ComponentTesting.newModuleDto(project).setKey("ModuleHavingFile")); ComponentDto file = insertComponent(ComponentTesting.newFileDto(module, "BCDE").setKey("FileLinkedToModule")); @@ -344,15 +357,15 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).execute(); + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION).setParam(Search2Action.ADDITIONAL_FIELDS, "_all").execute(); result.assertJson(this.getClass(), "components_contains_sub_projects.json"); } @Test public void display_facets() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project) .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")) @@ -365,7 +378,7 @@ public class SearchActionMediumTest { tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john"); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam("resolved", "false") .setParam(WebService.Param.FACETS, "statuses,severities,resolutions,projectUuids,rules,fileUuids,assignees,languages,actionPlans") .execute(); @@ -374,9 +387,9 @@ public class SearchActionMediumTest { @Test public void display_facets_in_debt_mode() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project) .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")) @@ -389,7 +402,7 @@ public class SearchActionMediumTest { tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john"); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam("resolved", "false") .setParam(WebService.Param.FACETS, "statuses,severities,resolutions,projectUuids,rules,fileUuids,assignees,languages,actionPlans") .setParam("facetMode", "debt") @@ -399,9 +412,9 @@ public class SearchActionMediumTest { @Test public void display_zero_valued_facets_for_selected_items() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); IssueDto issue = IssueTesting.newDto(newRule(), file, project) .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")) @@ -414,7 +427,7 @@ public class SearchActionMediumTest { tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john"); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam("resolved", "false") .setParam("severities", "MAJOR,MINOR") .setParam("languages", "xoo,polop,palap") @@ -427,9 +440,9 @@ public class SearchActionMediumTest { public void filter_by_assigned_to_me() throws Exception { db.userDao().insert(session, new UserDto().setLogin("john").setName("John").setEmail("john@email.com")); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); RuleDto rule = newRule(); IssueDto issue1 = IssueTesting.newDto(rule, file, project) .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) @@ -459,7 +472,7 @@ public class SearchActionMediumTest { tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam("resolved", "false") .setParam("assignees", "__me__") .setParam(WebService.Param.FACETS, "assignees,assigned_to_me") @@ -471,9 +484,9 @@ public class SearchActionMediumTest { public void filter_by_assigned_to_me_unauthenticated() throws Exception { userSessionRule.login(); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); RuleDto rule = newRule(); IssueDto issue1 = IssueTesting.newDto(rule, file, project) .setStatus("OPEN") @@ -490,7 +503,7 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam("resolved", "false") .setParam("assignees", "__me__") .execute() @@ -501,9 +514,9 @@ public class SearchActionMediumTest { public void assigned_to_me_facet_is_sticky_relative_to_assignees() throws Exception { db.userDao().insert(session, new UserDto().setLogin("alice").setName("Alice").setEmail("alice@email.com")); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyFile")); RuleDto rule = newRule(); IssueDto issue1 = IssueTesting.newDto(rule, file, project) .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) @@ -533,7 +546,7 @@ public class SearchActionMediumTest { tester.get(IssueIndexer.class).indexAll(); userSessionRule.login("john-bob.polop"); - wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam("resolved", "false") .setParam("assignees", "alice") .setParam(WebService.Param.FACETS, "assignees,assigned_to_me") @@ -541,32 +554,12 @@ public class SearchActionMediumTest { .assertJson(this.getClass(), "assigned_to_me_facet_sticky.json"); } - @Test - public void hide_rules() throws Exception { - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); - setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); - IssueDto issue = IssueTesting.newDto(newRule(), file, project) - .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) - .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")) - .setDebt(10L) - .setStatus("OPEN") - .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2") - .setSeverity("MAJOR"); - db.issueDao().insert(session, issue); - session.commit(); - tester.get(IssueIndexer.class).indexAll(); - - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION).setParam(IssueFilterParameters.HIDE_RULES, "true").execute(); - result.assertJson(this.getClass(), "hide_rules.json"); - } - @Test public void sort_by_updated_at() throws Exception { RuleDto rule = newRule(); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); db.issueDao().insert(session, IssueTesting.newDto(rule, file, project) .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac1") .setIssueUpdateDate(DateUtils.parseDateTime("2014-11-02T00:00:00+0100"))); @@ -579,7 +572,7 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION) + WsTester.Result result = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION) .setParam("sort", IssueQuery.SORT_BY_UPDATE_DATE) .setParam("asc", "false") .execute(); @@ -589,9 +582,9 @@ public class SearchActionMediumTest { @Test public void paging() throws Exception { RuleDto rule = newRule(); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); for (int i = 0; i < 12; i++) { IssueDto issue = IssueTesting.newDto(rule, file, project); tester.get(IssueDao.class).insert(session, issue); @@ -599,7 +592,7 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION); + WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION); request.setParam(WebService.Param.PAGE, "2"); request.setParam(WebService.Param.PAGE_SIZE, "9"); @@ -610,9 +603,9 @@ public class SearchActionMediumTest { @Test public void paging_with_page_size_to_minus_one() throws Exception { RuleDto rule = newRule(); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); for (int i = 0; i < 12; i++) { IssueDto issue = IssueTesting.newDto(rule, file, project); tester.get(IssueDao.class).insert(session, issue); @@ -620,7 +613,7 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION); + WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION); request.setParam(WebService.Param.PAGE, "1"); request.setParam(WebService.Param.PAGE_SIZE, "-1"); @@ -631,9 +624,9 @@ public class SearchActionMediumTest { @Test public void deprecated_paging() throws Exception { RuleDto rule = newRule(); - ComponentDto project = insertComponent(ComponentTesting.newProjectDto("ABCD").setKey("MyProject")); + ComponentDto project = insertComponent(ComponentTesting.newProjectDto("PROJECT_ID").setKey("MyProject")); setDefaultProjectPermission(project); - ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "BCDE").setKey("MyComponent")); + ComponentDto file = insertComponent(ComponentTesting.newFileDto(project, "FILE_ID").setKey("MyComponent")); for (int i = 0; i < 12; i++) { IssueDto issue = IssueTesting.newDto(rule, file, project); tester.get(IssueDao.class).insert(session, issue); @@ -641,7 +634,7 @@ public class SearchActionMediumTest { session.commit(); tester.get(IssueIndexer.class).indexAll(); - WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION); + WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION); request.setParam(IssueFilterParameters.PAGE_INDEX, "2"); request.setParam(IssueFilterParameters.PAGE_SIZE, "9"); @@ -651,7 +644,7 @@ public class SearchActionMediumTest { @Test public void default_page_size_is_100() throws Exception { - WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, SearchAction.SEARCH_ACTION); + WsTester.TestRequest request = wsTester.newGetRequest(IssuesWs.API_ENDPOINT, Search2Action.SEARCH_ACTION); WsTester.Result result = request.execute(); result.assertJson(this.getClass(), "default_page_size_is_100.json"); diff --git a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/ListActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/ListActionTest.java index 21578d44051..e11b6aada87 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/rule/ws/ListActionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/rule/ws/ListActionTest.java @@ -55,7 +55,7 @@ public class ListActionTest { dbTester.getSession().commit(); TestResponse response = tester.newRequest() - .setMimeType(MimeTypes.PROTOBUF) + .setMediaType(MimeTypes.PROTOBUF) .execute(); assertThat(response.getMediaType()).isEqualTo(MimeTypes.PROTOBUF); @@ -63,8 +63,8 @@ public class ListActionTest { assertThat(listResponse.getRulesCount()).isEqualTo(2); assertThat(listResponse.getRules(0).getKey()).isEqualTo("S001"); - assertThat(listResponse.getRules(0).hasInternalKey()).isFalse(); - assertThat(listResponse.getRules(0).hasName()).isFalse(); + assertThat(listResponse.getRules(0).getInternalKey()).isEqualTo(""); + assertThat(listResponse.getRules(0).getName()).isEqualTo(""); assertThat(listResponse.getRules(1).getKey()).isEqualTo("S002"); assertThat(listResponse.getRules(1).getInternalKey()).isEqualTo("I002"); assertThat(listResponse.getRules(1).getName()).isEqualTo("Rule Two"); diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java index aa62a432457..3405e132459 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/TestRequest.java @@ -64,7 +64,7 @@ public class TestRequest extends ValidatingRequest { return mimeType; } - public TestRequest setMimeType(String type) { + public TestRequest setMediaType(String type) { checkNotNull(type); this.mimeType = type; return this; diff --git a/server/sonar-server/src/test/java/org/sonar/server/ws/WsUtilsTest.java b/server/sonar-server/src/test/java/org/sonar/server/ws/WsUtilsTest.java new file mode 100644 index 00000000000..0edfbecb6fd --- /dev/null +++ b/server/sonar-server/src/test/java/org/sonar/server/ws/WsUtilsTest.java @@ -0,0 +1,38 @@ +package org.sonar.server.ws; + +import org.junit.Test; +import org.sonar.server.plugins.MimeTypes; +import org.sonarqube.ws.Issues; + +import static org.assertj.core.api.Assertions.assertThat; + +public class WsUtilsTest { + + @Test + public void write_json_by_default() throws Exception { + TestRequest request = new TestRequest(); + DumbResponse response = new DumbResponse(); + + Issues.Issue msg = Issues.Issue.newBuilder().setKey("I1").build(); + WsUtils.writeProtobuf(msg, request, response); + + assertThat(response.stream().mediaType()).isEqualTo(MimeTypes.JSON); + assertThat(response.outputAsString()) + .startsWith("{") + .contains("\"key\":\"I1\"") + .endsWith("}"); + } + + @Test + public void write_protobuf() throws Exception { + TestRequest request = new TestRequest(); + request.setMediaType(MimeTypes.PROTOBUF); + DumbResponse response = new DumbResponse(); + + Issues.Issue msg = Issues.Issue.newBuilder().setKey("I1").build(); + WsUtils.writeProtobuf(msg, request, response); + + assertThat(response.stream().mediaType()).isEqualTo(MimeTypes.PROTOBUF); + assertThat(Issues.Issue.parseFrom(response.getFlushedOutput()).getKey()).isEqualTo("I1"); + } +} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_file_facet.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_file_facet.json index 8f3aca136ca..67be53937cf 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_file_facet.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_file_facet.json @@ -1,37 +1,34 @@ { "total": 1, "p": 1, - "projects": [ - { "key": "MyProject" } - ], - "components": [ - { "key": "MyProject" }, - { "key": "MyComponent1" }, - { "key": "MyComponent2" }, - { "key": "MyComponent3" } - ], "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent1", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1" } ], + "components": [ + { "id": "P1" }, + { "id": "F1" }, + { "id": "F2" }, + { "id": "F3" } + ], "facets": [ { "property": "fileUuids", "values": [ { - "val": "BCDE", + "val": "F1", "count": 1 }, { - "val": "CDEF", + "val": "F2", "count": 1 }, { - "val": "DEFA", + "val": "F3", "count": 0 } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_module_facet.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_module_facet.json index 8b86025ab6f..cfaa3280998 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_module_facet.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_module_facet.json @@ -1,39 +1,34 @@ { - "total": 1, - "p": 1, - "projects": [ - { "key": "MyProject" } - ], - "components": [ - { "key": "MyProject" }, - { "key": "MyModule" }, - { "key": "MySubModule1" }, - { "key": "MySubModule2" }, - { "key": "MySubModule3" }, - { "key": "MyComponent1" } - ], "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent1", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1" } ], + "components": [ + { "id": "P1" }, + { "id": "M1" }, + { "id": "SUBM1" }, + { "id": "SUBM2" }, + { "id": "SUBM3" }, + { "id": "F1" } + ], "facets": [ { "property": "moduleUuids", "values": [ { - "val": "CDEF", + "val": "SUBM1", "count": 1 }, { - "val": "DEFA", + "val": "SUBM2", "count": 1 }, { - "val": "EFAB", + "val": "SUBM3", "count": 0 } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_non_sticky_project_facet.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_non_sticky_project_facet.json index 78cb166c195..e9152aa560a 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_non_sticky_project_facet.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_non_sticky_project_facet.json @@ -1,13 +1,6 @@ { "total": 1, "p": 1, - "projects": [ - { "key": "MyProject1" } - ], - "components": [ - { "key": "MyProject1" }, - { "key": "MyComponent1" } - ], "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", @@ -16,6 +9,10 @@ "rule": "xoo:x1" } ], + "components": [ + { "key": "MyProject1" }, + { "key": "MyComponent1" } + ], "facets": [ { "property": "projectUuids", diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_sticky_project_facet.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_sticky_project_facet.json index 99d1729a9c8..cd421f8cdc8 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_sticky_project_facet.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/display_sticky_project_facet.json @@ -1,39 +1,32 @@ { - "total": 1, - "p": 1, - "projects": [ - { "key": "MyProject1" }, - { "key": "MyProject2" }, - { "key": "MyProject3" } - ], - "components": [ - { "key": "MyProject1" }, - { "key": "MyProject2" }, - { "key": "MyProject3" }, - { "key": "MyComponent1" } - ], "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent1", - "project": "MyProject1", + "component": "F1", + "project": "P1", "rule": "xoo:x1" } ], + "components": [ + { "id": "P1" }, + { "id": "P2" }, + { "id": "P3" }, + { "id": "F1" } + ], "facets": [ { "property": "projectUuids", "values": [ { - "val": "ABCD", + "val": "P1", "count": 1 }, { - "val": "BCDE", + "val": "P2", "count": 1 }, { - "val": "CDEF", + "val": "P3", "count": 1 } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/issues_on_different_projects.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/issues_on_different_projects.json index 675106c1fec..4bebe01e405 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/issues_on_different_projects.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/issues_on_different_projects.json @@ -2,8 +2,8 @@ "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1", "status": "OPEN", "resolution": "OPEN", @@ -12,8 +12,8 @@ }, { "key": "92fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent2", - "project": "MyProject2", + "component": "F2", + "project": "P2", "rule": "xoo:x1", "status": "OPEN", "resolution": "OPEN", @@ -23,34 +23,24 @@ ], "components": [ { - "uuid": "BCDE", + "id": "F1", "key": "MyComponent", "enabled" : true }, { - "uuid": "ABCD", + "id": "P1", "key": "MyProject", "enabled" : true }, { - "uuid": "EDCB", + "id": "F2", "key": "MyComponent2", "enabled" : true }, { - "uuid": "DBCA", + "id": "P2", "key": "MyProject2", "enabled" : true } - ], - "projects": [ - { - "uuid": "ABCD", - "key": "MyProject" - }, - { - "uuid": "DBCA", - "key": "MyProject2" - } ] } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_authors.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_authors.json index 3be7b368db8..f571e170ee7 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_authors.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_authors.json @@ -4,8 +4,8 @@ "issues": [ { "key": "2bd4eac2-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1", "author": "leia" } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_developer.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_developer.json index 0f0bc742c5e..b47c430630b 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_developer.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_developer.json @@ -1,18 +1,16 @@ { - "total": 2, - "p": 1, "issues": [ { "key": "2bd4eac2-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1", "author": "vader" }, { "key": "82fd47d4-b650-4037-80bc-7b1182fd47d4", - "component": "MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1", "author": "anakin@skywalker.name" } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_directory_uuid.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_directory_uuid.json index d74af4ff53b..d7c4e98d8cc 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_directory_uuid.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_directory_uuid.json @@ -1,11 +1,9 @@ { - "total": 1, - "p": 1, "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "module1:MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1" } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_file_key.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_file_key.json index f13cd2e997f..d7c4e98d8cc 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_file_key.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_file_key.json @@ -1,11 +1,9 @@ { - "total": 1, - "p": 1, "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1" } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_file_uuid.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_file_uuid.json index f13cd2e997f..d7c4e98d8cc 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_file_uuid.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_file_uuid.json @@ -1,11 +1,9 @@ { - "total": 1, - "p": 1, "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1" } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_project_uuid.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_project_uuid.json index 5df35493a30..d7c4e98d8cc 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_project_uuid.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_project_uuid.json @@ -1,12 +1,9 @@ { - "total": 1, - "p": 1, - "ps": 100, "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1" } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_test_key.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_test_key.json index 76968cec9a8..56b3be12a0b 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_test_key.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_test_key.json @@ -1,11 +1,9 @@ { - "total": 1, - "p": 1, "issues": [ { "key": "2bd4eac2-b650-4037-80bc-7b1182fd47d4", - "component": "MyComponentTest", - "project": "MyProject", + "component": "F2", + "project": "P1", "rule": "xoo:x1" } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_view_uuid.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_view_uuid.json index 5df35493a30..d7c4e98d8cc 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_view_uuid.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionComponentsMediumTest/search_by_view_uuid.json @@ -1,12 +1,9 @@ { - "total": 1, - "p": 1, - "ps": 100, "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "F1", + "project": "P1", "rule": "xoo:x1" } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/assigned_to_me_facet_sticky.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/assigned_to_me_facet_sticky.json index 6d5b660ddc3..48cdd00481b 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/assigned_to_me_facet_sticky.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/assigned_to_me_facet_sticky.json @@ -2,8 +2,7 @@ "issues": [ { "key": "7b112bd4-b650-4037-80bc-82fd47d4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", "rule": "xoo:x1", "status": "OPEN", "severity": "MAJOR", diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/components_contains_sub_projects.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/components_contains_sub_projects.json index e9d286cc09a..5ff9016c910 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/components_contains_sub_projects.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/components_contains_sub_projects.json @@ -9,10 +9,5 @@ { "key": "ProjectHavingModule" } - ], - "projects": [ - { - "key": "ProjectHavingModule" - } ] } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/default_page_size_is_100.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/default_page_size_is_100.json index a4dc9a53ed5..55e445b3297 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/default_page_size_is_100.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/default_page_size_is_100.json @@ -6,7 +6,6 @@ "pageIndex": 1, "pageSize": 100, "total": 0, - "fTotal": "0", "pages": 0 } } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/deprecated_paging.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/deprecated_paging.json index 1ecb54f2622..35ed37d52a4 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/deprecated_paging.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/deprecated_paging.json @@ -3,7 +3,6 @@ "pageIndex": 2, "pageSize": 9, "total": 12, - "fTotal": "12", "pages": 2 } } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets.json index 66a0626b7e8..5fcdf33eca1 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets.json @@ -2,8 +2,7 @@ "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", "rule": "xoo:x1", "status": "OPEN", "severity": "MAJOR", @@ -90,7 +89,7 @@ "property": "projectUuids", "values": [ { - "val": "ABCD", + "val": "PROJECT_ID", "count": 1 } ] @@ -108,7 +107,7 @@ "property": "fileUuids", "values": [ { - "val": "BCDE", + "val": "FILE_ID", "count": 1 } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets_debt.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets_debt.json index 1917038f24e..d521c725924 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets_debt.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_facets_debt.json @@ -3,8 +3,8 @@ "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", + "project": "PROJECT_ID", "rule": "xoo:x1", "status": "OPEN", "severity": "MAJOR", @@ -40,6 +40,10 @@ { "property": "severities", "values": [ + { + "val": "MAJOR", + "count": 10 + }, { "val": "INFO", "count": 0 @@ -48,10 +52,6 @@ "val": "MINOR", "count": 0 }, - { - "val": "MAJOR", - "count": 10 - }, { "val": "CRITICAL", "count": 0 @@ -91,7 +91,7 @@ "property": "projectUuids", "values": [ { - "val": "ABCD", + "val": "PROJECT_ID", "count": 10 } ] @@ -109,7 +109,7 @@ "property": "fileUuids", "values": [ { - "val": "BCDE", + "val": "FILE_ID", "count": 10 } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_zero_facets.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_zero_facets.json index 2102d260f27..cdd12a3d9f0 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_zero_facets.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/display_zero_facets.json @@ -2,8 +2,8 @@ "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", + "project": "PROJECT_ID", "rule": "xoo:x1", "status": "OPEN", "severity": "MAJOR", @@ -90,7 +90,7 @@ "property": "projectUuids", "values": [ { - "val": "ABCD", + "val": "PROJECT_ID", "count": 1 } ] @@ -108,7 +108,7 @@ "property": "fileUuids", "values": [ { - "val": "BCDE", + "val": "FILE_ID", "count": 1 } ] diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/empty_result.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/empty_result.json index 787b0028a29..0448735ef0c 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/empty_result.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/empty_result.json @@ -6,10 +6,7 @@ "pageIndex": 1, "pageSize": 100, "total": 0, - "fTotal": "0", "pages": 0 }, - "issues": [], - "components": [], - "projects": [] + "issues": [] } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/filter_by_assigned_to_me.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/filter_by_assigned_to_me.json index 2f5a071fcfa..6e01c4f53b9 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/filter_by_assigned_to_me.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/filter_by_assigned_to_me.json @@ -2,8 +2,8 @@ "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", + "project": "PROJECT_ID", "rule": "xoo:x1", "status": "OPEN", "severity": "MAJOR", diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/hide_rules.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/hide_rules.json index 0d6efbb4a8b..18d24788450 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/hide_rules.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/hide_rules.json @@ -2,8 +2,8 @@ "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", + "project": "PROJECT_ID", "rule": "xoo:x1", "status": "OPEN", "severity": "MAJOR", diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue.json deleted file mode 100644 index c5240ceca80..00000000000 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "total": 1, - "p": 1, - "ps": 100, - "issues": [ - { - "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", - "rule": "xoo:x1", - "status": "OPEN", - "resolution": "OPEN", - "severity": "MAJOR", - "debt": "10min", - "author": "John", - "assignee": "simon", - "reporter": "fabrice", - "actionPlan": "AP-ABCD", - "updateDate": "2017-12-04T00:00:00+0100" - } - ], - "rules": [ - { - "key": "xoo:x1", - "name": "Rule name", - "desc": "Rule desc", - "status": "READY" - } - ], - "components": [ - { - "uuid": "BCDE", - "key": "MyComponent", - "enabled" : true - }, - { - "uuid": "ABCD", - "key": "MyProject", - "enabled" : true - } - ], - "projects": [ - { - "uuid": "ABCD", - "key": "MyProject" - } - ], - "users": [ - { - "login": "simon", - "name": "Simon", - "active": true, - "email": "simon@email.com" - }, - { - "login": "fabrice", - "name": "Fabrice", - "active": true, - "email": "fabrice@email.com" - } - ] -} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_linked_on_removed_file.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_on_removed_file.json similarity index 75% rename from server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_linked_on_removed_file.json rename to server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_on_removed_file.json index 6906c6d1081..4fd658fe4c2 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_linked_on_removed_file.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_on_removed_file.json @@ -2,8 +2,8 @@ "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "RemovedComponent", - "project": "MyProject", + "component": "REMOVED_FILE_ID", + "project": "PROJECT_ID", "rule": "xoo:x1", "status": "OPEN", "resolution": "OPEN", @@ -13,12 +13,12 @@ ], "components": [ { - "uuid": "EDCB", + "id": "REMOVED_FILE_ID", "key": "RemovedComponent", "enabled" : false }, { - "uuid": "ABCD", + "id": "PROJECT_ID", "key": "MyProject", "enabled" : true } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_action_plan.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_action_plan.json index 67836dba67f..bf74bc21d89 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_action_plan.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_action_plan.json @@ -10,11 +10,8 @@ "key": "AP-ABCD", "name": "1.0", "status": "OPEN", - "project": "MyProject", - "userLogin": "simon", "deadLine": "2014-01-24T19:10:03+0000", - "createdAt": "2014-01-22T19:10:03+0000", - "updatedAt": "2014-01-23T19:10:03+0000" + "project": "PROJECT_ID" } ] } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_comment.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_comment.json deleted file mode 100644 index 22f83f1021c..00000000000 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_comment.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "issues": [ - { - "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "comments": [ - { - "key": "COMMENT-ABCD", - "login": "john", - "userName": "John", - "htmlText": "My comment", - "markdown": "*My comment*", - "updatable": true - }, - { - "key": "COMMENT-ABCE", - "login": "fabrice", - "userName": "Fabrice", - "email": "fabrice@email.com", - "htmlText": "Another comment", - "markdown": "Another comment", - "updatable": false - } - ] - } - ] -} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_comments.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_comments.json new file mode 100644 index 00000000000..09515d61e50 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_comments.json @@ -0,0 +1,41 @@ +{ + "issues": [ + { + "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", + "rule": "xoo:x1", + "severity": "MAJOR", + "comments": [ + { + "key": "COMMENT-ABCD", + "login": "john", + "htmlText": "\u003cem\u003eMy comment\u003c/em\u003e", + "markdown": "*My comment*", + "updatable": true, + "createdAt": "2014-09-09T12:00:00+0000" + }, + { + "key": "COMMENT-ABCE", + "login": "fabrice", + "htmlText": "Another comment", + "markdown": "Another comment", + "updatable": false, + "createdAt": "2014-09-10T12:00:00+0000" + } + ] + } + ], + "users": [ + { + "login": "fabrice", + "name": "Fabrice", + "email": "fabrice@email.com", + "active": true + }, + { + "login": "john", + "name": "John", + "email": "", + "active": true + } + ] +} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_snippet.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_snippet.json deleted file mode 100644 index b78cbecd441..00000000000 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_snippet.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "maxResultsReached": false, - "total": 1, - "p": 1, - "ps": 100, - "issues": [ - { - "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", - "line": 3, - "rule": "xoo:x1", - "status": "OPEN", - "resolution": "OPEN", - "severity": "MAJOR", - "debt": "10min", - "author": "John", - "assignee": "simon", - "reporter": "fabrice", - "updateDate": "2014-12-04T00:00:00+0100" - } - ], - "rules": [ - { - "key": "xoo:x1", - "name": "Rule name", - "desc": "Rule desc", - "status": "READY" - } - ], - "components": [ - { - "key": "MyComponent" - }, - { - "key": "MyProject" - } - ], - "projects": [ - { - "key": "MyProject" - } - ], - "users": [ - { - "login": "simon", - "name": "Simon", - "active": true, - "email": "simon@email.com" - }, - { - "login": "fabrice", - "name": "Fabrice", - "active": true, - "email": "fabrice@email.com" - } - ] -} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_extra_fields.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/load_additional_fields.json similarity index 75% rename from server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_extra_fields.json rename to server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/load_additional_fields.json index ecd938c0876..6aa8270c21f 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_with_extra_fields.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/load_additional_fields.json @@ -5,7 +5,6 @@ "assignee": "simon", "reporter": "fabrice", "actionPlan": "AP-ABCD", - "actionPlanName": "1.0", "actions": [ "comment", "assign", "set_tags", "assign_to_me", "plan" ], @@ -13,5 +12,12 @@ "confirm", "resolve" ] } + ], + "actionPlans": [ + { + "key": "AP-ABCD", + "name": "1.0", + "status": "OPEN" + } ] } diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/response_contains_all_fields_except_additional_fields.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/response_contains_all_fields_except_additional_fields.json new file mode 100644 index 00000000000..d806527edc4 --- /dev/null +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/response_contains_all_fields_except_additional_fields.json @@ -0,0 +1,24 @@ +{ + "issues": [ + { + "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", + "rule": "xoo:x1", + "severity": "MAJOR", + "component": "FILE_ID", + "resolution": "FIXED", + "status": "RESOLVED", + "message": "the message", + "debt": "10min", + "assignee": "simon", + "reporter": "fabrice", + "author": "John", + "actionPlan": "AP-ABCD", + "tags": [ + "bug", + "owasp" + ], + "creationDate": "2014-09-04T01:00:00+0200", + "updateDate": "2017-12-04T00:00:00+0100" + } + ] +} diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/sort_by_updated_at.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/sort_by_updated_at.json index 6711ed00118..7f40edc0ad3 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/sort_by_updated_at.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/sort_by_updated_at.json @@ -2,22 +2,22 @@ "issues": [ { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac2", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", + "project": "PROJECT_ID", "rule": "xoo:x1", "updateDate": "2014-11-01T00:00:00+0100" }, { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac1", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", + "project": "PROJECT_ID", "rule": "xoo:x1", "updateDate": "2014-11-02T00:00:00+0100" }, { "key": "82fd47d4-b650-4037-80bc-7b112bd4eac3", - "component": "MyComponent", - "project": "MyProject", + "component": "FILE_ID", + "project": "PROJECT_ID", "rule": "xoo:x1", "updateDate": "2014-11-03T00:00:00+0100" } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/action/Actions.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/action/Actions.java index f4758c9abd8..864b537f82a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/action/Actions.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/action/Actions.java @@ -45,4 +45,6 @@ public class Actions { public List list() { return actions; } + + } diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java index 75b15ce98ea..2a0bbf35bc1 100644 --- a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Common.java @@ -8,6 +8,115 @@ public final class Common { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } + /** + * Protobuf enum {@code sonarqube.ws.Severity} + */ + public enum Severity + implements com.google.protobuf.ProtocolMessageEnum { + /** + * INFO = 0; + */ + INFO(0, 0), + /** + * MINOR = 1; + */ + MINOR(1, 1), + /** + * MAJOR = 2; + */ + MAJOR(2, 2), + /** + * CRITICAL = 3; + */ + CRITICAL(3, 3), + /** + * BLOCKER = 4; + */ + BLOCKER(4, 4), + ; + + /** + * INFO = 0; + */ + public static final int INFO_VALUE = 0; + /** + * MINOR = 1; + */ + public static final int MINOR_VALUE = 1; + /** + * MAJOR = 2; + */ + public static final int MAJOR_VALUE = 2; + /** + * CRITICAL = 3; + */ + public static final int CRITICAL_VALUE = 3; + /** + * BLOCKER = 4; + */ + public static final int BLOCKER_VALUE = 4; + + + public final int getNumber() { return value; } + + public static Severity valueOf(int value) { + switch (value) { + case 0: return INFO; + case 1: return MINOR; + case 2: return MAJOR; + case 3: return CRITICAL; + case 4: return BLOCKER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Severity findValueByNumber(int number) { + return Severity.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return org.sonarqube.ws.Common.getDescriptor().getEnumTypes().get(0); + } + + private static final Severity[] VALUES = values(); + + public static Severity valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private Severity(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:sonarqube.ws.Severity) + } + /** * Protobuf enum {@code sonarqube.ws.RuleStatus} */ @@ -83,7 +192,7 @@ public final class Common { } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return org.sonarqube.ws.Common.getDescriptor().getEnumTypes().get(0); + return org.sonarqube.ws.Common.getDescriptor().getEnumTypes().get(1); } private static final RuleStatus[] VALUES = values(); @@ -113,20 +222,20 @@ public final class Common { com.google.protobuf.MessageOrBuilder { /** - * optional int32 page_index = 1; + * optional int32 pageIndex = 1; */ boolean hasPageIndex(); /** - * optional int32 page_index = 1; + * optional int32 pageIndex = 1; */ int getPageIndex(); /** - * optional int32 page_size = 2; + * optional int32 pageSize = 2; */ boolean hasPageSize(); /** - * optional int32 page_size = 2; + * optional int32 pageSize = 2; */ int getPageSize(); @@ -260,31 +369,31 @@ public final class Common { } private int bitField0_; - public static final int PAGE_INDEX_FIELD_NUMBER = 1; + public static final int PAGEINDEX_FIELD_NUMBER = 1; private int pageIndex_; /** - * optional int32 page_index = 1; + * optional int32 pageIndex = 1; */ public boolean hasPageIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 page_index = 1; + * optional int32 pageIndex = 1; */ public int getPageIndex() { return pageIndex_; } - public static final int PAGE_SIZE_FIELD_NUMBER = 2; + public static final int PAGESIZE_FIELD_NUMBER = 2; private int pageSize_; /** - * optional int32 page_size = 2; + * optional int32 pageSize = 2; */ public boolean hasPageSize() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional int32 page_size = 2; + * optional int32 pageSize = 2; */ public int getPageSize() { return pageSize_; @@ -602,19 +711,19 @@ public final class Common { private int pageIndex_ ; /** - * optional int32 page_index = 1; + * optional int32 pageIndex = 1; */ public boolean hasPageIndex() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional int32 page_index = 1; + * optional int32 pageIndex = 1; */ public int getPageIndex() { return pageIndex_; } /** - * optional int32 page_index = 1; + * optional int32 pageIndex = 1; */ public Builder setPageIndex(int value) { bitField0_ |= 0x00000001; @@ -623,7 +732,7 @@ public final class Common { return this; } /** - * optional int32 page_index = 1; + * optional int32 pageIndex = 1; */ public Builder clearPageIndex() { bitField0_ = (bitField0_ & ~0x00000001); @@ -634,19 +743,19 @@ public final class Common { private int pageSize_ ; /** - * optional int32 page_size = 2; + * optional int32 pageSize = 2; */ public boolean hasPageSize() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional int32 page_size = 2; + * optional int32 pageSize = 2; */ public int getPageSize() { return pageSize_; } /** - * optional int32 page_size = 2; + * optional int32 pageSize = 2; */ public Builder setPageSize(int value) { bitField0_ |= 0x00000002; @@ -655,7 +764,7 @@ public final class Common { return this; } /** - * optional int32 page_size = 2; + * optional int32 pageSize = 2; */ public Builder clearPageSize() { bitField0_ = (bitField0_ & ~0x00000002); @@ -2182,18 +2291,18 @@ public final class Common { com.google.protobuf.MessageOrBuilder { /** - * optional string uuid = 1; + * optional string id = 1; */ - boolean hasUuid(); + boolean hasId(); /** - * optional string uuid = 1; + * optional string id = 1; */ - java.lang.String getUuid(); + java.lang.String getId(); /** - * optional string uuid = 1; + * optional string id = 1; */ com.google.protobuf.ByteString - getUuidBytes(); + getIdBytes(); /** * optional string key = 2; @@ -2210,96 +2319,97 @@ public final class Common { getKeyBytes(); /** - * optional int32 id = 3; - */ - boolean hasId(); - /** - * optional int32 id = 3; - */ - int getId(); - - /** - * optional bool enabled = 4; + * optional bool enabled = 3; */ boolean hasEnabled(); /** - * optional bool enabled = 4; + * optional bool enabled = 3; */ boolean getEnabled(); /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ boolean hasQualifier(); /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ java.lang.String getQualifier(); /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ com.google.protobuf.ByteString getQualifierBytes(); /** - * optional string name = 6; + * optional string name = 5; */ boolean hasName(); /** - * optional string name = 6; + * optional string name = 5; */ java.lang.String getName(); /** - * optional string name = 6; + * optional string name = 5; */ com.google.protobuf.ByteString getNameBytes(); /** - * optional string longName = 7; + * optional string longName = 6; */ boolean hasLongName(); /** - * optional string longName = 7; + * optional string longName = 6; */ java.lang.String getLongName(); /** - * optional string longName = 7; + * optional string longName = 6; */ com.google.protobuf.ByteString getLongNameBytes(); /** - * optional string path = 8; + * optional string path = 7; */ boolean hasPath(); /** - * optional string path = 8; + * optional string path = 7; */ java.lang.String getPath(); /** - * optional string path = 8; + * optional string path = 7; */ com.google.protobuf.ByteString getPathBytes(); /** - * optional int32 projectId = 9; + * optional string project = 8; */ - boolean hasProjectId(); + boolean hasProject(); /** - * optional int32 projectId = 9; + * optional string project = 8; */ - int getProjectId(); + java.lang.String getProject(); + /** + * optional string project = 8; + */ + com.google.protobuf.ByteString + getProjectBytes(); /** - * optional int32 subProjectId = 10; + * optional string subProject = 9; */ - boolean hasSubProjectId(); + boolean hasSubProject(); /** - * optional int32 subProjectId = 10; + * optional string subProject = 9; */ - int getSubProjectId(); + java.lang.String getSubProject(); + /** + * optional string subProject = 9; + */ + com.google.protobuf.ByteString + getSubProjectBytes(); } /** * Protobuf type {@code sonarqube.ws.Component} @@ -2356,7 +2466,7 @@ public final class Common { case 10: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000001; - uuid_ = bs; + id_ = bs; break; } case 18: { @@ -2367,46 +2477,43 @@ public final class Common { } case 24: { bitField0_ |= 0x00000004; - id_ = input.readInt32(); + enabled_ = input.readBool(); break; } - case 32: { + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - enabled_ = input.readBool(); + qualifier_ = bs; break; } case 42: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000010; - qualifier_ = bs; + name_ = bs; break; } case 50: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; - name_ = bs; + longName_ = bs; break; } case 58: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000040; - longName_ = bs; + path_ = bs; break; } case 66: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000080; - path_ = bs; + project_ = bs; break; } - case 72: { + case 74: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000100; - projectId_ = input.readInt32(); - break; - } - case 80: { - bitField0_ |= 0x00000200; - subProjectId_ = input.readInt32(); + subProject_ = bs; break; } } @@ -2449,19 +2556,19 @@ public final class Common { } private int bitField0_; - public static final int UUID_FIELD_NUMBER = 1; - private java.lang.Object uuid_; + public static final int ID_FIELD_NUMBER = 1; + private java.lang.Object id_; /** - * optional string uuid = 1; + * optional string id = 1; */ - public boolean hasUuid() { + public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string uuid = 1; + * optional string id = 1; */ - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -2469,22 +2576,22 @@ public final class Common { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - uuid_ = s; + id_ = s; } return s; } } /** - * optional string uuid = 1; + * optional string id = 1; */ public com.google.protobuf.ByteString - getUuidBytes() { - java.lang.Object ref = uuid_; + getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - uuid_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -2533,46 +2640,31 @@ public final class Common { } } - public static final int ID_FIELD_NUMBER = 3; - private int id_; - /** - * optional int32 id = 3; - */ - public boolean hasId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 id = 3; - */ - public int getId() { - return id_; - } - - public static final int ENABLED_FIELD_NUMBER = 4; + public static final int ENABLED_FIELD_NUMBER = 3; private boolean enabled_; /** - * optional bool enabled = 4; + * optional bool enabled = 3; */ public boolean hasEnabled() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional bool enabled = 4; + * optional bool enabled = 3; */ public boolean getEnabled() { return enabled_; } - public static final int QUALIFIER_FIELD_NUMBER = 5; + public static final int QUALIFIER_FIELD_NUMBER = 4; private java.lang.Object qualifier_; /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public boolean hasQualifier() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public java.lang.String getQualifier() { java.lang.Object ref = qualifier_; @@ -2589,7 +2681,7 @@ public final class Common { } } /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public com.google.protobuf.ByteString getQualifierBytes() { @@ -2605,16 +2697,16 @@ public final class Common { } } - public static final int NAME_FIELD_NUMBER = 6; + public static final int NAME_FIELD_NUMBER = 5; private java.lang.Object name_; /** - * optional string name = 6; + * optional string name = 5; */ public boolean hasName() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional string name = 6; + * optional string name = 5; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -2631,7 +2723,7 @@ public final class Common { } } /** - * optional string name = 6; + * optional string name = 5; */ public com.google.protobuf.ByteString getNameBytes() { @@ -2647,16 +2739,16 @@ public final class Common { } } - public static final int LONGNAME_FIELD_NUMBER = 7; + public static final int LONGNAME_FIELD_NUMBER = 6; private java.lang.Object longName_; /** - * optional string longName = 7; + * optional string longName = 6; */ public boolean hasLongName() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional string longName = 7; + * optional string longName = 6; */ public java.lang.String getLongName() { java.lang.Object ref = longName_; @@ -2673,7 +2765,7 @@ public final class Common { } } /** - * optional string longName = 7; + * optional string longName = 6; */ public com.google.protobuf.ByteString getLongNameBytes() { @@ -2689,16 +2781,16 @@ public final class Common { } } - public static final int PATH_FIELD_NUMBER = 8; + public static final int PATH_FIELD_NUMBER = 7; private java.lang.Object path_; /** - * optional string path = 8; + * optional string path = 7; */ public boolean hasPath() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional string path = 8; + * optional string path = 7; */ public java.lang.String getPath() { java.lang.Object ref = path_; @@ -2715,7 +2807,7 @@ public final class Common { } } /** - * optional string path = 8; + * optional string path = 7; */ public com.google.protobuf.ByteString getPathBytes() { @@ -2731,47 +2823,100 @@ public final class Common { } } - public static final int PROJECTID_FIELD_NUMBER = 9; - private int projectId_; + public static final int PROJECT_FIELD_NUMBER = 8; + private java.lang.Object project_; /** - * optional int32 projectId = 9; + * optional string project = 8; */ - public boolean hasProjectId() { - return ((bitField0_ & 0x00000100) == 0x00000100); + public boolean hasProject() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional string project = 8; + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + 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()) { + project_ = s; + } + return s; + } } /** - * optional int32 projectId = 9; + * optional string project = 8; */ - public int getProjectId() { - return projectId_; + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public static final int SUBPROJECTID_FIELD_NUMBER = 10; - private int subProjectId_; + public static final int SUBPROJECT_FIELD_NUMBER = 9; + private java.lang.Object subProject_; /** - * optional int32 subProjectId = 10; + * optional string subProject = 9; */ - public boolean hasSubProjectId() { - return ((bitField0_ & 0x00000200) == 0x00000200); + public boolean hasSubProject() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional string subProject = 9; + */ + public java.lang.String getSubProject() { + java.lang.Object ref = subProject_; + 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()) { + subProject_ = s; + } + return s; + } } /** - * optional int32 subProjectId = 10; + * optional string subProject = 9; */ - public int getSubProjectId() { - return subProjectId_; + public com.google.protobuf.ByteString + getSubProjectBytes() { + java.lang.Object ref = subProject_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private void initFields() { - uuid_ = ""; + id_ = ""; key_ = ""; - id_ = 0; enabled_ = false; qualifier_ = ""; name_ = ""; longName_ = ""; path_ = ""; - projectId_ = 0; - subProjectId_ = 0; + project_ = ""; + subProject_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2787,34 +2932,31 @@ public final class Common { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getUuidBytes()); + output.writeBytes(1, getIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getKeyBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, id_); + output.writeBool(3, enabled_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBool(4, enabled_); + output.writeBytes(4, getQualifierBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getQualifierBytes()); + output.writeBytes(5, getNameBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(6, getNameBytes()); + output.writeBytes(6, getLongNameBytes()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(7, getLongNameBytes()); + output.writeBytes(7, getPathBytes()); } if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(8, getPathBytes()); + output.writeBytes(8, getProjectBytes()); } if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeInt32(9, projectId_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeInt32(10, subProjectId_); + output.writeBytes(9, getSubProjectBytes()); } getUnknownFields().writeTo(output); } @@ -2827,7 +2969,7 @@ public final class Common { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getUuidBytes()); + .computeBytesSize(1, getIdBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream @@ -2835,35 +2977,31 @@ public final class Common { } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, id_); + .computeBoolSize(3, enabled_); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, enabled_); + .computeBytesSize(4, getQualifierBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getQualifierBytes()); + .computeBytesSize(5, getNameBytes()); } if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getNameBytes()); + .computeBytesSize(6, getLongNameBytes()); } if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, getLongNameBytes()); + .computeBytesSize(7, getPathBytes()); } if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, getPathBytes()); + .computeBytesSize(8, getProjectBytes()); } if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(9, projectId_); - } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(10, subProjectId_); + .computeBytesSize(9, getSubProjectBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -2982,26 +3120,24 @@ public final class Common { public Builder clear() { super.clear(); - uuid_ = ""; + id_ = ""; bitField0_ = (bitField0_ & ~0x00000001); key_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - id_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); enabled_ = false; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); qualifier_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); name_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); longName_ = ""; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); path_ = ""; + bitField0_ = (bitField0_ & ~0x00000040); + project_ = ""; bitField0_ = (bitField0_ & ~0x00000080); - projectId_ = 0; + subProject_ = ""; bitField0_ = (bitField0_ & ~0x00000100); - subProjectId_ = 0; - bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -3033,7 +3169,7 @@ public final class Common { if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } - result.uuid_ = uuid_; + result.id_ = id_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } @@ -3041,35 +3177,31 @@ public final class Common { if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.id_ = id_; + result.enabled_ = enabled_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.enabled_ = enabled_; + result.qualifier_ = qualifier_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } - result.qualifier_ = qualifier_; + result.name_ = name_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000020; } - result.name_ = name_; + result.longName_ = longName_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000040; } - result.longName_ = longName_; + result.path_ = path_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000080; } - result.path_ = path_; + result.project_ = project_; if (((from_bitField0_ & 0x00000100) == 0x00000100)) { to_bitField0_ |= 0x00000100; } - result.projectId_ = projectId_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.subProjectId_ = subProjectId_; + result.subProject_ = subProject_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -3086,9 +3218,9 @@ public final class Common { public Builder mergeFrom(org.sonarqube.ws.Common.Component other) { if (other == org.sonarqube.ws.Common.Component.getDefaultInstance()) return this; - if (other.hasUuid()) { + if (other.hasId()) { bitField0_ |= 0x00000001; - uuid_ = other.uuid_; + id_ = other.id_; onChanged(); } if (other.hasKey()) { @@ -3096,37 +3228,38 @@ public final class Common { key_ = other.key_; onChanged(); } - if (other.hasId()) { - setId(other.getId()); - } if (other.hasEnabled()) { setEnabled(other.getEnabled()); } if (other.hasQualifier()) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; qualifier_ = other.qualifier_; onChanged(); } if (other.hasName()) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; name_ = other.name_; onChanged(); } if (other.hasLongName()) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; longName_ = other.longName_; onChanged(); } if (other.hasPath()) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; path_ = other.path_; onChanged(); } - if (other.hasProjectId()) { - setProjectId(other.getProjectId()); + if (other.hasProject()) { + bitField0_ |= 0x00000080; + project_ = other.project_; + onChanged(); } - if (other.hasSubProjectId()) { - setSubProjectId(other.getSubProjectId()); + if (other.hasSubProject()) { + bitField0_ |= 0x00000100; + subProject_ = other.subProject_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -3155,24 +3288,24 @@ public final class Common { } private int bitField0_; - private java.lang.Object uuid_ = ""; + private java.lang.Object id_ = ""; /** - * optional string uuid = 1; + * optional string id = 1; */ - public boolean hasUuid() { + public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string uuid = 1; + * optional string id = 1; */ - public java.lang.String getUuid() { - java.lang.Object ref = uuid_; + public java.lang.String getId() { + java.lang.Object ref = id_; 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()) { - uuid_ = s; + id_ = s; } return s; } else { @@ -3180,53 +3313,53 @@ public final class Common { } } /** - * optional string uuid = 1; + * optional string id = 1; */ public com.google.protobuf.ByteString - getUuidBytes() { - java.lang.Object ref = uuid_; + getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - uuid_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string uuid = 1; + * optional string id = 1; */ - public Builder setUuid( + public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - uuid_ = value; + id_ = value; onChanged(); return this; } /** - * optional string uuid = 1; + * optional string id = 1; */ - public Builder clearUuid() { + public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000001); - uuid_ = getDefaultInstance().getUuid(); + id_ = getDefaultInstance().getId(); onChanged(); return this; } /** - * optional string uuid = 1; + * optional string id = 1; */ - public Builder setUuidBytes( + public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; - uuid_ = value; + id_ = value; onChanged(); return this; } @@ -3307,65 +3440,33 @@ public final class Common { return this; } - private int id_ ; - /** - * optional int32 id = 3; - */ - public boolean hasId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 id = 3; - */ - public int getId() { - return id_; - } - /** - * optional int32 id = 3; - */ - public Builder setId(int value) { - bitField0_ |= 0x00000004; - id_ = value; - onChanged(); - return this; - } - /** - * optional int32 id = 3; - */ - public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000004); - id_ = 0; - onChanged(); - return this; - } - private boolean enabled_ ; /** - * optional bool enabled = 4; + * optional bool enabled = 3; */ public boolean hasEnabled() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional bool enabled = 4; + * optional bool enabled = 3; */ public boolean getEnabled() { return enabled_; } /** - * optional bool enabled = 4; + * optional bool enabled = 3; */ public Builder setEnabled(boolean value) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; enabled_ = value; onChanged(); return this; } /** - * optional bool enabled = 4; + * optional bool enabled = 3; */ public Builder clearEnabled() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); enabled_ = false; onChanged(); return this; @@ -3373,13 +3474,13 @@ public final class Common { private java.lang.Object qualifier_ = ""; /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public boolean hasQualifier() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public java.lang.String getQualifier() { java.lang.Object ref = qualifier_; @@ -3396,7 +3497,7 @@ public final class Common { } } /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public com.google.protobuf.ByteString getQualifierBytes() { @@ -3412,36 +3513,36 @@ public final class Common { } } /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public Builder setQualifier( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; qualifier_ = value; onChanged(); return this; } /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public Builder clearQualifier() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); qualifier_ = getDefaultInstance().getQualifier(); onChanged(); return this; } /** - * optional string qualifier = 5; + * optional string qualifier = 4; */ public Builder setQualifierBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; qualifier_ = value; onChanged(); return this; @@ -3449,13 +3550,13 @@ public final class Common { private java.lang.Object name_ = ""; /** - * optional string name = 6; + * optional string name = 5; */ public boolean hasName() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional string name = 6; + * optional string name = 5; */ public java.lang.String getName() { java.lang.Object ref = name_; @@ -3472,7 +3573,7 @@ public final class Common { } } /** - * optional string name = 6; + * optional string name = 5; */ public com.google.protobuf.ByteString getNameBytes() { @@ -3488,36 +3589,36 @@ public final class Common { } } /** - * optional string name = 6; + * optional string name = 5; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; name_ = value; onChanged(); return this; } /** - * optional string name = 6; + * optional string name = 5; */ public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * optional string name = 6; + * optional string name = 5; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; name_ = value; onChanged(); return this; @@ -3525,13 +3626,13 @@ public final class Common { private java.lang.Object longName_ = ""; /** - * optional string longName = 7; + * optional string longName = 6; */ public boolean hasLongName() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional string longName = 7; + * optional string longName = 6; */ public java.lang.String getLongName() { java.lang.Object ref = longName_; @@ -3548,7 +3649,7 @@ public final class Common { } } /** - * optional string longName = 7; + * optional string longName = 6; */ public com.google.protobuf.ByteString getLongNameBytes() { @@ -3564,36 +3665,36 @@ public final class Common { } } /** - * optional string longName = 7; + * optional string longName = 6; */ public Builder setLongName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; longName_ = value; onChanged(); return this; } /** - * optional string longName = 7; + * optional string longName = 6; */ public Builder clearLongName() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000020); longName_ = getDefaultInstance().getLongName(); onChanged(); return this; } /** - * optional string longName = 7; + * optional string longName = 6; */ public Builder setLongNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; longName_ = value; onChanged(); return this; @@ -3601,13 +3702,13 @@ public final class Common { private java.lang.Object path_ = ""; /** - * optional string path = 8; + * optional string path = 7; */ public boolean hasPath() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional string path = 8; + * optional string path = 7; */ public java.lang.String getPath() { java.lang.Object ref = path_; @@ -3624,7 +3725,7 @@ public final class Common { } } /** - * optional string path = 8; + * optional string path = 7; */ public com.google.protobuf.ByteString getPathBytes() { @@ -3640,101 +3741,189 @@ public final class Common { } } /** - * optional string path = 8; + * optional string path = 7; */ public Builder setPath( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; path_ = value; onChanged(); return this; } /** - * optional string path = 8; + * optional string path = 7; */ public Builder clearPath() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000040); path_ = getDefaultInstance().getPath(); onChanged(); return this; } /** - * optional string path = 8; + * optional string path = 7; */ public Builder setPathBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; path_ = value; onChanged(); return this; } - private int projectId_ ; + private java.lang.Object project_ = ""; /** - * optional int32 projectId = 9; + * optional string project = 8; */ - public boolean hasProjectId() { - return ((bitField0_ & 0x00000100) == 0x00000100); + public boolean hasProject() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional string project = 8; + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + 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()) { + project_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional int32 projectId = 9; + * optional string project = 8; */ - public int getProjectId() { - return projectId_; + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** - * optional int32 projectId = 9; + * optional string project = 8; */ - public Builder setProjectId(int value) { - bitField0_ |= 0x00000100; - projectId_ = value; + public Builder setProject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + project_ = value; onChanged(); return this; } /** - * optional int32 projectId = 9; + * optional string project = 8; */ - public Builder clearProjectId() { - bitField0_ = (bitField0_ & ~0x00000100); - projectId_ = 0; + public Builder clearProject() { + bitField0_ = (bitField0_ & ~0x00000080); + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; + } + /** + * optional string project = 8; + */ + public Builder setProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + project_ = value; onChanged(); return this; } - private int subProjectId_ ; + private java.lang.Object subProject_ = ""; + /** + * optional string subProject = 9; + */ + public boolean hasSubProject() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional string subProject = 9; + */ + public java.lang.String getSubProject() { + java.lang.Object ref = subProject_; + 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()) { + subProject_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } /** - * optional int32 subProjectId = 10; + * optional string subProject = 9; */ - public boolean hasSubProjectId() { - return ((bitField0_ & 0x00000200) == 0x00000200); + public com.google.protobuf.ByteString + getSubProjectBytes() { + java.lang.Object ref = subProject_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + subProject_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** - * optional int32 subProjectId = 10; + * optional string subProject = 9; */ - public int getSubProjectId() { - return subProjectId_; + public Builder setSubProject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + subProject_ = value; + onChanged(); + return this; } /** - * optional int32 subProjectId = 10; + * optional string subProject = 9; */ - public Builder setSubProjectId(int value) { - bitField0_ |= 0x00000200; - subProjectId_ = value; + public Builder clearSubProject() { + bitField0_ = (bitField0_ & ~0x00000100); + subProject_ = getDefaultInstance().getSubProject(); onChanged(); return this; } /** - * optional int32 subProjectId = 10; + * optional string subProject = 9; */ - public Builder clearSubProjectId() { - bitField0_ = (bitField0_ & ~0x00000200); - subProjectId_ = 0; + public Builder setSubProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + subProject_ = value; onChanged(); return this; } @@ -5944,24 +6133,25 @@ public final class Common { descriptor; static { java.lang.String[] descriptorData = { - "\n\017ws-common.proto\022\014sonarqube.ws\"M\n\006Pagin" + - "g\022\022\n\npage_index\030\001 \001(\005\022\021\n\tpage_size\030\002 \001(\005" + - "\022\r\n\005total\030\003 \001(\005\022\r\n\005pages\030\004 \001(\005\"C\n\005Facet\022" + - "\020\n\010property\030\001 \001(\t\022(\n\006values\030\002 \003(\0132\030.sona" + - "rqube.ws.FacetValue\"(\n\nFacetValue\022\013\n\003val" + - "\030\001 \001(\t\022\r\n\005count\030\002 \001(\003\"\255\001\n\tComponent\022\014\n\004u" + - "uid\030\001 \001(\t\022\013\n\003key\030\002 \001(\t\022\n\n\002id\030\003 \001(\005\022\017\n\007en" + - "abled\030\004 \001(\010\022\021\n\tqualifier\030\005 \001(\t\022\014\n\004name\030\006" + - " \001(\t\022\020\n\010longName\030\007 \001(\t\022\014\n\004path\030\010 \001(\t\022\021\n\t" + - "projectId\030\t \001(\005\022\024\n\014subProjectId\030\n \001(\005\"y\n", - "\004Rule\022\013\n\003key\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\014\n\004lang" + - "\030\003 \001(\t\022\014\n\004desc\030\004 \001(\t\022(\n\006status\030\005 \001(\0162\030.s" + - "onarqube.ws.RuleStatus\022\020\n\010langName\030\006 \001(\t" + - "\"B\n\004User\022\r\n\005login\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\r\n" + - "\005email\030\003 \001(\t\022\016\n\006active\030\004 \001(\010*>\n\nRuleStat" + - "us\022\010\n\004BETA\020\000\022\016\n\nDEPRECATED\020\001\022\t\n\005READY\020\002\022" + - "\013\n\007REMOVED\020\003B\034\n\020org.sonarqube.wsB\006Common" + - "H\001" + "\n\017ws-common.proto\022\014sonarqube.ws\"K\n\006Pagin" + + "g\022\021\n\tpageIndex\030\001 \001(\005\022\020\n\010pageSize\030\002 \001(\005\022\r" + + "\n\005total\030\003 \001(\005\022\r\n\005pages\030\004 \001(\005\"C\n\005Facet\022\020\n" + + "\010property\030\001 \001(\t\022(\n\006values\030\002 \003(\0132\030.sonarq" + + "ube.ws.FacetValue\"(\n\nFacetValue\022\013\n\003val\030\001" + + " \001(\t\022\r\n\005count\030\002 \001(\003\"\233\001\n\tComponent\022\n\n\002id\030" + + "\001 \001(\t\022\013\n\003key\030\002 \001(\t\022\017\n\007enabled\030\003 \001(\010\022\021\n\tq" + + "ualifier\030\004 \001(\t\022\014\n\004name\030\005 \001(\t\022\020\n\010longName" + + "\030\006 \001(\t\022\014\n\004path\030\007 \001(\t\022\017\n\007project\030\010 \001(\t\022\022\n" + + "\nsubProject\030\t \001(\t\"y\n\004Rule\022\013\n\003key\030\001 \001(\t\022\014", + "\n\004name\030\002 \001(\t\022\014\n\004lang\030\003 \001(\t\022\014\n\004desc\030\004 \001(\t" + + "\022(\n\006status\030\005 \001(\0162\030.sonarqube.ws.RuleStat" + + "us\022\020\n\010langName\030\006 \001(\t\"B\n\004User\022\r\n\005login\030\001 " + + "\001(\t\022\014\n\004name\030\002 \001(\t\022\r\n\005email\030\003 \001(\t\022\016\n\006acti" + + "ve\030\004 \001(\010*E\n\010Severity\022\010\n\004INFO\020\000\022\t\n\005MINOR\020" + + "\001\022\t\n\005MAJOR\020\002\022\014\n\010CRITICAL\020\003\022\013\n\007BLOCKER\020\004*" + + ">\n\nRuleStatus\022\010\n\004BETA\020\000\022\016\n\nDEPRECATED\020\001\022" + + "\t\n\005READY\020\002\022\013\n\007REMOVED\020\003B\034\n\020org.sonarqube" + + ".wsB\006CommonH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -5998,7 +6188,7 @@ public final class Common { internal_static_sonarqube_ws_Component_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_sonarqube_ws_Component_descriptor, - new java.lang.String[] { "Uuid", "Key", "Id", "Enabled", "Qualifier", "Name", "LongName", "Path", "ProjectId", "SubProjectId", }); + new java.lang.String[] { "Id", "Key", "Enabled", "Qualifier", "Name", "LongName", "Path", "Project", "SubProject", }); internal_static_sonarqube_ws_Rule_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_sonarqube_ws_Rule_fieldAccessorTable = new diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java index fe73098304a..15fb9df79dc 100644 --- a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Issues.java @@ -13,173 +13,316 @@ public final class Issues { com.google.protobuf.MessageOrBuilder { /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-     * TODO errors
-     * 
+ * optional int64 total = 1; + */ + boolean hasTotal(); + /** + * optional int64 total = 1; + */ + long getTotal(); + + /** + * optional int64 p = 2; + */ + boolean hasP(); + /** + * optional int64 p = 2; + */ + long getP(); + + /** + * optional int32 ps = 3; + */ + boolean hasPs(); + /** + * optional int32 ps = 3; + */ + int getPs(); + + /** + * optional .sonarqube.ws.Paging paging = 4; */ boolean hasPaging(); /** - * optional .sonarqube.ws.Paging paging = 1; + * optional .sonarqube.ws.Paging paging = 4; + */ + org.sonarqube.ws.Common.Paging getPaging(); + /** + * optional .sonarqube.ws.Paging paging = 4; + */ + org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder(); + + /** + * optional int64 debtTotal = 5; * *
-     * TODO errors
+     * Total amount of debt, only when the facet "total" is enabled
      * 
*/ - org.sonarqube.ws.Common.Paging getPaging(); + boolean hasDebtTotal(); /** - * optional .sonarqube.ws.Paging paging = 1; + * optional int64 debtTotal = 5; * *
-     * TODO errors
+     * Total amount of debt, only when the facet "total" is enabled
      * 
*/ - org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder(); + long getDebtTotal(); /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ java.util.List getIssuesList(); /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ org.sonarqube.ws.Issues.Issue getIssues(int index); /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ int getIssuesCount(); /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ java.util.List getIssuesOrBuilderList(); /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ org.sonarqube.ws.Issues.IssueOrBuilder getIssuesOrBuilder( int index); /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - java.util.List - getFacetsList(); - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - org.sonarqube.ws.Common.Facet getFacets(int index); - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - int getFacetsCount(); - /** - * repeated .sonarqube.ws.Facet facets = 3; + * optional bool projectsPresentIfEmpty = 8; */ - java.util.List - getFacetsOrBuilderList(); + boolean hasProjectsPresentIfEmpty(); /** - * repeated .sonarqube.ws.Facet facets = 3; + * optional bool projectsPresentIfEmpty = 8; */ - org.sonarqube.ws.Common.FacetOrBuilder getFacetsOrBuilder( - int index); + boolean getProjectsPresentIfEmpty(); /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ java.util.List getProjectsList(); /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ org.sonarqube.ws.Common.Component getProjects(int index); /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ int getProjectsCount(); /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ java.util.List getProjectsOrBuilderList(); /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ org.sonarqube.ws.Common.ComponentOrBuilder getProjectsOrBuilder( int index); /** - * repeated .sonarqube.ws.Component components = 5; + * optional bool componentsPresentIfEmpty = 10; + */ + boolean hasComponentsPresentIfEmpty(); + /** + * optional bool componentsPresentIfEmpty = 10; + */ + boolean getComponentsPresentIfEmpty(); + + /** + * repeated .sonarqube.ws.Component components = 11; */ java.util.List getComponentsList(); /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ org.sonarqube.ws.Common.Component getComponents(int index); /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ int getComponentsCount(); /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ java.util.List getComponentsOrBuilderList(); /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ org.sonarqube.ws.Common.ComponentOrBuilder getComponentsOrBuilder( int index); /** - * repeated .sonarqube.ws.Rule rules = 6; + * optional bool rulesPresentIfEmpty = 12; + */ + boolean hasRulesPresentIfEmpty(); + /** + * optional bool rulesPresentIfEmpty = 12; + */ + boolean getRulesPresentIfEmpty(); + + /** + * repeated .sonarqube.ws.Rule rules = 13; */ java.util.List getRulesList(); /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ org.sonarqube.ws.Common.Rule getRules(int index); /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ int getRulesCount(); /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ java.util.List getRulesOrBuilderList(); /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ org.sonarqube.ws.Common.RuleOrBuilder getRulesOrBuilder( int index); /** - * repeated .sonarqube.ws.User users = 7; + * optional bool usersPresentIfEmpty = 14; + */ + boolean hasUsersPresentIfEmpty(); + /** + * optional bool usersPresentIfEmpty = 14; + */ + boolean getUsersPresentIfEmpty(); + + /** + * repeated .sonarqube.ws.User users = 15; */ java.util.List getUsersList(); /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ org.sonarqube.ws.Common.User getUsers(int index); /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ int getUsersCount(); /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ java.util.List getUsersOrBuilderList(); /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ org.sonarqube.ws.Common.UserOrBuilder getUsersOrBuilder( int index); + + /** + * optional bool actionPlansPresentIfEmpty = 16; + */ + boolean hasActionPlansPresentIfEmpty(); + /** + * optional bool actionPlansPresentIfEmpty = 16; + */ + boolean getActionPlansPresentIfEmpty(); + + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + java.util.List + getActionPlansList(); + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + org.sonarqube.ws.Issues.ActionPlan getActionPlans(int index); + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + int getActionPlansCount(); + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + java.util.List + getActionPlansOrBuilderList(); + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + org.sonarqube.ws.Issues.ActionPlanOrBuilder getActionPlansOrBuilder( + int index); + + /** + * optional bool languagesPresentIfEmpty = 18; + */ + boolean hasLanguagesPresentIfEmpty(); + /** + * optional bool languagesPresentIfEmpty = 18; + */ + boolean getLanguagesPresentIfEmpty(); + + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + java.util.List + getLanguagesList(); + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + org.sonarqube.ws.Issues.Language getLanguages(int index); + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + int getLanguagesCount(); + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + java.util.List + getLanguagesOrBuilderList(); + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + org.sonarqube.ws.Issues.LanguageOrBuilder getLanguagesOrBuilder( + int index); + + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + java.util.List + getFacetsList(); + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + org.sonarqube.ws.Common.Facet getFacets(int index); + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + int getFacetsCount(); + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + java.util.List + getFacetsOrBuilderList(); + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + org.sonarqube.ws.Common.FacetOrBuilder getFacetsOrBuilder( + int index); + + /** + * optional bool facetsPresentIfEmpty = 21; + */ + boolean hasFacetsPresentIfEmpty(); + /** + * optional bool facetsPresentIfEmpty = 21; + */ + boolean getFacetsPresentIfEmpty(); } /** * Protobuf type {@code sonarqube.ws.issues.Search} @@ -237,9 +380,24 @@ public final class Issues { } break; } - case 10: { + case 8: { + bitField0_ |= 0x00000001; + total_ = input.readInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + p_ = input.readInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + ps_ = input.readInt32(); + break; + } + case 34: { org.sonarqube.ws.Common.Paging.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { subBuilder = paging_.toBuilder(); } paging_ = input.readMessage(org.sonarqube.ws.Common.Paging.PARSER, extensionRegistry); @@ -247,57 +405,113 @@ public final class Issues { subBuilder.mergeFrom(paging_); paging_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; break; } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + case 40: { + bitField0_ |= 0x00000010; + debtTotal_ = input.readInt64(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { issues_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; + mutable_bitField0_ |= 0x00000020; } issues_.add(input.readMessage(org.sonarqube.ws.Issues.Issue.PARSER, extensionRegistry)); break; } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - facets_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - facets_.add(input.readMessage(org.sonarqube.ws.Common.Facet.PARSER, extensionRegistry)); + case 64: { + bitField0_ |= 0x00000020; + projectsPresentIfEmpty_ = input.readBool(); break; } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + case 74: { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { projects_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; + mutable_bitField0_ |= 0x00000080; } projects_.add(input.readMessage(org.sonarqube.ws.Common.Component.PARSER, extensionRegistry)); break; } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + case 80: { + bitField0_ |= 0x00000040; + componentsPresentIfEmpty_ = input.readBool(); + break; + } + case 90: { + if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { components_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; + mutable_bitField0_ |= 0x00000200; } components_.add(input.readMessage(org.sonarqube.ws.Common.Component.PARSER, extensionRegistry)); break; } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + case 96: { + bitField0_ |= 0x00000080; + rulesPresentIfEmpty_ = input.readBool(); + break; + } + case 106: { + if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) { rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000800; } rules_.add(input.readMessage(org.sonarqube.ws.Common.Rule.PARSER, extensionRegistry)); break; } - case 58: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + case 112: { + bitField0_ |= 0x00000100; + usersPresentIfEmpty_ = input.readBool(); + break; + } + case 122: { + if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) { users_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; + mutable_bitField0_ |= 0x00002000; } users_.add(input.readMessage(org.sonarqube.ws.Common.User.PARSER, extensionRegistry)); break; } + case 128: { + bitField0_ |= 0x00000200; + actionPlansPresentIfEmpty_ = input.readBool(); + break; + } + case 138: { + if (!((mutable_bitField0_ & 0x00008000) == 0x00008000)) { + actionPlans_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00008000; + } + actionPlans_.add(input.readMessage(org.sonarqube.ws.Issues.ActionPlan.PARSER, extensionRegistry)); + break; + } + case 144: { + bitField0_ |= 0x00000400; + languagesPresentIfEmpty_ = input.readBool(); + break; + } + case 154: { + if (!((mutable_bitField0_ & 0x00020000) == 0x00020000)) { + languages_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00020000; + } + languages_.add(input.readMessage(org.sonarqube.ws.Issues.Language.PARSER, extensionRegistry)); + break; + } + case 162: { + if (!((mutable_bitField0_ & 0x00040000) == 0x00040000)) { + facets_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00040000; + } + facets_.add(input.readMessage(org.sonarqube.ws.Common.Facet.PARSER, extensionRegistry)); + break; + } + case 168: { + bitField0_ |= 0x00000800; + facetsPresentIfEmpty_ = input.readBool(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -306,24 +520,30 @@ public final class Issues { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { issues_ = java.util.Collections.unmodifiableList(issues_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - facets_ = java.util.Collections.unmodifiableList(facets_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { projects_ = java.util.Collections.unmodifiableList(projects_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { components_ = java.util.Collections.unmodifiableList(components_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) { rules_ = java.util.Collections.unmodifiableList(rules_); } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) { users_ = java.util.Collections.unmodifiableList(users_); } + if (((mutable_bitField0_ & 0x00008000) == 0x00008000)) { + actionPlans_ = java.util.Collections.unmodifiableList(actionPlans_); + } + if (((mutable_bitField0_ & 0x00020000) == 0x00020000)) { + languages_ = java.util.Collections.unmodifiableList(languages_); + } + if (((mutable_bitField0_ & 0x00040000) == 0x00040000)) { + facets_ = java.util.Collections.unmodifiableList(facets_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -356,257 +576,501 @@ public final class Issues { } private int bitField0_; - public static final int PAGING_FIELD_NUMBER = 1; + public static final int TOTAL_FIELD_NUMBER = 1; + private long total_; + /** + * optional int64 total = 1; + */ + public boolean hasTotal() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int64 total = 1; + */ + public long getTotal() { + return total_; + } + + public static final int P_FIELD_NUMBER = 2; + private long p_; + /** + * optional int64 p = 2; + */ + public boolean hasP() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int64 p = 2; + */ + public long getP() { + return p_; + } + + public static final int PS_FIELD_NUMBER = 3; + private int ps_; + /** + * optional int32 ps = 3; + */ + public boolean hasPs() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 ps = 3; + */ + public int getPs() { + return ps_; + } + + public static final int PAGING_FIELD_NUMBER = 4; private org.sonarqube.ws.Common.Paging paging_; /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-     * TODO errors
-     * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public boolean hasPaging() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .sonarqube.ws.Paging paging = 4; + */ + public org.sonarqube.ws.Common.Paging getPaging() { + return paging_; + } + /** + * optional .sonarqube.ws.Paging paging = 4; + */ + public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { + return paging_; } + + public static final int DEBTTOTAL_FIELD_NUMBER = 5; + private long debtTotal_; /** - * optional .sonarqube.ws.Paging paging = 1; + * optional int64 debtTotal = 5; * *
-     * TODO errors
+     * Total amount of debt, only when the facet "total" is enabled
      * 
*/ - public org.sonarqube.ws.Common.Paging getPaging() { - return paging_; + public boolean hasDebtTotal() { + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional .sonarqube.ws.Paging paging = 1; + * optional int64 debtTotal = 5; * *
-     * TODO errors
+     * Total amount of debt, only when the facet "total" is enabled
      * 
*/ - public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { - return paging_; + public long getDebtTotal() { + return debtTotal_; } - public static final int ISSUES_FIELD_NUMBER = 2; + public static final int ISSUES_FIELD_NUMBER = 6; private java.util.List issues_; /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public java.util.List getIssuesList() { return issues_; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public java.util.List getIssuesOrBuilderList() { return issues_; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public int getIssuesCount() { return issues_.size(); } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public org.sonarqube.ws.Issues.Issue getIssues(int index) { return issues_.get(index); } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public org.sonarqube.ws.Issues.IssueOrBuilder getIssuesOrBuilder( int index) { return issues_.get(index); } - public static final int FACETS_FIELD_NUMBER = 3; - private java.util.List facets_; + public static final int PROJECTSPRESENTIFEMPTY_FIELD_NUMBER = 8; + private boolean projectsPresentIfEmpty_; /** - * repeated .sonarqube.ws.Facet facets = 3; + * optional bool projectsPresentIfEmpty = 8; */ - public java.util.List getFacetsList() { - return facets_; + public boolean hasProjectsPresentIfEmpty() { + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * repeated .sonarqube.ws.Facet facets = 3; + * optional bool projectsPresentIfEmpty = 8; */ - public java.util.List - getFacetsOrBuilderList() { - return facets_; + public boolean getProjectsPresentIfEmpty() { + return projectsPresentIfEmpty_; } + + public static final int PROJECTS_FIELD_NUMBER = 9; + private java.util.List projects_; /** - * repeated .sonarqube.ws.Facet facets = 3; + * repeated .sonarqube.ws.Component projects = 9; */ - public int getFacetsCount() { - return facets_.size(); + public java.util.List getProjectsList() { + return projects_; } /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public org.sonarqube.ws.Common.Facet getFacets(int index) { - return facets_.get(index); - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public org.sonarqube.ws.Common.FacetOrBuilder getFacetsOrBuilder( - int index) { - return facets_.get(index); - } - - public static final int PROJECTS_FIELD_NUMBER = 4; - private java.util.List projects_; - /** - * repeated .sonarqube.ws.Component projects = 4; - */ - public java.util.List getProjectsList() { - return projects_; - } - /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public java.util.List getProjectsOrBuilderList() { return projects_; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public int getProjectsCount() { return projects_.size(); } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public org.sonarqube.ws.Common.Component getProjects(int index) { return projects_.get(index); } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public org.sonarqube.ws.Common.ComponentOrBuilder getProjectsOrBuilder( int index) { return projects_.get(index); } - public static final int COMPONENTS_FIELD_NUMBER = 5; + public static final int COMPONENTSPRESENTIFEMPTY_FIELD_NUMBER = 10; + private boolean componentsPresentIfEmpty_; + /** + * optional bool componentsPresentIfEmpty = 10; + */ + public boolean hasComponentsPresentIfEmpty() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool componentsPresentIfEmpty = 10; + */ + public boolean getComponentsPresentIfEmpty() { + return componentsPresentIfEmpty_; + } + + public static final int COMPONENTS_FIELD_NUMBER = 11; private java.util.List components_; /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public java.util.List getComponentsList() { return components_; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public java.util.List getComponentsOrBuilderList() { return components_; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public int getComponentsCount() { return components_.size(); } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public org.sonarqube.ws.Common.Component getComponents(int index) { return components_.get(index); } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public org.sonarqube.ws.Common.ComponentOrBuilder getComponentsOrBuilder( int index) { return components_.get(index); } - public static final int RULES_FIELD_NUMBER = 6; + public static final int RULESPRESENTIFEMPTY_FIELD_NUMBER = 12; + private boolean rulesPresentIfEmpty_; + /** + * optional bool rulesPresentIfEmpty = 12; + */ + public boolean hasRulesPresentIfEmpty() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional bool rulesPresentIfEmpty = 12; + */ + public boolean getRulesPresentIfEmpty() { + return rulesPresentIfEmpty_; + } + + public static final int RULES_FIELD_NUMBER = 13; private java.util.List rules_; /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public java.util.List getRulesList() { return rules_; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public java.util.List getRulesOrBuilderList() { return rules_; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public int getRulesCount() { return rules_.size(); } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public org.sonarqube.ws.Common.Rule getRules(int index) { return rules_.get(index); } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public org.sonarqube.ws.Common.RuleOrBuilder getRulesOrBuilder( int index) { return rules_.get(index); } - public static final int USERS_FIELD_NUMBER = 7; + public static final int USERSPRESENTIFEMPTY_FIELD_NUMBER = 14; + private boolean usersPresentIfEmpty_; + /** + * optional bool usersPresentIfEmpty = 14; + */ + public boolean hasUsersPresentIfEmpty() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional bool usersPresentIfEmpty = 14; + */ + public boolean getUsersPresentIfEmpty() { + return usersPresentIfEmpty_; + } + + public static final int USERS_FIELD_NUMBER = 15; private java.util.List users_; /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public java.util.List getUsersList() { return users_; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public java.util.List getUsersOrBuilderList() { return users_; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public int getUsersCount() { return users_.size(); } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public org.sonarqube.ws.Common.User getUsers(int index) { return users_.get(index); } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public org.sonarqube.ws.Common.UserOrBuilder getUsersOrBuilder( int index) { return users_.get(index); } + public static final int ACTIONPLANSPRESENTIFEMPTY_FIELD_NUMBER = 16; + private boolean actionPlansPresentIfEmpty_; + /** + * optional bool actionPlansPresentIfEmpty = 16; + */ + public boolean hasActionPlansPresentIfEmpty() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * optional bool actionPlansPresentIfEmpty = 16; + */ + public boolean getActionPlansPresentIfEmpty() { + return actionPlansPresentIfEmpty_; + } + + public static final int ACTIONPLANS_FIELD_NUMBER = 17; + private java.util.List actionPlans_; + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public java.util.List getActionPlansList() { + return actionPlans_; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public java.util.List + getActionPlansOrBuilderList() { + return actionPlans_; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public int getActionPlansCount() { + return actionPlans_.size(); + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public org.sonarqube.ws.Issues.ActionPlan getActionPlans(int index) { + return actionPlans_.get(index); + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public org.sonarqube.ws.Issues.ActionPlanOrBuilder getActionPlansOrBuilder( + int index) { + return actionPlans_.get(index); + } + + public static final int LANGUAGESPRESENTIFEMPTY_FIELD_NUMBER = 18; + private boolean languagesPresentIfEmpty_; + /** + * optional bool languagesPresentIfEmpty = 18; + */ + public boolean hasLanguagesPresentIfEmpty() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional bool languagesPresentIfEmpty = 18; + */ + public boolean getLanguagesPresentIfEmpty() { + return languagesPresentIfEmpty_; + } + + public static final int LANGUAGES_FIELD_NUMBER = 19; + private java.util.List languages_; + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public java.util.List getLanguagesList() { + return languages_; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public java.util.List + getLanguagesOrBuilderList() { + return languages_; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public int getLanguagesCount() { + return languages_.size(); + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public org.sonarqube.ws.Issues.Language getLanguages(int index) { + return languages_.get(index); + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public org.sonarqube.ws.Issues.LanguageOrBuilder getLanguagesOrBuilder( + int index) { + return languages_.get(index); + } + + public static final int FACETS_FIELD_NUMBER = 20; + private java.util.List facets_; + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public java.util.List getFacetsList() { + return facets_; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public java.util.List + getFacetsOrBuilderList() { + return facets_; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public int getFacetsCount() { + return facets_.size(); + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public org.sonarqube.ws.Common.Facet getFacets(int index) { + return facets_.get(index); + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public org.sonarqube.ws.Common.FacetOrBuilder getFacetsOrBuilder( + int index) { + return facets_.get(index); + } + + public static final int FACETSPRESENTIFEMPTY_FIELD_NUMBER = 21; + private boolean facetsPresentIfEmpty_; + /** + * optional bool facetsPresentIfEmpty = 21; + */ + public boolean hasFacetsPresentIfEmpty() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional bool facetsPresentIfEmpty = 21; + */ + public boolean getFacetsPresentIfEmpty() { + return facetsPresentIfEmpty_; + } + private void initFields() { + total_ = 0L; + p_ = 0L; + ps_ = 0; paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + debtTotal_ = 0L; issues_ = java.util.Collections.emptyList(); - facets_ = java.util.Collections.emptyList(); + projectsPresentIfEmpty_ = false; projects_ = java.util.Collections.emptyList(); + componentsPresentIfEmpty_ = false; components_ = java.util.Collections.emptyList(); + rulesPresentIfEmpty_ = false; rules_ = java.util.Collections.emptyList(); + usersPresentIfEmpty_ = false; users_ = java.util.Collections.emptyList(); + actionPlansPresentIfEmpty_ = false; + actionPlans_ = java.util.Collections.emptyList(); + languagesPresentIfEmpty_ = false; + languages_ = java.util.Collections.emptyList(); + facets_ = java.util.Collections.emptyList(); + facetsPresentIfEmpty_ = false; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -622,25 +1086,64 @@ public final class Issues { throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, paging_); + output.writeInt64(1, total_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, p_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, ps_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(4, paging_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt64(5, debtTotal_); } for (int i = 0; i < issues_.size(); i++) { - output.writeMessage(2, issues_.get(i)); + output.writeMessage(6, issues_.get(i)); } - for (int i = 0; i < facets_.size(); i++) { - output.writeMessage(3, facets_.get(i)); + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBool(8, projectsPresentIfEmpty_); } for (int i = 0; i < projects_.size(); i++) { - output.writeMessage(4, projects_.get(i)); + output.writeMessage(9, projects_.get(i)); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBool(10, componentsPresentIfEmpty_); } for (int i = 0; i < components_.size(); i++) { - output.writeMessage(5, components_.get(i)); + output.writeMessage(11, components_.get(i)); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBool(12, rulesPresentIfEmpty_); } for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(6, rules_.get(i)); + output.writeMessage(13, rules_.get(i)); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBool(14, usersPresentIfEmpty_); } for (int i = 0; i < users_.size(); i++) { - output.writeMessage(7, users_.get(i)); + output.writeMessage(15, users_.get(i)); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeBool(16, actionPlansPresentIfEmpty_); + } + for (int i = 0; i < actionPlans_.size(); i++) { + output.writeMessage(17, actionPlans_.get(i)); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBool(18, languagesPresentIfEmpty_); + } + for (int i = 0; i < languages_.size(); i++) { + output.writeMessage(19, languages_.get(i)); + } + for (int i = 0; i < facets_.size(); i++) { + output.writeMessage(20, facets_.get(i)); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBool(21, facetsPresentIfEmpty_); } getUnknownFields().writeTo(output); } @@ -653,31 +1156,83 @@ public final class Issues { size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, paging_); + .computeInt64Size(1, total_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, p_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, ps_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, paging_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, debtTotal_); } for (int i = 0; i < issues_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, issues_.get(i)); + .computeMessageSize(6, issues_.get(i)); } - for (int i = 0; i < facets_.size(); i++) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, facets_.get(i)); + .computeBoolSize(8, projectsPresentIfEmpty_); } for (int i = 0; i < projects_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, projects_.get(i)); + .computeMessageSize(9, projects_.get(i)); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(10, componentsPresentIfEmpty_); } for (int i = 0; i < components_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, components_.get(i)); + .computeMessageSize(11, components_.get(i)); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(12, rulesPresentIfEmpty_); } for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, rules_.get(i)); + .computeMessageSize(13, rules_.get(i)); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(14, usersPresentIfEmpty_); } for (int i = 0; i < users_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, users_.get(i)); + .computeMessageSize(15, users_.get(i)); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(16, actionPlansPresentIfEmpty_); + } + for (int i = 0; i < actionPlans_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, actionPlans_.get(i)); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(18, languagesPresentIfEmpty_); + } + for (int i = 0; i < languages_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, languages_.get(i)); + } + for (int i = 0; i < facets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, facets_.get(i)); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(21, facetsPresentIfEmpty_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -794,11 +1349,13 @@ public final class Issues { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getPagingFieldBuilder(); getIssuesFieldBuilder(); - getFacetsFieldBuilder(); getProjectsFieldBuilder(); getComponentsFieldBuilder(); getRulesFieldBuilder(); getUsersFieldBuilder(); + getActionPlansFieldBuilder(); + getLanguagesFieldBuilder(); + getFacetsFieldBuilder(); } } private static Builder create() { @@ -807,48 +1364,82 @@ public final class Issues { public Builder clear() { super.clear(); + total_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + p_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + ps_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); if (pagingBuilder_ == null) { paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); } else { pagingBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); + debtTotal_ = 0L; + bitField0_ = (bitField0_ & ~0x00000010); if (issuesBuilder_ == null) { issues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); } else { issuesBuilder_.clear(); } - if (facetsBuilder_ == null) { - facets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - facetsBuilder_.clear(); - } + projectsPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00000040); if (projectsBuilder_ == null) { projects_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000080); } else { projectsBuilder_.clear(); } + componentsPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00000100); if (componentsBuilder_ == null) { components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000200); } else { componentsBuilder_.clear(); } + rulesPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00000400); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000800); } else { rulesBuilder_.clear(); } + usersPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00001000); if (usersBuilder_ == null) { users_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00002000); } else { usersBuilder_.clear(); } + actionPlansPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00004000); + if (actionPlansBuilder_ == null) { + actionPlans_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + } else { + actionPlansBuilder_.clear(); + } + languagesPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00010000); + if (languagesBuilder_ == null) { + languages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + } else { + languagesBuilder_.clear(); + } + if (facetsBuilder_ == null) { + facets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00040000); + } else { + facetsBuilder_.clear(); + } + facetsPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00080000); return this; } @@ -880,65 +1471,127 @@ public final class Issues { if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } + result.total_ = total_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.p_ = p_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.ps_ = ps_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } if (pagingBuilder_ == null) { result.paging_ = paging_; } else { result.paging_ = pagingBuilder_.build(); } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.debtTotal_ = debtTotal_; if (issuesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { issues_ = java.util.Collections.unmodifiableList(issues_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); } result.issues_ = issues_; } else { result.issues_ = issuesBuilder_.build(); } - if (facetsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - facets_ = java.util.Collections.unmodifiableList(facets_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.facets_ = facets_; - } else { - result.facets_ = facetsBuilder_.build(); + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; } + result.projectsPresentIfEmpty_ = projectsPresentIfEmpty_; if (projectsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { projects_ = java.util.Collections.unmodifiableList(projects_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000080); } result.projects_ = projects_; } else { result.projects_ = projectsBuilder_.build(); } + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000040; + } + result.componentsPresentIfEmpty_ = componentsPresentIfEmpty_; if (componentsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000200) == 0x00000200)) { components_ = java.util.Collections.unmodifiableList(components_); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000200); } result.components_ = components_; } else { result.components_ = componentsBuilder_.build(); } + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000080; + } + result.rulesPresentIfEmpty_ = rulesPresentIfEmpty_; if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000800) == 0x00000800)) { rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000800); } result.rules_ = rules_; } else { result.rules_ = rulesBuilder_.build(); } - if (usersBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00000100; + } + result.usersPresentIfEmpty_ = usersPresentIfEmpty_; + if (usersBuilder_ == null) { + if (((bitField0_ & 0x00002000) == 0x00002000)) { users_ = java.util.Collections.unmodifiableList(users_); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00002000); } result.users_ = users_; } else { result.users_ = usersBuilder_.build(); } + if (((from_bitField0_ & 0x00004000) == 0x00004000)) { + to_bitField0_ |= 0x00000200; + } + result.actionPlansPresentIfEmpty_ = actionPlansPresentIfEmpty_; + if (actionPlansBuilder_ == null) { + if (((bitField0_ & 0x00008000) == 0x00008000)) { + actionPlans_ = java.util.Collections.unmodifiableList(actionPlans_); + bitField0_ = (bitField0_ & ~0x00008000); + } + result.actionPlans_ = actionPlans_; + } else { + result.actionPlans_ = actionPlansBuilder_.build(); + } + if (((from_bitField0_ & 0x00010000) == 0x00010000)) { + to_bitField0_ |= 0x00000400; + } + result.languagesPresentIfEmpty_ = languagesPresentIfEmpty_; + if (languagesBuilder_ == null) { + if (((bitField0_ & 0x00020000) == 0x00020000)) { + languages_ = java.util.Collections.unmodifiableList(languages_); + bitField0_ = (bitField0_ & ~0x00020000); + } + result.languages_ = languages_; + } else { + result.languages_ = languagesBuilder_.build(); + } + if (facetsBuilder_ == null) { + if (((bitField0_ & 0x00040000) == 0x00040000)) { + facets_ = java.util.Collections.unmodifiableList(facets_); + bitField0_ = (bitField0_ & ~0x00040000); + } + result.facets_ = facets_; + } else { + result.facets_ = facetsBuilder_.build(); + } + if (((from_bitField0_ & 0x00080000) == 0x00080000)) { + to_bitField0_ |= 0x00000800; + } + result.facetsPresentIfEmpty_ = facetsPresentIfEmpty_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -955,14 +1608,26 @@ public final class Issues { public Builder mergeFrom(org.sonarqube.ws.Issues.Search other) { if (other == org.sonarqube.ws.Issues.Search.getDefaultInstance()) return this; + if (other.hasTotal()) { + setTotal(other.getTotal()); + } + if (other.hasP()) { + setP(other.getP()); + } + if (other.hasPs()) { + setPs(other.getPs()); + } if (other.hasPaging()) { mergePaging(other.getPaging()); } + if (other.hasDebtTotal()) { + setDebtTotal(other.getDebtTotal()); + } if (issuesBuilder_ == null) { if (!other.issues_.isEmpty()) { if (issues_.isEmpty()) { issues_ = other.issues_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureIssuesIsMutable(); issues_.addAll(other.issues_); @@ -975,7 +1640,7 @@ public final class Issues { issuesBuilder_.dispose(); issuesBuilder_ = null; issues_ = other.issues_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); issuesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getIssuesFieldBuilder() : null; @@ -984,37 +1649,14 @@ public final class Issues { } } } - if (facetsBuilder_ == null) { - if (!other.facets_.isEmpty()) { - if (facets_.isEmpty()) { - facets_ = other.facets_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureFacetsIsMutable(); - facets_.addAll(other.facets_); - } - onChanged(); - } - } else { - if (!other.facets_.isEmpty()) { - if (facetsBuilder_.isEmpty()) { - facetsBuilder_.dispose(); - facetsBuilder_ = null; - facets_ = other.facets_; - bitField0_ = (bitField0_ & ~0x00000004); - facetsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getFacetsFieldBuilder() : null; - } else { - facetsBuilder_.addAllMessages(other.facets_); - } - } + if (other.hasProjectsPresentIfEmpty()) { + setProjectsPresentIfEmpty(other.getProjectsPresentIfEmpty()); } if (projectsBuilder_ == null) { if (!other.projects_.isEmpty()) { if (projects_.isEmpty()) { projects_ = other.projects_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureProjectsIsMutable(); projects_.addAll(other.projects_); @@ -1027,7 +1669,7 @@ public final class Issues { projectsBuilder_.dispose(); projectsBuilder_ = null; projects_ = other.projects_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000080); projectsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getProjectsFieldBuilder() : null; @@ -1036,11 +1678,14 @@ public final class Issues { } } } + if (other.hasComponentsPresentIfEmpty()) { + setComponentsPresentIfEmpty(other.getComponentsPresentIfEmpty()); + } if (componentsBuilder_ == null) { if (!other.components_.isEmpty()) { if (components_.isEmpty()) { components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000200); } else { ensureComponentsIsMutable(); components_.addAll(other.components_); @@ -1053,7 +1698,7 @@ public final class Issues { componentsBuilder_.dispose(); componentsBuilder_ = null; components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000200); componentsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getComponentsFieldBuilder() : null; @@ -1062,11 +1707,14 @@ public final class Issues { } } } + if (other.hasRulesPresentIfEmpty()) { + setRulesPresentIfEmpty(other.getRulesPresentIfEmpty()); + } if (rulesBuilder_ == null) { if (!other.rules_.isEmpty()) { if (rules_.isEmpty()) { rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000800); } else { ensureRulesIsMutable(); rules_.addAll(other.rules_); @@ -1079,7 +1727,7 @@ public final class Issues { rulesBuilder_.dispose(); rulesBuilder_ = null; rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000800); rulesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getRulesFieldBuilder() : null; @@ -1088,11 +1736,14 @@ public final class Issues { } } } + if (other.hasUsersPresentIfEmpty()) { + setUsersPresentIfEmpty(other.getUsersPresentIfEmpty()); + } if (usersBuilder_ == null) { if (!other.users_.isEmpty()) { if (users_.isEmpty()) { users_ = other.users_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00002000); } else { ensureUsersIsMutable(); users_.addAll(other.users_); @@ -1105,7 +1756,7 @@ public final class Issues { usersBuilder_.dispose(); usersBuilder_ = null; users_ = other.users_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00002000); usersBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getUsersFieldBuilder() : null; @@ -1114,6 +1765,93 @@ public final class Issues { } } } + if (other.hasActionPlansPresentIfEmpty()) { + setActionPlansPresentIfEmpty(other.getActionPlansPresentIfEmpty()); + } + if (actionPlansBuilder_ == null) { + if (!other.actionPlans_.isEmpty()) { + if (actionPlans_.isEmpty()) { + actionPlans_ = other.actionPlans_; + bitField0_ = (bitField0_ & ~0x00008000); + } else { + ensureActionPlansIsMutable(); + actionPlans_.addAll(other.actionPlans_); + } + onChanged(); + } + } else { + if (!other.actionPlans_.isEmpty()) { + if (actionPlansBuilder_.isEmpty()) { + actionPlansBuilder_.dispose(); + actionPlansBuilder_ = null; + actionPlans_ = other.actionPlans_; + bitField0_ = (bitField0_ & ~0x00008000); + actionPlansBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getActionPlansFieldBuilder() : null; + } else { + actionPlansBuilder_.addAllMessages(other.actionPlans_); + } + } + } + if (other.hasLanguagesPresentIfEmpty()) { + setLanguagesPresentIfEmpty(other.getLanguagesPresentIfEmpty()); + } + if (languagesBuilder_ == null) { + if (!other.languages_.isEmpty()) { + if (languages_.isEmpty()) { + languages_ = other.languages_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureLanguagesIsMutable(); + languages_.addAll(other.languages_); + } + onChanged(); + } + } else { + if (!other.languages_.isEmpty()) { + if (languagesBuilder_.isEmpty()) { + languagesBuilder_.dispose(); + languagesBuilder_ = null; + languages_ = other.languages_; + bitField0_ = (bitField0_ & ~0x00020000); + languagesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLanguagesFieldBuilder() : null; + } else { + languagesBuilder_.addAllMessages(other.languages_); + } + } + } + if (facetsBuilder_ == null) { + if (!other.facets_.isEmpty()) { + if (facets_.isEmpty()) { + facets_ = other.facets_; + bitField0_ = (bitField0_ & ~0x00040000); + } else { + ensureFacetsIsMutable(); + facets_.addAll(other.facets_); + } + onChanged(); + } + } else { + if (!other.facets_.isEmpty()) { + if (facetsBuilder_.isEmpty()) { + facetsBuilder_.dispose(); + facetsBuilder_ = null; + facets_ = other.facets_; + bitField0_ = (bitField0_ & ~0x00040000); + facetsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFacetsFieldBuilder() : null; + } else { + facetsBuilder_.addAllMessages(other.facets_); + } + } + } + if (other.hasFacetsPresentIfEmpty()) { + setFacetsPresentIfEmpty(other.getFacetsPresentIfEmpty()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -1141,25 +1879,113 @@ public final class Issues { } private int bitField0_; + private long total_ ; + /** + * optional int64 total = 1; + */ + public boolean hasTotal() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int64 total = 1; + */ + public long getTotal() { + return total_; + } + /** + * optional int64 total = 1; + */ + public Builder setTotal(long value) { + bitField0_ |= 0x00000001; + total_ = value; + onChanged(); + return this; + } + /** + * optional int64 total = 1; + */ + public Builder clearTotal() { + bitField0_ = (bitField0_ & ~0x00000001); + total_ = 0L; + onChanged(); + return this; + } + + private long p_ ; + /** + * optional int64 p = 2; + */ + public boolean hasP() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int64 p = 2; + */ + public long getP() { + return p_; + } + /** + * optional int64 p = 2; + */ + public Builder setP(long value) { + bitField0_ |= 0x00000002; + p_ = value; + onChanged(); + return this; + } + /** + * optional int64 p = 2; + */ + public Builder clearP() { + bitField0_ = (bitField0_ & ~0x00000002); + p_ = 0L; + onChanged(); + return this; + } + + private int ps_ ; + /** + * optional int32 ps = 3; + */ + public boolean hasPs() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 ps = 3; + */ + public int getPs() { + return ps_; + } + /** + * optional int32 ps = 3; + */ + public Builder setPs(int value) { + bitField0_ |= 0x00000004; + ps_ = value; + onChanged(); + return this; + } + /** + * optional int32 ps = 3; + */ + public Builder clearPs() { + bitField0_ = (bitField0_ & ~0x00000004); + ps_ = 0; + onChanged(); + return this; + } + private org.sonarqube.ws.Common.Paging paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder> pagingBuilder_; /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public boolean hasPaging() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public org.sonarqube.ws.Common.Paging getPaging() { if (pagingBuilder_ == null) { @@ -1169,11 +1995,7 @@ public final class Issues { } } /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public Builder setPaging(org.sonarqube.ws.Common.Paging value) { if (pagingBuilder_ == null) { @@ -1185,15 +2007,11 @@ public final class Issues { } else { pagingBuilder_.setMessage(value); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; return this; } /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public Builder setPaging( org.sonarqube.ws.Common.Paging.Builder builderForValue) { @@ -1203,19 +2021,15 @@ public final class Issues { } else { pagingBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; return this; } /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public Builder mergePaging(org.sonarqube.ws.Common.Paging value) { if (pagingBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && + if (((bitField0_ & 0x00000008) == 0x00000008) && paging_ != org.sonarqube.ws.Common.Paging.getDefaultInstance()) { paging_ = org.sonarqube.ws.Common.Paging.newBuilder(paging_).mergeFrom(value).buildPartial(); @@ -1226,15 +2040,11 @@ public final class Issues { } else { pagingBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; return this; } /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public Builder clearPaging() { if (pagingBuilder_ == null) { @@ -1243,27 +2053,19 @@ public final class Issues { } else { pagingBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); return this; } /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public org.sonarqube.ws.Common.Paging.Builder getPagingBuilder() { - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; onChanged(); return getPagingFieldBuilder().getBuilder(); } /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { if (pagingBuilder_ != null) { @@ -1273,11 +2075,7 @@ public final class Issues { } } /** - * optional .sonarqube.ws.Paging paging = 1; - * - *
-       * TODO errors
-       * 
+ * optional .sonarqube.ws.Paging paging = 4; */ private com.google.protobuf.SingleFieldBuilder< org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder> @@ -1293,12 +2091,60 @@ public final class Issues { return pagingBuilder_; } + private long debtTotal_ ; + /** + * optional int64 debtTotal = 5; + * + *
+       * Total amount of debt, only when the facet "total" is enabled
+       * 
+ */ + public boolean hasDebtTotal() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int64 debtTotal = 5; + * + *
+       * Total amount of debt, only when the facet "total" is enabled
+       * 
+ */ + public long getDebtTotal() { + return debtTotal_; + } + /** + * optional int64 debtTotal = 5; + * + *
+       * Total amount of debt, only when the facet "total" is enabled
+       * 
+ */ + public Builder setDebtTotal(long value) { + bitField0_ |= 0x00000010; + debtTotal_ = value; + onChanged(); + return this; + } + /** + * optional int64 debtTotal = 5; + * + *
+       * Total amount of debt, only when the facet "total" is enabled
+       * 
+ */ + public Builder clearDebtTotal() { + bitField0_ = (bitField0_ & ~0x00000010); + debtTotal_ = 0L; + onChanged(); + return this; + } + private java.util.List issues_ = java.util.Collections.emptyList(); private void ensureIssuesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { issues_ = new java.util.ArrayList(issues_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000020; } } @@ -1306,7 +2152,7 @@ public final class Issues { org.sonarqube.ws.Issues.Issue, org.sonarqube.ws.Issues.Issue.Builder, org.sonarqube.ws.Issues.IssueOrBuilder> issuesBuilder_; /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public java.util.List getIssuesList() { if (issuesBuilder_ == null) { @@ -1316,7 +2162,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public int getIssuesCount() { if (issuesBuilder_ == null) { @@ -1326,7 +2172,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public org.sonarqube.ws.Issues.Issue getIssues(int index) { if (issuesBuilder_ == null) { @@ -1336,7 +2182,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder setIssues( int index, org.sonarqube.ws.Issues.Issue value) { @@ -1353,7 +2199,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder setIssues( int index, org.sonarqube.ws.Issues.Issue.Builder builderForValue) { @@ -1367,7 +2213,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder addIssues(org.sonarqube.ws.Issues.Issue value) { if (issuesBuilder_ == null) { @@ -1383,7 +2229,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder addIssues( int index, org.sonarqube.ws.Issues.Issue value) { @@ -1400,7 +2246,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder addIssues( org.sonarqube.ws.Issues.Issue.Builder builderForValue) { @@ -1414,7 +2260,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder addIssues( int index, org.sonarqube.ws.Issues.Issue.Builder builderForValue) { @@ -1428,7 +2274,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder addAllIssues( java.lang.Iterable values) { @@ -1443,12 +2289,12 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder clearIssues() { if (issuesBuilder_ == null) { issues_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { issuesBuilder_.clear(); @@ -1456,7 +2302,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public Builder removeIssues(int index) { if (issuesBuilder_ == null) { @@ -1469,14 +2315,14 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public org.sonarqube.ws.Issues.Issue.Builder getIssuesBuilder( int index) { return getIssuesFieldBuilder().getBuilder(index); } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public org.sonarqube.ws.Issues.IssueOrBuilder getIssuesOrBuilder( int index) { @@ -1486,7 +2332,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public java.util.List getIssuesOrBuilderList() { @@ -1497,14 +2343,14 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public org.sonarqube.ws.Issues.Issue.Builder addIssuesBuilder() { return getIssuesFieldBuilder().addBuilder( org.sonarqube.ws.Issues.Issue.getDefaultInstance()); } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public org.sonarqube.ws.Issues.Issue.Builder addIssuesBuilder( int index) { @@ -1512,7 +2358,7 @@ public final class Issues { index, org.sonarqube.ws.Issues.Issue.getDefaultInstance()); } /** - * repeated .sonarqube.ws.issues.Issue issues = 2; + * repeated .sonarqube.ws.issues.Issue issues = 6; */ public java.util.List getIssuesBuilderList() { @@ -1525,7 +2371,7 @@ public final class Issues { issuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.sonarqube.ws.Issues.Issue, org.sonarqube.ws.Issues.Issue.Builder, org.sonarqube.ws.Issues.IssueOrBuilder>( issues_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000020) == 0x00000020), getParentForChildren(), isClean()); issues_ = null; @@ -1533,252 +2379,44 @@ public final class Issues { return issuesBuilder_; } - private java.util.List facets_ = - java.util.Collections.emptyList(); - private void ensureFacetsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - facets_ = new java.util.ArrayList(facets_); - bitField0_ |= 0x00000004; - } + private boolean projectsPresentIfEmpty_ ; + /** + * optional bool projectsPresentIfEmpty = 8; + */ + public boolean hasProjectsPresentIfEmpty() { + return ((bitField0_ & 0x00000040) == 0x00000040); } - - private com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Common.Facet, org.sonarqube.ws.Common.Facet.Builder, org.sonarqube.ws.Common.FacetOrBuilder> facetsBuilder_; - /** - * repeated .sonarqube.ws.Facet facets = 3; + * optional bool projectsPresentIfEmpty = 8; */ - public java.util.List getFacetsList() { - if (facetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(facets_); - } else { - return facetsBuilder_.getMessageList(); - } - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public int getFacetsCount() { - if (facetsBuilder_ == null) { - return facets_.size(); - } else { - return facetsBuilder_.getCount(); - } - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public org.sonarqube.ws.Common.Facet getFacets(int index) { - if (facetsBuilder_ == null) { - return facets_.get(index); - } else { - return facetsBuilder_.getMessage(index); - } - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public Builder setFacets( - int index, org.sonarqube.ws.Common.Facet value) { - if (facetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFacetsIsMutable(); - facets_.set(index, value); - onChanged(); - } else { - facetsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public Builder setFacets( - int index, org.sonarqube.ws.Common.Facet.Builder builderForValue) { - if (facetsBuilder_ == null) { - ensureFacetsIsMutable(); - facets_.set(index, builderForValue.build()); - onChanged(); - } else { - facetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public Builder addFacets(org.sonarqube.ws.Common.Facet value) { - if (facetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFacetsIsMutable(); - facets_.add(value); - onChanged(); - } else { - facetsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public Builder addFacets( - int index, org.sonarqube.ws.Common.Facet value) { - if (facetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureFacetsIsMutable(); - facets_.add(index, value); - onChanged(); - } else { - facetsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public Builder addFacets( - org.sonarqube.ws.Common.Facet.Builder builderForValue) { - if (facetsBuilder_ == null) { - ensureFacetsIsMutable(); - facets_.add(builderForValue.build()); - onChanged(); - } else { - facetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public Builder addFacets( - int index, org.sonarqube.ws.Common.Facet.Builder builderForValue) { - if (facetsBuilder_ == null) { - ensureFacetsIsMutable(); - facets_.add(index, builderForValue.build()); - onChanged(); - } else { - facetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public Builder addAllFacets( - java.lang.Iterable values) { - if (facetsBuilder_ == null) { - ensureFacetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, facets_); - onChanged(); - } else { - facetsBuilder_.addAllMessages(values); - } - return this; + public boolean getProjectsPresentIfEmpty() { + return projectsPresentIfEmpty_; } /** - * repeated .sonarqube.ws.Facet facets = 3; + * optional bool projectsPresentIfEmpty = 8; */ - public Builder clearFacets() { - if (facetsBuilder_ == null) { - facets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - facetsBuilder_.clear(); - } + public Builder setProjectsPresentIfEmpty(boolean value) { + bitField0_ |= 0x00000040; + projectsPresentIfEmpty_ = value; + onChanged(); return this; } /** - * repeated .sonarqube.ws.Facet facets = 3; + * optional bool projectsPresentIfEmpty = 8; */ - public Builder removeFacets(int index) { - if (facetsBuilder_ == null) { - ensureFacetsIsMutable(); - facets_.remove(index); - onChanged(); - } else { - facetsBuilder_.remove(index); - } + public Builder clearProjectsPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00000040); + projectsPresentIfEmpty_ = false; + onChanged(); return this; } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public org.sonarqube.ws.Common.Facet.Builder getFacetsBuilder( - int index) { - return getFacetsFieldBuilder().getBuilder(index); - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public org.sonarqube.ws.Common.FacetOrBuilder getFacetsOrBuilder( - int index) { - if (facetsBuilder_ == null) { - return facets_.get(index); } else { - return facetsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public java.util.List - getFacetsOrBuilderList() { - if (facetsBuilder_ != null) { - return facetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(facets_); - } - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public org.sonarqube.ws.Common.Facet.Builder addFacetsBuilder() { - return getFacetsFieldBuilder().addBuilder( - org.sonarqube.ws.Common.Facet.getDefaultInstance()); - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public org.sonarqube.ws.Common.Facet.Builder addFacetsBuilder( - int index) { - return getFacetsFieldBuilder().addBuilder( - index, org.sonarqube.ws.Common.Facet.getDefaultInstance()); - } - /** - * repeated .sonarqube.ws.Facet facets = 3; - */ - public java.util.List - getFacetsBuilderList() { - return getFacetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Common.Facet, org.sonarqube.ws.Common.Facet.Builder, org.sonarqube.ws.Common.FacetOrBuilder> - getFacetsFieldBuilder() { - if (facetsBuilder_ == null) { - facetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Common.Facet, org.sonarqube.ws.Common.Facet.Builder, org.sonarqube.ws.Common.FacetOrBuilder>( - facets_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - facets_ = null; - } - return facetsBuilder_; - } private java.util.List projects_ = java.util.Collections.emptyList(); private void ensureProjectsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { projects_ = new java.util.ArrayList(projects_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000080; } } @@ -1786,7 +2424,7 @@ public final class Issues { org.sonarqube.ws.Common.Component, org.sonarqube.ws.Common.Component.Builder, org.sonarqube.ws.Common.ComponentOrBuilder> projectsBuilder_; /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public java.util.List getProjectsList() { if (projectsBuilder_ == null) { @@ -1796,7 +2434,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public int getProjectsCount() { if (projectsBuilder_ == null) { @@ -1806,7 +2444,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public org.sonarqube.ws.Common.Component getProjects(int index) { if (projectsBuilder_ == null) { @@ -1816,7 +2454,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder setProjects( int index, org.sonarqube.ws.Common.Component value) { @@ -1833,7 +2471,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder setProjects( int index, org.sonarqube.ws.Common.Component.Builder builderForValue) { @@ -1847,7 +2485,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder addProjects(org.sonarqube.ws.Common.Component value) { if (projectsBuilder_ == null) { @@ -1863,7 +2501,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder addProjects( int index, org.sonarqube.ws.Common.Component value) { @@ -1880,7 +2518,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder addProjects( org.sonarqube.ws.Common.Component.Builder builderForValue) { @@ -1894,7 +2532,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder addProjects( int index, org.sonarqube.ws.Common.Component.Builder builderForValue) { @@ -1908,7 +2546,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder addAllProjects( java.lang.Iterable values) { @@ -1923,12 +2561,12 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder clearProjects() { if (projectsBuilder_ == null) { projects_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { projectsBuilder_.clear(); @@ -1936,7 +2574,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public Builder removeProjects(int index) { if (projectsBuilder_ == null) { @@ -1949,14 +2587,14 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public org.sonarqube.ws.Common.Component.Builder getProjectsBuilder( int index) { return getProjectsFieldBuilder().getBuilder(index); } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public org.sonarqube.ws.Common.ComponentOrBuilder getProjectsOrBuilder( int index) { @@ -1966,7 +2604,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public java.util.List getProjectsOrBuilderList() { @@ -1977,14 +2615,14 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public org.sonarqube.ws.Common.Component.Builder addProjectsBuilder() { return getProjectsFieldBuilder().addBuilder( org.sonarqube.ws.Common.Component.getDefaultInstance()); } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public org.sonarqube.ws.Common.Component.Builder addProjectsBuilder( int index) { @@ -1992,7 +2630,7 @@ public final class Issues { index, org.sonarqube.ws.Common.Component.getDefaultInstance()); } /** - * repeated .sonarqube.ws.Component projects = 4; + * repeated .sonarqube.ws.Component projects = 9; */ public java.util.List getProjectsBuilderList() { @@ -2005,7 +2643,7 @@ public final class Issues { projectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.sonarqube.ws.Common.Component, org.sonarqube.ws.Common.Component.Builder, org.sonarqube.ws.Common.ComponentOrBuilder>( projects_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000080) == 0x00000080), getParentForChildren(), isClean()); projects_ = null; @@ -2013,12 +2651,44 @@ public final class Issues { return projectsBuilder_; } + private boolean componentsPresentIfEmpty_ ; + /** + * optional bool componentsPresentIfEmpty = 10; + */ + public boolean hasComponentsPresentIfEmpty() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional bool componentsPresentIfEmpty = 10; + */ + public boolean getComponentsPresentIfEmpty() { + return componentsPresentIfEmpty_; + } + /** + * optional bool componentsPresentIfEmpty = 10; + */ + public Builder setComponentsPresentIfEmpty(boolean value) { + bitField0_ |= 0x00000100; + componentsPresentIfEmpty_ = value; + onChanged(); + return this; + } + /** + * optional bool componentsPresentIfEmpty = 10; + */ + public Builder clearComponentsPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00000100); + componentsPresentIfEmpty_ = false; + onChanged(); + return this; + } + private java.util.List components_ = java.util.Collections.emptyList(); private void ensureComponentsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000200) == 0x00000200)) { components_ = new java.util.ArrayList(components_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000200; } } @@ -2026,7 +2696,7 @@ public final class Issues { org.sonarqube.ws.Common.Component, org.sonarqube.ws.Common.Component.Builder, org.sonarqube.ws.Common.ComponentOrBuilder> componentsBuilder_; /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public java.util.List getComponentsList() { if (componentsBuilder_ == null) { @@ -2036,7 +2706,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public int getComponentsCount() { if (componentsBuilder_ == null) { @@ -2046,7 +2716,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public org.sonarqube.ws.Common.Component getComponents(int index) { if (componentsBuilder_ == null) { @@ -2056,7 +2726,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder setComponents( int index, org.sonarqube.ws.Common.Component value) { @@ -2073,7 +2743,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder setComponents( int index, org.sonarqube.ws.Common.Component.Builder builderForValue) { @@ -2087,7 +2757,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder addComponents(org.sonarqube.ws.Common.Component value) { if (componentsBuilder_ == null) { @@ -2103,7 +2773,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder addComponents( int index, org.sonarqube.ws.Common.Component value) { @@ -2120,7 +2790,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder addComponents( org.sonarqube.ws.Common.Component.Builder builderForValue) { @@ -2134,7 +2804,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder addComponents( int index, org.sonarqube.ws.Common.Component.Builder builderForValue) { @@ -2148,7 +2818,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder addAllComponents( java.lang.Iterable values) { @@ -2163,12 +2833,12 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder clearComponents() { if (componentsBuilder_ == null) { components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); } else { componentsBuilder_.clear(); @@ -2176,7 +2846,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public Builder removeComponents(int index) { if (componentsBuilder_ == null) { @@ -2189,14 +2859,14 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public org.sonarqube.ws.Common.Component.Builder getComponentsBuilder( int index) { return getComponentsFieldBuilder().getBuilder(index); } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public org.sonarqube.ws.Common.ComponentOrBuilder getComponentsOrBuilder( int index) { @@ -2206,7 +2876,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public java.util.List getComponentsOrBuilderList() { @@ -2217,14 +2887,14 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public org.sonarqube.ws.Common.Component.Builder addComponentsBuilder() { return getComponentsFieldBuilder().addBuilder( org.sonarqube.ws.Common.Component.getDefaultInstance()); } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public org.sonarqube.ws.Common.Component.Builder addComponentsBuilder( int index) { @@ -2232,7 +2902,7 @@ public final class Issues { index, org.sonarqube.ws.Common.Component.getDefaultInstance()); } /** - * repeated .sonarqube.ws.Component components = 5; + * repeated .sonarqube.ws.Component components = 11; */ public java.util.List getComponentsBuilderList() { @@ -2245,7 +2915,7 @@ public final class Issues { componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.sonarqube.ws.Common.Component, org.sonarqube.ws.Common.Component.Builder, org.sonarqube.ws.Common.ComponentOrBuilder>( components_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000200) == 0x00000200), getParentForChildren(), isClean()); components_ = null; @@ -2253,12 +2923,44 @@ public final class Issues { return componentsBuilder_; } + private boolean rulesPresentIfEmpty_ ; + /** + * optional bool rulesPresentIfEmpty = 12; + */ + public boolean hasRulesPresentIfEmpty() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * optional bool rulesPresentIfEmpty = 12; + */ + public boolean getRulesPresentIfEmpty() { + return rulesPresentIfEmpty_; + } + /** + * optional bool rulesPresentIfEmpty = 12; + */ + public Builder setRulesPresentIfEmpty(boolean value) { + bitField0_ |= 0x00000400; + rulesPresentIfEmpty_ = value; + onChanged(); + return this; + } + /** + * optional bool rulesPresentIfEmpty = 12; + */ + public Builder clearRulesPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00000400); + rulesPresentIfEmpty_ = false; + onChanged(); + return this; + } + private java.util.List rules_ = java.util.Collections.emptyList(); private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000800) == 0x00000800)) { rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000800; } } @@ -2266,7 +2968,7 @@ public final class Issues { org.sonarqube.ws.Common.Rule, org.sonarqube.ws.Common.Rule.Builder, org.sonarqube.ws.Common.RuleOrBuilder> rulesBuilder_; /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public java.util.List getRulesList() { if (rulesBuilder_ == null) { @@ -2276,7 +2978,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public int getRulesCount() { if (rulesBuilder_ == null) { @@ -2286,7 +2988,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public org.sonarqube.ws.Common.Rule getRules(int index) { if (rulesBuilder_ == null) { @@ -2296,7 +2998,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder setRules( int index, org.sonarqube.ws.Common.Rule value) { @@ -2313,7 +3015,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder setRules( int index, org.sonarqube.ws.Common.Rule.Builder builderForValue) { @@ -2327,7 +3029,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder addRules(org.sonarqube.ws.Common.Rule value) { if (rulesBuilder_ == null) { @@ -2343,7 +3045,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder addRules( int index, org.sonarqube.ws.Common.Rule value) { @@ -2360,7 +3062,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder addRules( org.sonarqube.ws.Common.Rule.Builder builderForValue) { @@ -2374,7 +3076,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder addRules( int index, org.sonarqube.ws.Common.Rule.Builder builderForValue) { @@ -2388,7 +3090,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder addAllRules( java.lang.Iterable values) { @@ -2403,12 +3105,12 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder clearRules() { if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); } else { rulesBuilder_.clear(); @@ -2416,7 +3118,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public Builder removeRules(int index) { if (rulesBuilder_ == null) { @@ -2429,14 +3131,14 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public org.sonarqube.ws.Common.Rule.Builder getRulesBuilder( int index) { return getRulesFieldBuilder().getBuilder(index); } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public org.sonarqube.ws.Common.RuleOrBuilder getRulesOrBuilder( int index) { @@ -2446,7 +3148,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public java.util.List getRulesOrBuilderList() { @@ -2457,14 +3159,14 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public org.sonarqube.ws.Common.Rule.Builder addRulesBuilder() { return getRulesFieldBuilder().addBuilder( org.sonarqube.ws.Common.Rule.getDefaultInstance()); } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public org.sonarqube.ws.Common.Rule.Builder addRulesBuilder( int index) { @@ -2472,7 +3174,7 @@ public final class Issues { index, org.sonarqube.ws.Common.Rule.getDefaultInstance()); } /** - * repeated .sonarqube.ws.Rule rules = 6; + * repeated .sonarqube.ws.Rule rules = 13; */ public java.util.List getRulesBuilderList() { @@ -2485,7 +3187,7 @@ public final class Issues { rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.sonarqube.ws.Common.Rule, org.sonarqube.ws.Common.Rule.Builder, org.sonarqube.ws.Common.RuleOrBuilder>( rules_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000800) == 0x00000800), getParentForChildren(), isClean()); rules_ = null; @@ -2493,22 +3195,54 @@ public final class Issues { return rulesBuilder_; } - private java.util.List users_ = - java.util.Collections.emptyList(); - private void ensureUsersIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - users_ = new java.util.ArrayList(users_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Common.User, org.sonarqube.ws.Common.User.Builder, org.sonarqube.ws.Common.UserOrBuilder> usersBuilder_; - + private boolean usersPresentIfEmpty_ ; /** - * repeated .sonarqube.ws.User users = 7; + * optional bool usersPresentIfEmpty = 14; */ - public java.util.List getUsersList() { + public boolean hasUsersPresentIfEmpty() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional bool usersPresentIfEmpty = 14; + */ + public boolean getUsersPresentIfEmpty() { + return usersPresentIfEmpty_; + } + /** + * optional bool usersPresentIfEmpty = 14; + */ + public Builder setUsersPresentIfEmpty(boolean value) { + bitField0_ |= 0x00001000; + usersPresentIfEmpty_ = value; + onChanged(); + return this; + } + /** + * optional bool usersPresentIfEmpty = 14; + */ + public Builder clearUsersPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00001000); + usersPresentIfEmpty_ = false; + onChanged(); + return this; + } + + private java.util.List users_ = + java.util.Collections.emptyList(); + private void ensureUsersIsMutable() { + if (!((bitField0_ & 0x00002000) == 0x00002000)) { + users_ = new java.util.ArrayList(users_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Common.User, org.sonarqube.ws.Common.User.Builder, org.sonarqube.ws.Common.UserOrBuilder> usersBuilder_; + + /** + * repeated .sonarqube.ws.User users = 15; + */ + public java.util.List getUsersList() { if (usersBuilder_ == null) { return java.util.Collections.unmodifiableList(users_); } else { @@ -2516,7 +3250,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public int getUsersCount() { if (usersBuilder_ == null) { @@ -2526,7 +3260,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public org.sonarqube.ws.Common.User getUsers(int index) { if (usersBuilder_ == null) { @@ -2536,7 +3270,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder setUsers( int index, org.sonarqube.ws.Common.User value) { @@ -2553,7 +3287,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder setUsers( int index, org.sonarqube.ws.Common.User.Builder builderForValue) { @@ -2567,7 +3301,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder addUsers(org.sonarqube.ws.Common.User value) { if (usersBuilder_ == null) { @@ -2583,7 +3317,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder addUsers( int index, org.sonarqube.ws.Common.User value) { @@ -2600,7 +3334,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder addUsers( org.sonarqube.ws.Common.User.Builder builderForValue) { @@ -2614,7 +3348,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder addUsers( int index, org.sonarqube.ws.Common.User.Builder builderForValue) { @@ -2628,7 +3362,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder addAllUsers( java.lang.Iterable values) { @@ -2643,12 +3377,12 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder clearUsers() { if (usersBuilder_ == null) { users_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); } else { usersBuilder_.clear(); @@ -2656,7 +3390,7 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public Builder removeUsers(int index) { if (usersBuilder_ == null) { @@ -2669,14 +3403,14 @@ public final class Issues { return this; } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public org.sonarqube.ws.Common.User.Builder getUsersBuilder( int index) { return getUsersFieldBuilder().getBuilder(index); } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public org.sonarqube.ws.Common.UserOrBuilder getUsersOrBuilder( int index) { @@ -2686,7 +3420,7 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public java.util.List getUsersOrBuilderList() { @@ -2697,14 +3431,14 @@ public final class Issues { } } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public org.sonarqube.ws.Common.User.Builder addUsersBuilder() { return getUsersFieldBuilder().addBuilder( org.sonarqube.ws.Common.User.getDefaultInstance()); } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public org.sonarqube.ws.Common.User.Builder addUsersBuilder( int index) { @@ -2712,7 +3446,7 @@ public final class Issues { index, org.sonarqube.ws.Common.User.getDefaultInstance()); } /** - * repeated .sonarqube.ws.User users = 7; + * repeated .sonarqube.ws.User users = 15; */ public java.util.List getUsersBuilderList() { @@ -2725,7 +3459,7 @@ public final class Issues { usersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.sonarqube.ws.Common.User, org.sonarqube.ws.Common.User.Builder, org.sonarqube.ws.Common.UserOrBuilder>( users_, - ((bitField0_ & 0x00000040) == 0x00000040), + ((bitField0_ & 0x00002000) == 0x00002000), getParentForChildren(), isClean()); users_ = null; @@ -2733,99 +3467,910 @@ public final class Issues { return usersBuilder_; } - // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Search) - } - - static { - defaultInstance = new Search(true); - defaultInstance.initFields(); - } + private boolean actionPlansPresentIfEmpty_ ; + /** + * optional bool actionPlansPresentIfEmpty = 16; + */ + public boolean hasActionPlansPresentIfEmpty() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional bool actionPlansPresentIfEmpty = 16; + */ + public boolean getActionPlansPresentIfEmpty() { + return actionPlansPresentIfEmpty_; + } + /** + * optional bool actionPlansPresentIfEmpty = 16; + */ + public Builder setActionPlansPresentIfEmpty(boolean value) { + bitField0_ |= 0x00004000; + actionPlansPresentIfEmpty_ = value; + onChanged(); + return this; + } + /** + * optional bool actionPlansPresentIfEmpty = 16; + */ + public Builder clearActionPlansPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00004000); + actionPlansPresentIfEmpty_ = false; + onChanged(); + return this; + } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Search) - } + private java.util.List actionPlans_ = + java.util.Collections.emptyList(); + private void ensureActionPlansIsMutable() { + if (!((bitField0_ & 0x00008000) == 0x00008000)) { + actionPlans_ = new java.util.ArrayList(actionPlans_); + bitField0_ |= 0x00008000; + } + } - public interface IssueOrBuilder extends - // @@protoc_insertion_point(interface_extends:sonarqube.ws.issues.Issue) - com.google.protobuf.MessageOrBuilder { + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.ActionPlan, org.sonarqube.ws.Issues.ActionPlan.Builder, org.sonarqube.ws.Issues.ActionPlanOrBuilder> actionPlansBuilder_; - /** - * optional string key = 1; - */ - boolean hasKey(); - /** - * optional string key = 1; - */ - java.lang.String getKey(); - /** - * optional string key = 1; - */ - com.google.protobuf.ByteString - getKeyBytes(); + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public java.util.List getActionPlansList() { + if (actionPlansBuilder_ == null) { + return java.util.Collections.unmodifiableList(actionPlans_); + } else { + return actionPlansBuilder_.getMessageList(); + } + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public int getActionPlansCount() { + if (actionPlansBuilder_ == null) { + return actionPlans_.size(); + } else { + return actionPlansBuilder_.getCount(); + } + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public org.sonarqube.ws.Issues.ActionPlan getActionPlans(int index) { + if (actionPlansBuilder_ == null) { + return actionPlans_.get(index); + } else { + return actionPlansBuilder_.getMessage(index); + } + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder setActionPlans( + int index, org.sonarqube.ws.Issues.ActionPlan value) { + if (actionPlansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionPlansIsMutable(); + actionPlans_.set(index, value); + onChanged(); + } else { + actionPlansBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder setActionPlans( + int index, org.sonarqube.ws.Issues.ActionPlan.Builder builderForValue) { + if (actionPlansBuilder_ == null) { + ensureActionPlansIsMutable(); + actionPlans_.set(index, builderForValue.build()); + onChanged(); + } else { + actionPlansBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder addActionPlans(org.sonarqube.ws.Issues.ActionPlan value) { + if (actionPlansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionPlansIsMutable(); + actionPlans_.add(value); + onChanged(); + } else { + actionPlansBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder addActionPlans( + int index, org.sonarqube.ws.Issues.ActionPlan value) { + if (actionPlansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionPlansIsMutable(); + actionPlans_.add(index, value); + onChanged(); + } else { + actionPlansBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder addActionPlans( + org.sonarqube.ws.Issues.ActionPlan.Builder builderForValue) { + if (actionPlansBuilder_ == null) { + ensureActionPlansIsMutable(); + actionPlans_.add(builderForValue.build()); + onChanged(); + } else { + actionPlansBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder addActionPlans( + int index, org.sonarqube.ws.Issues.ActionPlan.Builder builderForValue) { + if (actionPlansBuilder_ == null) { + ensureActionPlansIsMutable(); + actionPlans_.add(index, builderForValue.build()); + onChanged(); + } else { + actionPlansBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder addAllActionPlans( + java.lang.Iterable values) { + if (actionPlansBuilder_ == null) { + ensureActionPlansIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actionPlans_); + onChanged(); + } else { + actionPlansBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder clearActionPlans() { + if (actionPlansBuilder_ == null) { + actionPlans_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + } else { + actionPlansBuilder_.clear(); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public Builder removeActionPlans(int index) { + if (actionPlansBuilder_ == null) { + ensureActionPlansIsMutable(); + actionPlans_.remove(index); + onChanged(); + } else { + actionPlansBuilder_.remove(index); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public org.sonarqube.ws.Issues.ActionPlan.Builder getActionPlansBuilder( + int index) { + return getActionPlansFieldBuilder().getBuilder(index); + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public org.sonarqube.ws.Issues.ActionPlanOrBuilder getActionPlansOrBuilder( + int index) { + if (actionPlansBuilder_ == null) { + return actionPlans_.get(index); } else { + return actionPlansBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public java.util.List + getActionPlansOrBuilderList() { + if (actionPlansBuilder_ != null) { + return actionPlansBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actionPlans_); + } + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public org.sonarqube.ws.Issues.ActionPlan.Builder addActionPlansBuilder() { + return getActionPlansFieldBuilder().addBuilder( + org.sonarqube.ws.Issues.ActionPlan.getDefaultInstance()); + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public org.sonarqube.ws.Issues.ActionPlan.Builder addActionPlansBuilder( + int index) { + return getActionPlansFieldBuilder().addBuilder( + index, org.sonarqube.ws.Issues.ActionPlan.getDefaultInstance()); + } + /** + * repeated .sonarqube.ws.issues.ActionPlan actionPlans = 17; + */ + public java.util.List + getActionPlansBuilderList() { + return getActionPlansFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.ActionPlan, org.sonarqube.ws.Issues.ActionPlan.Builder, org.sonarqube.ws.Issues.ActionPlanOrBuilder> + getActionPlansFieldBuilder() { + if (actionPlansBuilder_ == null) { + actionPlansBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.ActionPlan, org.sonarqube.ws.Issues.ActionPlan.Builder, org.sonarqube.ws.Issues.ActionPlanOrBuilder>( + actionPlans_, + ((bitField0_ & 0x00008000) == 0x00008000), + getParentForChildren(), + isClean()); + actionPlans_ = null; + } + return actionPlansBuilder_; + } - /** - * optional string rule = 2; - */ - boolean hasRule(); - /** - * optional string rule = 2; - */ - java.lang.String getRule(); - /** - * optional string rule = 2; - */ - com.google.protobuf.ByteString - getRuleBytes(); + private boolean languagesPresentIfEmpty_ ; + /** + * optional bool languagesPresentIfEmpty = 18; + */ + public boolean hasLanguagesPresentIfEmpty() { + return ((bitField0_ & 0x00010000) == 0x00010000); + } + /** + * optional bool languagesPresentIfEmpty = 18; + */ + public boolean getLanguagesPresentIfEmpty() { + return languagesPresentIfEmpty_; + } + /** + * optional bool languagesPresentIfEmpty = 18; + */ + public Builder setLanguagesPresentIfEmpty(boolean value) { + bitField0_ |= 0x00010000; + languagesPresentIfEmpty_ = value; + onChanged(); + return this; + } + /** + * optional bool languagesPresentIfEmpty = 18; + */ + public Builder clearLanguagesPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00010000); + languagesPresentIfEmpty_ = false; + onChanged(); + return this; + } - /** - * optional string component = 3; - */ - boolean hasComponent(); - /** - * optional string component = 3; - */ - java.lang.String getComponent(); - /** - * optional string component = 3; - */ - com.google.protobuf.ByteString - getComponentBytes(); + private java.util.List languages_ = + java.util.Collections.emptyList(); + private void ensureLanguagesIsMutable() { + if (!((bitField0_ & 0x00020000) == 0x00020000)) { + languages_ = new java.util.ArrayList(languages_); + bitField0_ |= 0x00020000; + } + } - /** - * optional int32 componentId = 4; - */ - boolean hasComponentId(); - /** - * optional int32 componentId = 4; - */ - int getComponentId(); + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.Language, org.sonarqube.ws.Issues.Language.Builder, org.sonarqube.ws.Issues.LanguageOrBuilder> languagesBuilder_; + + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public java.util.List getLanguagesList() { + if (languagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(languages_); + } else { + return languagesBuilder_.getMessageList(); + } + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public int getLanguagesCount() { + if (languagesBuilder_ == null) { + return languages_.size(); + } else { + return languagesBuilder_.getCount(); + } + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public org.sonarqube.ws.Issues.Language getLanguages(int index) { + if (languagesBuilder_ == null) { + return languages_.get(index); + } else { + return languagesBuilder_.getMessage(index); + } + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder setLanguages( + int index, org.sonarqube.ws.Issues.Language value) { + if (languagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguagesIsMutable(); + languages_.set(index, value); + onChanged(); + } else { + languagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder setLanguages( + int index, org.sonarqube.ws.Issues.Language.Builder builderForValue) { + if (languagesBuilder_ == null) { + ensureLanguagesIsMutable(); + languages_.set(index, builderForValue.build()); + onChanged(); + } else { + languagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder addLanguages(org.sonarqube.ws.Issues.Language value) { + if (languagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguagesIsMutable(); + languages_.add(value); + onChanged(); + } else { + languagesBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder addLanguages( + int index, org.sonarqube.ws.Issues.Language value) { + if (languagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLanguagesIsMutable(); + languages_.add(index, value); + onChanged(); + } else { + languagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder addLanguages( + org.sonarqube.ws.Issues.Language.Builder builderForValue) { + if (languagesBuilder_ == null) { + ensureLanguagesIsMutable(); + languages_.add(builderForValue.build()); + onChanged(); + } else { + languagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder addLanguages( + int index, org.sonarqube.ws.Issues.Language.Builder builderForValue) { + if (languagesBuilder_ == null) { + ensureLanguagesIsMutable(); + languages_.add(index, builderForValue.build()); + onChanged(); + } else { + languagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder addAllLanguages( + java.lang.Iterable values) { + if (languagesBuilder_ == null) { + ensureLanguagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, languages_); + onChanged(); + } else { + languagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder clearLanguages() { + if (languagesBuilder_ == null) { + languages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + } else { + languagesBuilder_.clear(); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public Builder removeLanguages(int index) { + if (languagesBuilder_ == null) { + ensureLanguagesIsMutable(); + languages_.remove(index); + onChanged(); + } else { + languagesBuilder_.remove(index); + } + return this; + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public org.sonarqube.ws.Issues.Language.Builder getLanguagesBuilder( + int index) { + return getLanguagesFieldBuilder().getBuilder(index); + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public org.sonarqube.ws.Issues.LanguageOrBuilder getLanguagesOrBuilder( + int index) { + if (languagesBuilder_ == null) { + return languages_.get(index); } else { + return languagesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public java.util.List + getLanguagesOrBuilderList() { + if (languagesBuilder_ != null) { + return languagesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(languages_); + } + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public org.sonarqube.ws.Issues.Language.Builder addLanguagesBuilder() { + return getLanguagesFieldBuilder().addBuilder( + org.sonarqube.ws.Issues.Language.getDefaultInstance()); + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public org.sonarqube.ws.Issues.Language.Builder addLanguagesBuilder( + int index) { + return getLanguagesFieldBuilder().addBuilder( + index, org.sonarqube.ws.Issues.Language.getDefaultInstance()); + } + /** + * repeated .sonarqube.ws.issues.Language languages = 19; + */ + public java.util.List + getLanguagesBuilderList() { + return getLanguagesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.Language, org.sonarqube.ws.Issues.Language.Builder, org.sonarqube.ws.Issues.LanguageOrBuilder> + getLanguagesFieldBuilder() { + if (languagesBuilder_ == null) { + languagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.Language, org.sonarqube.ws.Issues.Language.Builder, org.sonarqube.ws.Issues.LanguageOrBuilder>( + languages_, + ((bitField0_ & 0x00020000) == 0x00020000), + getParentForChildren(), + isClean()); + languages_ = null; + } + return languagesBuilder_; + } + + private java.util.List facets_ = + java.util.Collections.emptyList(); + private void ensureFacetsIsMutable() { + if (!((bitField0_ & 0x00040000) == 0x00040000)) { + facets_ = new java.util.ArrayList(facets_); + bitField0_ |= 0x00040000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Common.Facet, org.sonarqube.ws.Common.Facet.Builder, org.sonarqube.ws.Common.FacetOrBuilder> facetsBuilder_; + + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public java.util.List getFacetsList() { + if (facetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(facets_); + } else { + return facetsBuilder_.getMessageList(); + } + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public int getFacetsCount() { + if (facetsBuilder_ == null) { + return facets_.size(); + } else { + return facetsBuilder_.getCount(); + } + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public org.sonarqube.ws.Common.Facet getFacets(int index) { + if (facetsBuilder_ == null) { + return facets_.get(index); + } else { + return facetsBuilder_.getMessage(index); + } + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder setFacets( + int index, org.sonarqube.ws.Common.Facet value) { + if (facetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetsIsMutable(); + facets_.set(index, value); + onChanged(); + } else { + facetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder setFacets( + int index, org.sonarqube.ws.Common.Facet.Builder builderForValue) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.set(index, builderForValue.build()); + onChanged(); + } else { + facetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder addFacets(org.sonarqube.ws.Common.Facet value) { + if (facetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetsIsMutable(); + facets_.add(value); + onChanged(); + } else { + facetsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder addFacets( + int index, org.sonarqube.ws.Common.Facet value) { + if (facetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFacetsIsMutable(); + facets_.add(index, value); + onChanged(); + } else { + facetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder addFacets( + org.sonarqube.ws.Common.Facet.Builder builderForValue) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.add(builderForValue.build()); + onChanged(); + } else { + facetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder addFacets( + int index, org.sonarqube.ws.Common.Facet.Builder builderForValue) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.add(index, builderForValue.build()); + onChanged(); + } else { + facetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder addAllFacets( + java.lang.Iterable values) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, facets_); + onChanged(); + } else { + facetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder clearFacets() { + if (facetsBuilder_ == null) { + facets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00040000); + onChanged(); + } else { + facetsBuilder_.clear(); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public Builder removeFacets(int index) { + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.remove(index); + onChanged(); + } else { + facetsBuilder_.remove(index); + } + return this; + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public org.sonarqube.ws.Common.Facet.Builder getFacetsBuilder( + int index) { + return getFacetsFieldBuilder().getBuilder(index); + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public org.sonarqube.ws.Common.FacetOrBuilder getFacetsOrBuilder( + int index) { + if (facetsBuilder_ == null) { + return facets_.get(index); } else { + return facetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public java.util.List + getFacetsOrBuilderList() { + if (facetsBuilder_ != null) { + return facetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(facets_); + } + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public org.sonarqube.ws.Common.Facet.Builder addFacetsBuilder() { + return getFacetsFieldBuilder().addBuilder( + org.sonarqube.ws.Common.Facet.getDefaultInstance()); + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public org.sonarqube.ws.Common.Facet.Builder addFacetsBuilder( + int index) { + return getFacetsFieldBuilder().addBuilder( + index, org.sonarqube.ws.Common.Facet.getDefaultInstance()); + } + /** + * repeated .sonarqube.ws.Facet facets = 20; + */ + public java.util.List + getFacetsBuilderList() { + return getFacetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Common.Facet, org.sonarqube.ws.Common.Facet.Builder, org.sonarqube.ws.Common.FacetOrBuilder> + getFacetsFieldBuilder() { + if (facetsBuilder_ == null) { + facetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Common.Facet, org.sonarqube.ws.Common.Facet.Builder, org.sonarqube.ws.Common.FacetOrBuilder>( + facets_, + ((bitField0_ & 0x00040000) == 0x00040000), + getParentForChildren(), + isClean()); + facets_ = null; + } + return facetsBuilder_; + } + + private boolean facetsPresentIfEmpty_ ; + /** + * optional bool facetsPresentIfEmpty = 21; + */ + public boolean hasFacetsPresentIfEmpty() { + return ((bitField0_ & 0x00080000) == 0x00080000); + } + /** + * optional bool facetsPresentIfEmpty = 21; + */ + public boolean getFacetsPresentIfEmpty() { + return facetsPresentIfEmpty_; + } + /** + * optional bool facetsPresentIfEmpty = 21; + */ + public Builder setFacetsPresentIfEmpty(boolean value) { + bitField0_ |= 0x00080000; + facetsPresentIfEmpty_ = value; + onChanged(); + return this; + } + /** + * optional bool facetsPresentIfEmpty = 21; + */ + public Builder clearFacetsPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00080000); + facetsPresentIfEmpty_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Search) + } + + static { + defaultInstance = new Search(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Search) + } + + public interface IssueOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.issues.Issue) + com.google.protobuf.MessageOrBuilder { + + /** + * 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 rule = 2; + */ + boolean hasRule(); + /** + * optional string rule = 2; + */ + java.lang.String getRule(); + /** + * optional string rule = 2; + */ + com.google.protobuf.ByteString + getRuleBytes(); + + /** + * optional .sonarqube.ws.Severity severity = 3; + */ + boolean hasSeverity(); + /** + * optional .sonarqube.ws.Severity severity = 3; + */ + org.sonarqube.ws.Common.Severity getSeverity(); + + /** + * optional string component = 4; + */ + boolean hasComponent(); + /** + * optional string component = 4; + */ + java.lang.String getComponent(); + /** + * optional string component = 4; + */ + com.google.protobuf.ByteString + getComponentBytes(); /** - * optional string project = 5; - */ - boolean hasProject(); - /** - * optional string project = 5; - */ - java.lang.String getProject(); - /** - * optional string project = 5; + * optional int64 componentId = 5; */ - com.google.protobuf.ByteString - getProjectBytes(); + boolean hasComponentId(); + /** + * optional int64 componentId = 5; + */ + long getComponentId(); /** - * optional string subProject = 6; + * optional string project = 6; */ - boolean hasSubProject(); + boolean hasProject(); /** - * optional string subProject = 6; + * optional string project = 6; */ - java.lang.String getSubProject(); + java.lang.String getProject(); /** - * optional string subProject = 6; + * optional string project = 6; */ com.google.protobuf.ByteString - getSubProjectBytes(); + getProjectBytes(); /** * optional int32 line = 7; @@ -2921,18 +4466,30 @@ public final class Issues { getReporterBytes(); /** - * optional string scmAuthor = 14; + * optional string author = 14; + * + *
+     * SCM login of the committer who introduced the issue
+     * 
*/ - boolean hasScmAuthor(); + boolean hasAuthor(); /** - * optional string scmAuthor = 14; + * optional string author = 14; + * + *
+     * SCM login of the committer who introduced the issue
+     * 
*/ - java.lang.String getScmAuthor(); + java.lang.String getAuthor(); /** - * optional string scmAuthor = 14; + * optional string author = 14; + * + *
+     * SCM login of the committer who introduced the issue
+     * 
*/ com.google.protobuf.ByteString - getScmAuthorBytes(); + getAuthorBytes(); /** * optional string actionPlan = 15; @@ -2996,119 +4553,162 @@ public final class Issues { getTagsBytes(int index); /** - * repeated string transitions = 19; + * optional bool transitionsPresentIfEmpty = 19; + * + *
+     * the transitions allowed for the requesting user.
+     * 
+ */ + boolean hasTransitionsPresentIfEmpty(); + /** + * optional bool transitionsPresentIfEmpty = 19; + * + *
+     * the transitions allowed for the requesting user.
+     * 
+ */ + boolean getTransitionsPresentIfEmpty(); + + /** + * repeated string transitions = 20; */ com.google.protobuf.ProtocolStringList getTransitionsList(); /** - * repeated string transitions = 19; + * repeated string transitions = 20; */ int getTransitionsCount(); /** - * repeated string transitions = 19; + * repeated string transitions = 20; */ java.lang.String getTransitions(int index); /** - * repeated string transitions = 19; + * repeated string transitions = 20; */ com.google.protobuf.ByteString getTransitionsBytes(int index); /** - * repeated string actions = 20; + * optional bool actionsPresentIfEmpty = 21; + * + *
+     * the actions allowed for the requesting user.
+     * 
+ */ + boolean hasActionsPresentIfEmpty(); + /** + * optional bool actionsPresentIfEmpty = 21; + * + *
+     * the actions allowed for the requesting user.
+     * 
+ */ + boolean getActionsPresentIfEmpty(); + + /** + * repeated string actions = 22; */ com.google.protobuf.ProtocolStringList getActionsList(); /** - * repeated string actions = 20; + * repeated string actions = 22; */ int getActionsCount(); /** - * repeated string actions = 20; + * repeated string actions = 22; */ java.lang.String getActions(int index); /** - * repeated string actions = 20; + * repeated string actions = 22; */ com.google.protobuf.ByteString getActionsBytes(int index); /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional bool commentsPresentIfEmpty = 23; + */ + boolean hasCommentsPresentIfEmpty(); + /** + * optional bool commentsPresentIfEmpty = 23; + */ + boolean getCommentsPresentIfEmpty(); + + /** + * repeated .sonarqube.ws.issues.Comment comments = 24; */ java.util.List getCommentsList(); /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ org.sonarqube.ws.Issues.Comment getComments(int index); /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ int getCommentsCount(); /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ java.util.List getCommentsOrBuilderList(); /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ org.sonarqube.ws.Issues.CommentOrBuilder getCommentsOrBuilder( int index); /** - * optional string creationDate = 22; + * optional string creationDate = 25; */ boolean hasCreationDate(); /** - * optional string creationDate = 22; + * optional string creationDate = 25; */ java.lang.String getCreationDate(); /** - * optional string creationDate = 22; + * optional string creationDate = 25; */ com.google.protobuf.ByteString getCreationDateBytes(); /** - * optional string updateDate = 23; + * optional string updateDate = 26; */ boolean hasUpdateDate(); /** - * optional string updateDate = 23; + * optional string updateDate = 26; */ java.lang.String getUpdateDate(); /** - * optional string updateDate = 23; + * optional string updateDate = 26; */ com.google.protobuf.ByteString getUpdateDateBytes(); /** - * optional string fUpdateAge = 24; + * optional string fUpdateAge = 27; */ boolean hasFUpdateAge(); /** - * optional string fUpdateAge = 24; + * optional string fUpdateAge = 27; */ java.lang.String getFUpdateAge(); /** - * optional string fUpdateAge = 24; + * optional string fUpdateAge = 27; */ com.google.protobuf.ByteString getFUpdateAgeBytes(); /** - * optional string closeDate = 25; + * optional string closeDate = 28; */ boolean hasCloseDate(); /** - * optional string closeDate = 25; + * optional string closeDate = 28; */ java.lang.String getCloseDate(); /** - * optional string closeDate = 25; + * optional string closeDate = 28; */ com.google.protobuf.ByteString getCloseDateBytes(); @@ -3177,27 +4777,32 @@ public final class Issues { rule_ = bs; break; } - case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000004; - component_ = bs; + case 24: { + int rawValue = input.readEnum(); + org.sonarqube.ws.Common.Severity value = org.sonarqube.ws.Common.Severity.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(3, rawValue); + } else { + bitField0_ |= 0x00000004; + severity_ = value; + } break; } - case 32: { + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - componentId_ = input.readInt32(); + component_ = bs; break; } - case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); + case 40: { bitField0_ |= 0x00000010; - project_ = bs; + componentId_ = input.readInt64(); break; } case 50: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000020; - subProject_ = bs; + project_ = bs; break; } case 56: { @@ -3244,7 +4849,7 @@ public final class Issues { case 114: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00002000; - scmAuthor_ = bs; + author_ = bs; break; } case 122: { @@ -3274,53 +4879,68 @@ public final class Issues { tags_.add(bs); break; } - case 154: { + case 152: { + bitField0_ |= 0x00020000; + transitionsPresentIfEmpty_ = input.readBool(); + break; + } + case 162: { com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00040000) == 0x00040000)) { + if (!((mutable_bitField0_ & 0x00080000) == 0x00080000)) { transitions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00040000; + mutable_bitField0_ |= 0x00080000; } transitions_.add(bs); break; } - case 162: { + case 168: { + bitField0_ |= 0x00040000; + actionsPresentIfEmpty_ = input.readBool(); + break; + } + case 178: { com.google.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00080000) == 0x00080000)) { + if (!((mutable_bitField0_ & 0x00200000) == 0x00200000)) { actions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00080000; + mutable_bitField0_ |= 0x00200000; } actions_.add(bs); break; } - case 170: { - if (!((mutable_bitField0_ & 0x00100000) == 0x00100000)) { + case 184: { + bitField0_ |= 0x00080000; + commentsPresentIfEmpty_ = input.readBool(); + break; + } + case 194: { + if (!((mutable_bitField0_ & 0x00800000) == 0x00800000)) { comments_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00100000; + mutable_bitField0_ |= 0x00800000; } comments_.add(input.readMessage(org.sonarqube.ws.Issues.Comment.PARSER, extensionRegistry)); break; } - case 178: { + case 202: { com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00020000; + bitField0_ |= 0x00100000; creationDate_ = bs; break; } - case 186: { + case 210: { com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00040000; + bitField0_ |= 0x00200000; updateDate_ = bs; break; } - case 194: { + case 218: { com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00080000; + bitField0_ |= 0x00400000; fUpdateAge_ = bs; break; } - case 202: { + case 226: { com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00100000; + bitField0_ |= 0x00800000; closeDate_ = bs; break; } @@ -3335,60 +4955,315 @@ public final class Issues { if (((mutable_bitField0_ & 0x00020000) == 0x00020000)) { tags_ = tags_.getUnmodifiableView(); } - if (((mutable_bitField0_ & 0x00040000) == 0x00040000)) { + if (((mutable_bitField0_ & 0x00080000) == 0x00080000)) { transitions_ = transitions_.getUnmodifiableView(); } - if (((mutable_bitField0_ & 0x00080000) == 0x00080000)) { + if (((mutable_bitField0_ & 0x00200000) == 0x00200000)) { actions_ = actions_.getUnmodifiableView(); } - if (((mutable_bitField0_ & 0x00100000) == 0x00100000)) { + if (((mutable_bitField0_ & 0x00800000) == 0x00800000)) { comments_ = java.util.Collections.unmodifiableList(comments_); } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Issues.Issue.class, org.sonarqube.ws.Issues.Issue.Builder.class); + } + + 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); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + 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) { + 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 = 1; + */ + 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; + } + } + + public static final int RULE_FIELD_NUMBER = 2; + private java.lang.Object rule_; + /** + * optional string rule = 2; + */ + public boolean hasRule() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string rule = 2; + */ + public java.lang.String getRule() { + java.lang.Object ref = rule_; + 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()) { + rule_ = s; + } + return s; + } + } + /** + * optional string rule = 2; + */ + public com.google.protobuf.ByteString + getRuleBytes() { + java.lang.Object ref = rule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SEVERITY_FIELD_NUMBER = 3; + private org.sonarqube.ws.Common.Severity severity_; + /** + * optional .sonarqube.ws.Severity severity = 3; + */ + public boolean hasSeverity() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .sonarqube.ws.Severity severity = 3; + */ + public org.sonarqube.ws.Common.Severity getSeverity() { + return severity_; + } + + public static final int COMPONENT_FIELD_NUMBER = 4; + private java.lang.Object component_; + /** + * optional string component = 4; + */ + public boolean hasComponent() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string component = 4; + */ + public java.lang.String getComponent() { + java.lang.Object ref = component_; + 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()) { + component_ = s; + } + return s; + } + } + /** + * optional string component = 4; + */ + public com.google.protobuf.ByteString + getComponentBytes() { + java.lang.Object ref = component_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + component_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMPONENTID_FIELD_NUMBER = 5; + private long componentId_; + /** + * optional int64 componentId = 5; + */ + public boolean hasComponentId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int64 componentId = 5; + */ + public long getComponentId() { + return componentId_; + } + + public static final int PROJECT_FIELD_NUMBER = 6; + private java.lang.Object project_; + /** + * optional string project = 6; + */ + public boolean hasProject() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string project = 6; + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + 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()) { + project_ = s; + } + return s; } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_descriptor; + /** + * optional string project = 6; + */ + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonarqube.ws.Issues.Issue.class, org.sonarqube.ws.Issues.Issue.Builder.class); + public static final int LINE_FIELD_NUMBER = 7; + private int line_; + /** + * optional int32 line = 7; + */ + public boolean hasLine() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int32 line = 7; + */ + public int getLine() { + return line_; } - 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); + public static final int RESOLUTION_FIELD_NUMBER = 8; + private java.lang.Object resolution_; + /** + * optional string resolution = 8; + */ + public boolean hasResolution() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional string resolution = 8; + */ + public java.lang.String getResolution() { + java.lang.Object ref = resolution_; + 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()) { + resolution_ = s; + } + return s; + } + } + /** + * optional string resolution = 8; + */ + public com.google.protobuf.ByteString + getResolutionBytes() { + java.lang.Object ref = resolution_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resolution_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; } - private int bitField0_; - public static final int KEY_FIELD_NUMBER = 1; - private java.lang.Object key_; + public static final int STATUS_FIELD_NUMBER = 9; + private java.lang.Object status_; /** - * optional string key = 1; + * optional string status = 9; */ - public boolean hasKey() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public boolean hasStatus() { + return ((bitField0_ & 0x00000100) == 0x00000100); } /** - * optional string key = 1; + * optional string status = 9; */ - public java.lang.String getKey() { - java.lang.Object ref = key_; + public java.lang.String getStatus() { + java.lang.Object ref = status_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3396,41 +5271,41 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - key_ = s; + status_ = s; } return s; } } /** - * optional string key = 1; + * optional string status = 9; */ public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; + getStatusBytes() { + java.lang.Object ref = status_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - key_ = b; + status_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int RULE_FIELD_NUMBER = 2; - private java.lang.Object rule_; + public static final int MESSAGE_FIELD_NUMBER = 10; + private java.lang.Object message_; /** - * optional string rule = 2; + * optional string message = 10; */ - public boolean hasRule() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public boolean hasMessage() { + return ((bitField0_ & 0x00000200) == 0x00000200); } /** - * optional string rule = 2; + * optional string message = 10; */ - public java.lang.String getRule() { - java.lang.Object ref = rule_; + public java.lang.String getMessage() { + java.lang.Object ref = message_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3438,41 +5313,41 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - rule_ = s; + message_ = s; } return s; } } /** - * optional string rule = 2; + * optional string message = 10; */ public com.google.protobuf.ByteString - getRuleBytes() { - java.lang.Object ref = rule_; + getMessageBytes() { + java.lang.Object ref = message_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - rule_ = b; + message_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int COMPONENT_FIELD_NUMBER = 3; - private java.lang.Object component_; + public static final int DEBT_FIELD_NUMBER = 11; + private java.lang.Object debt_; /** - * optional string component = 3; + * optional string debt = 11; */ - public boolean hasComponent() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public boolean hasDebt() { + return ((bitField0_ & 0x00000400) == 0x00000400); } /** - * optional string component = 3; + * optional string debt = 11; */ - public java.lang.String getComponent() { - java.lang.Object ref = component_; + public java.lang.String getDebt() { + java.lang.Object ref = debt_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3480,56 +5355,83 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - component_ = s; + debt_ = s; } return s; } } /** - * optional string component = 3; + * optional string debt = 11; */ public com.google.protobuf.ByteString - getComponentBytes() { - java.lang.Object ref = component_; + getDebtBytes() { + java.lang.Object ref = debt_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - component_ = b; + debt_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int COMPONENTID_FIELD_NUMBER = 4; - private int componentId_; + public static final int ASSIGNEE_FIELD_NUMBER = 12; + private java.lang.Object assignee_; + /** + * optional string assignee = 12; + */ + public boolean hasAssignee() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } /** - * optional int32 componentId = 4; + * optional string assignee = 12; */ - public boolean hasComponentId() { - return ((bitField0_ & 0x00000008) == 0x00000008); + public java.lang.String getAssignee() { + java.lang.Object ref = assignee_; + 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()) { + assignee_ = s; + } + return s; + } } /** - * optional int32 componentId = 4; + * optional string assignee = 12; */ - public int getComponentId() { - return componentId_; + public com.google.protobuf.ByteString + getAssigneeBytes() { + java.lang.Object ref = assignee_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assignee_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public static final int PROJECT_FIELD_NUMBER = 5; - private java.lang.Object project_; + public static final int REPORTER_FIELD_NUMBER = 13; + private java.lang.Object reporter_; /** - * optional string project = 5; + * optional string reporter = 13; */ - public boolean hasProject() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public boolean hasReporter() { + return ((bitField0_ & 0x00001000) == 0x00001000); } /** - * optional string project = 5; + * optional string reporter = 13; */ - public java.lang.String getProject() { - java.lang.Object ref = project_; + public java.lang.String getReporter() { + java.lang.Object ref = reporter_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3537,41 +5439,49 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - project_ = s; + reporter_ = s; } return s; } } /** - * optional string project = 5; + * optional string reporter = 13; */ public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; + getReporterBytes() { + java.lang.Object ref = reporter_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - project_ = b; + reporter_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int SUBPROJECT_FIELD_NUMBER = 6; - private java.lang.Object subProject_; + public static final int AUTHOR_FIELD_NUMBER = 14; + private java.lang.Object author_; /** - * optional string subProject = 6; + * optional string author = 14; + * + *
+     * SCM login of the committer who introduced the issue
+     * 
*/ - public boolean hasSubProject() { - return ((bitField0_ & 0x00000020) == 0x00000020); + public boolean hasAuthor() { + return ((bitField0_ & 0x00002000) == 0x00002000); } /** - * optional string subProject = 6; + * optional string author = 14; + * + *
+     * SCM login of the committer who introduced the issue
+     * 
*/ - public java.lang.String getSubProject() { - java.lang.Object ref = subProject_; + public java.lang.String getAuthor() { + java.lang.Object ref = author_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3579,56 +5489,45 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - subProject_ = s; + author_ = s; } return s; } } /** - * optional string subProject = 6; + * optional string author = 14; + * + *
+     * SCM login of the committer who introduced the issue
+     * 
*/ public com.google.protobuf.ByteString - getSubProjectBytes() { - java.lang.Object ref = subProject_; + 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); - subProject_ = b; + author_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int LINE_FIELD_NUMBER = 7; - private int line_; - /** - * optional int32 line = 7; - */ - public boolean hasLine() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int32 line = 7; - */ - public int getLine() { - return line_; - } - - public static final int RESOLUTION_FIELD_NUMBER = 8; - private java.lang.Object resolution_; + public static final int ACTIONPLAN_FIELD_NUMBER = 15; + private java.lang.Object actionPlan_; /** - * optional string resolution = 8; + * optional string actionPlan = 15; */ - public boolean hasResolution() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public boolean hasActionPlan() { + return ((bitField0_ & 0x00004000) == 0x00004000); } /** - * optional string resolution = 8; + * optional string actionPlan = 15; */ - public java.lang.String getResolution() { - java.lang.Object ref = resolution_; + public java.lang.String getActionPlan() { + java.lang.Object ref = actionPlan_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3636,41 +5535,41 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - resolution_ = s; + actionPlan_ = s; } return s; } } /** - * optional string resolution = 8; + * optional string actionPlan = 15; */ public com.google.protobuf.ByteString - getResolutionBytes() { - java.lang.Object ref = resolution_; + getActionPlanBytes() { + java.lang.Object ref = actionPlan_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - resolution_ = b; + actionPlan_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int STATUS_FIELD_NUMBER = 9; - private java.lang.Object status_; + public static final int ACTIONPLANNAME_FIELD_NUMBER = 16; + private java.lang.Object actionPlanName_; /** - * optional string status = 9; + * optional string actionPlanName = 16; */ - public boolean hasStatus() { - return ((bitField0_ & 0x00000100) == 0x00000100); + public boolean hasActionPlanName() { + return ((bitField0_ & 0x00008000) == 0x00008000); } /** - * optional string status = 9; + * optional string actionPlanName = 16; */ - public java.lang.String getStatus() { - java.lang.Object ref = status_; + public java.lang.String getActionPlanName() { + java.lang.Object ref = actionPlanName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3678,41 +5577,41 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - status_ = s; + actionPlanName_ = s; } return s; } } /** - * optional string status = 9; + * optional string actionPlanName = 16; */ public com.google.protobuf.ByteString - getStatusBytes() { - java.lang.Object ref = status_; + getActionPlanNameBytes() { + java.lang.Object ref = actionPlanName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - status_ = b; + actionPlanName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int MESSAGE_FIELD_NUMBER = 10; - private java.lang.Object message_; + public static final int ATTR_FIELD_NUMBER = 17; + private java.lang.Object attr_; /** - * optional string message = 10; + * optional string attr = 17; */ - public boolean hasMessage() { - return ((bitField0_ & 0x00000200) == 0x00000200); + public boolean hasAttr() { + return ((bitField0_ & 0x00010000) == 0x00010000); } /** - * optional string message = 10; + * optional string attr = 17; */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; + public java.lang.String getAttr() { + java.lang.Object ref = attr_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3720,41 +5619,224 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - message_ = s; + attr_ = s; } return s; } } /** - * optional string message = 10; + * optional string attr = 17; */ public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; + getAttrBytes() { + java.lang.Object ref = attr_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - message_ = b; + attr_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int DEBT_FIELD_NUMBER = 11; - private java.lang.Object debt_; + public static final int TAGS_FIELD_NUMBER = 18; + private com.google.protobuf.LazyStringList tags_; /** - * optional string debt = 11; + * repeated string tags = 18; */ - public boolean hasDebt() { - return ((bitField0_ & 0x00000400) == 0x00000400); + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_; } /** - * optional string debt = 11; + * repeated string tags = 18; */ - public java.lang.String getDebt() { - java.lang.Object ref = debt_; + public int getTagsCount() { + return tags_.size(); + } + /** + * repeated string tags = 18; + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * repeated string tags = 18; + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + + public static final int TRANSITIONSPRESENTIFEMPTY_FIELD_NUMBER = 19; + private boolean transitionsPresentIfEmpty_; + /** + * optional bool transitionsPresentIfEmpty = 19; + * + *
+     * the transitions allowed for the requesting user.
+     * 
+ */ + public boolean hasTransitionsPresentIfEmpty() { + return ((bitField0_ & 0x00020000) == 0x00020000); + } + /** + * optional bool transitionsPresentIfEmpty = 19; + * + *
+     * the transitions allowed for the requesting user.
+     * 
+ */ + public boolean getTransitionsPresentIfEmpty() { + return transitionsPresentIfEmpty_; + } + + public static final int TRANSITIONS_FIELD_NUMBER = 20; + private com.google.protobuf.LazyStringList transitions_; + /** + * repeated string transitions = 20; + */ + public com.google.protobuf.ProtocolStringList + getTransitionsList() { + return transitions_; + } + /** + * repeated string transitions = 20; + */ + public int getTransitionsCount() { + return transitions_.size(); + } + /** + * repeated string transitions = 20; + */ + public java.lang.String getTransitions(int index) { + return transitions_.get(index); + } + /** + * repeated string transitions = 20; + */ + public com.google.protobuf.ByteString + getTransitionsBytes(int index) { + return transitions_.getByteString(index); + } + + public static final int ACTIONSPRESENTIFEMPTY_FIELD_NUMBER = 21; + private boolean actionsPresentIfEmpty_; + /** + * optional bool actionsPresentIfEmpty = 21; + * + *
+     * the actions allowed for the requesting user.
+     * 
+ */ + public boolean hasActionsPresentIfEmpty() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional bool actionsPresentIfEmpty = 21; + * + *
+     * the actions allowed for the requesting user.
+     * 
+ */ + public boolean getActionsPresentIfEmpty() { + return actionsPresentIfEmpty_; + } + + public static final int ACTIONS_FIELD_NUMBER = 22; + private com.google.protobuf.LazyStringList actions_; + /** + * repeated string actions = 22; + */ + public com.google.protobuf.ProtocolStringList + getActionsList() { + return actions_; + } + /** + * repeated string actions = 22; + */ + public int getActionsCount() { + return actions_.size(); + } + /** + * repeated string actions = 22; + */ + public java.lang.String getActions(int index) { + return actions_.get(index); + } + /** + * repeated string actions = 22; + */ + public com.google.protobuf.ByteString + getActionsBytes(int index) { + return actions_.getByteString(index); + } + + public static final int COMMENTSPRESENTIFEMPTY_FIELD_NUMBER = 23; + private boolean commentsPresentIfEmpty_; + /** + * optional bool commentsPresentIfEmpty = 23; + */ + public boolean hasCommentsPresentIfEmpty() { + return ((bitField0_ & 0x00080000) == 0x00080000); + } + /** + * optional bool commentsPresentIfEmpty = 23; + */ + public boolean getCommentsPresentIfEmpty() { + return commentsPresentIfEmpty_; + } + + public static final int COMMENTS_FIELD_NUMBER = 24; + private java.util.List comments_; + /** + * repeated .sonarqube.ws.issues.Comment comments = 24; + */ + public java.util.List getCommentsList() { + return comments_; + } + /** + * repeated .sonarqube.ws.issues.Comment comments = 24; + */ + public java.util.List + getCommentsOrBuilderList() { + return comments_; + } + /** + * repeated .sonarqube.ws.issues.Comment comments = 24; + */ + public int getCommentsCount() { + return comments_.size(); + } + /** + * repeated .sonarqube.ws.issues.Comment comments = 24; + */ + public org.sonarqube.ws.Issues.Comment getComments(int index) { + return comments_.get(index); + } + /** + * repeated .sonarqube.ws.issues.Comment comments = 24; + */ + public org.sonarqube.ws.Issues.CommentOrBuilder getCommentsOrBuilder( + int index) { + return comments_.get(index); + } + + public static final int CREATIONDATE_FIELD_NUMBER = 25; + private java.lang.Object creationDate_; + /** + * optional string creationDate = 25; + */ + public boolean hasCreationDate() { + return ((bitField0_ & 0x00100000) == 0x00100000); + } + /** + * optional string creationDate = 25; + */ + public java.lang.String getCreationDate() { + java.lang.Object ref = creationDate_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3762,41 +5844,41 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - debt_ = s; + creationDate_ = s; } return s; } } /** - * optional string debt = 11; + * optional string creationDate = 25; */ public com.google.protobuf.ByteString - getDebtBytes() { - java.lang.Object ref = debt_; + getCreationDateBytes() { + java.lang.Object ref = creationDate_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - debt_ = b; + creationDate_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int ASSIGNEE_FIELD_NUMBER = 12; - private java.lang.Object assignee_; + public static final int UPDATEDATE_FIELD_NUMBER = 26; + private java.lang.Object updateDate_; /** - * optional string assignee = 12; + * optional string updateDate = 26; */ - public boolean hasAssignee() { - return ((bitField0_ & 0x00000800) == 0x00000800); + public boolean hasUpdateDate() { + return ((bitField0_ & 0x00200000) == 0x00200000); } /** - * optional string assignee = 12; + * optional string updateDate = 26; */ - public java.lang.String getAssignee() { - java.lang.Object ref = assignee_; + public java.lang.String getUpdateDate() { + java.lang.Object ref = updateDate_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3804,41 +5886,41 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - assignee_ = s; + updateDate_ = s; } return s; } } /** - * optional string assignee = 12; + * optional string updateDate = 26; */ public com.google.protobuf.ByteString - getAssigneeBytes() { - java.lang.Object ref = assignee_; + getUpdateDateBytes() { + java.lang.Object ref = updateDate_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - assignee_ = b; + updateDate_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int REPORTER_FIELD_NUMBER = 13; - private java.lang.Object reporter_; + public static final int FUPDATEAGE_FIELD_NUMBER = 27; + private java.lang.Object fUpdateAge_; /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ - public boolean hasReporter() { - return ((bitField0_ & 0x00001000) == 0x00001000); + public boolean hasFUpdateAge() { + return ((bitField0_ & 0x00400000) == 0x00400000); } /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ - public java.lang.String getReporter() { - java.lang.Object ref = reporter_; + public java.lang.String getFUpdateAge() { + java.lang.Object ref = fUpdateAge_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3846,41 +5928,41 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - reporter_ = s; + fUpdateAge_ = s; } return s; } } /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ public com.google.protobuf.ByteString - getReporterBytes() { - java.lang.Object ref = reporter_; + getFUpdateAgeBytes() { + java.lang.Object ref = fUpdateAge_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - reporter_ = b; + fUpdateAge_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int SCMAUTHOR_FIELD_NUMBER = 14; - private java.lang.Object scmAuthor_; + public static final int CLOSEDATE_FIELD_NUMBER = 28; + private java.lang.Object closeDate_; /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ - public boolean hasScmAuthor() { - return ((bitField0_ & 0x00002000) == 0x00002000); + public boolean hasCloseDate() { + return ((bitField0_ & 0x00800000) == 0x00800000); } /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ - public java.lang.String getScmAuthor() { - java.lang.Object ref = scmAuthor_; + public java.lang.String getCloseDate() { + java.lang.Object ref = closeDate_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -3888,1209 +5970,1877 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - scmAuthor_ = s; + closeDate_ = s; } return s; } } /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ public com.google.protobuf.ByteString - getScmAuthorBytes() { - java.lang.Object ref = scmAuthor_; + getCloseDateBytes() { + java.lang.Object ref = closeDate_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - scmAuthor_ = b; + closeDate_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int ACTIONPLAN_FIELD_NUMBER = 15; - private java.lang.Object actionPlan_; - /** - * optional string actionPlan = 15; - */ - public boolean hasActionPlan() { - return ((bitField0_ & 0x00004000) == 0x00004000); + private void initFields() { + key_ = ""; + rule_ = ""; + severity_ = org.sonarqube.ws.Common.Severity.INFO; + component_ = ""; + componentId_ = 0L; + project_ = ""; + line_ = 0; + resolution_ = ""; + status_ = ""; + message_ = ""; + debt_ = ""; + assignee_ = ""; + reporter_ = ""; + author_ = ""; + actionPlan_ = ""; + actionPlanName_ = ""; + attr_ = ""; + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + transitionsPresentIfEmpty_ = false; + transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + actionsPresentIfEmpty_ = false; + actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + commentsPresentIfEmpty_ = false; + comments_ = java.util.Collections.emptyList(); + creationDate_ = ""; + updateDate_ = ""; + fUpdateAge_ = ""; + closeDate_ = ""; } - /** - * optional string actionPlan = 15; - */ - public java.lang.String getActionPlan() { - java.lang.Object ref = actionPlan_; - 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()) { - actionPlan_ = 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, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getRuleBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeEnum(3, severity_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getComponentBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt64(5, componentId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, getProjectBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeInt32(7, line_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBytes(8, getResolutionBytes()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeBytes(9, getStatusBytes()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeBytes(10, getMessageBytes()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBytes(11, getDebtBytes()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + output.writeBytes(12, getAssigneeBytes()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + output.writeBytes(13, getReporterBytes()); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + output.writeBytes(14, getAuthorBytes()); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + output.writeBytes(15, getActionPlanBytes()); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + output.writeBytes(16, getActionPlanNameBytes()); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + output.writeBytes(17, getAttrBytes()); + } + for (int i = 0; i < tags_.size(); i++) { + output.writeBytes(18, tags_.getByteString(i)); + } + if (((bitField0_ & 0x00020000) == 0x00020000)) { + output.writeBool(19, transitionsPresentIfEmpty_); + } + for (int i = 0; i < transitions_.size(); i++) { + output.writeBytes(20, transitions_.getByteString(i)); + } + if (((bitField0_ & 0x00040000) == 0x00040000)) { + output.writeBool(21, actionsPresentIfEmpty_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeBytes(22, actions_.getByteString(i)); + } + if (((bitField0_ & 0x00080000) == 0x00080000)) { + output.writeBool(23, commentsPresentIfEmpty_); + } + for (int i = 0; i < comments_.size(); i++) { + output.writeMessage(24, comments_.get(i)); + } + if (((bitField0_ & 0x00100000) == 0x00100000)) { + output.writeBytes(25, getCreationDateBytes()); + } + if (((bitField0_ & 0x00200000) == 0x00200000)) { + output.writeBytes(26, getUpdateDateBytes()); + } + if (((bitField0_ & 0x00400000) == 0x00400000)) { + output.writeBytes(27, getFUpdateAgeBytes()); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + output.writeBytes(28, getCloseDateBytes()); + } + 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, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getRuleBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, severity_.getNumber()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getComponentBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, componentId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, getProjectBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, line_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, getResolutionBytes()); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(9, getStatusBytes()); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(10, getMessageBytes()); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getDebtBytes()); + } + if (((bitField0_ & 0x00000800) == 0x00000800)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(12, getAssigneeBytes()); + } + if (((bitField0_ & 0x00001000) == 0x00001000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(13, getReporterBytes()); + } + if (((bitField0_ & 0x00002000) == 0x00002000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(14, getAuthorBytes()); + } + if (((bitField0_ & 0x00004000) == 0x00004000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(15, getActionPlanBytes()); + } + if (((bitField0_ & 0x00008000) == 0x00008000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(16, getActionPlanNameBytes()); + } + if (((bitField0_ & 0x00010000) == 0x00010000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(17, getAttrBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < tags_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(tags_.getByteString(i)); } - return s; + size += dataSize; + size += 2 * getTagsList().size(); } - } - /** - * optional string actionPlan = 15; - */ - public com.google.protobuf.ByteString - getActionPlanBytes() { - java.lang.Object ref = actionPlan_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - actionPlan_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + if (((bitField0_ & 0x00020000) == 0x00020000)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(19, transitionsPresentIfEmpty_); } - } - - public static final int ACTIONPLANNAME_FIELD_NUMBER = 16; - private java.lang.Object actionPlanName_; - /** - * optional string actionPlanName = 16; - */ - public boolean hasActionPlanName() { - return ((bitField0_ & 0x00008000) == 0x00008000); - } - /** - * optional string actionPlanName = 16; - */ - public java.lang.String getActionPlanName() { - java.lang.Object ref = actionPlanName_; - 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()) { - actionPlanName_ = s; + { + int dataSize = 0; + for (int i = 0; i < transitions_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(transitions_.getByteString(i)); } - return s; + size += dataSize; + size += 2 * getTransitionsList().size(); } - } - /** - * optional string actionPlanName = 16; - */ - public com.google.protobuf.ByteString - getActionPlanNameBytes() { - java.lang.Object ref = actionPlanName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - actionPlanName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + if (((bitField0_ & 0x00040000) == 0x00040000)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(21, actionsPresentIfEmpty_); } - } - - public static final int ATTR_FIELD_NUMBER = 17; - private java.lang.Object attr_; - /** - * optional string attr = 17; - */ - public boolean hasAttr() { - return ((bitField0_ & 0x00010000) == 0x00010000); - } - /** - * optional string attr = 17; - */ - public java.lang.String getAttr() { - java.lang.Object ref = attr_; - 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()) { - attr_ = s; + { + int dataSize = 0; + for (int i = 0; i < actions_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(actions_.getByteString(i)); } - return s; + size += dataSize; + size += 2 * getActionsList().size(); } - } - /** - * optional string attr = 17; - */ - public com.google.protobuf.ByteString - getAttrBytes() { - java.lang.Object ref = attr_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + if (((bitField0_ & 0x00080000) == 0x00080000)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(23, commentsPresentIfEmpty_); + } + for (int i = 0; i < comments_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, comments_.get(i)); + } + if (((bitField0_ & 0x00100000) == 0x00100000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(25, getCreationDateBytes()); + } + if (((bitField0_ & 0x00200000) == 0x00200000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(26, getUpdateDateBytes()); + } + if (((bitField0_ & 0x00400000) == 0x00400000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(27, getFUpdateAgeBytes()); + } + if (((bitField0_ & 0x00800000) == 0x00800000)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(28, getCloseDateBytes()); } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; } - public static final int TAGS_FIELD_NUMBER = 18; - private com.google.protobuf.LazyStringList tags_; - /** - * repeated string tags = 18; - */ - public com.google.protobuf.ProtocolStringList - getTagsList() { - return tags_; - } - /** - * repeated string tags = 18; - */ - public int getTagsCount() { - return tags_.size(); - } - /** - * repeated string tags = 18; - */ - public java.lang.String getTags(int index) { - return tags_.get(index); - } - /** - * repeated string tags = 18; - */ - public com.google.protobuf.ByteString - getTagsBytes(int index) { - return tags_.getByteString(index); + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); } - public static final int TRANSITIONS_FIELD_NUMBER = 19; - private com.google.protobuf.LazyStringList transitions_; - /** - * repeated string transitions = 19; - */ - public com.google.protobuf.ProtocolStringList - getTransitionsList() { - return transitions_; - } - /** - * repeated string transitions = 19; - */ - public int getTransitionsCount() { - return transitions_.size(); - } - /** - * repeated string transitions = 19; - */ - public java.lang.String getTransitions(int index) { - return transitions_.get(index); - } - /** - * repeated string transitions = 19; - */ - public com.google.protobuf.ByteString - getTransitionsBytes(int index) { - return transitions_.getByteString(index); + public static org.sonarqube.ws.Issues.Issue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - - public static final int ACTIONS_FIELD_NUMBER = 20; - private com.google.protobuf.LazyStringList actions_; - /** - * repeated string actions = 20; - */ - public com.google.protobuf.ProtocolStringList - getActionsList() { - return actions_; + public static org.sonarqube.ws.Issues.Issue parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * repeated string actions = 20; - */ - public int getActionsCount() { - return actions_.size(); + public static org.sonarqube.ws.Issues.Issue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - /** - * repeated string actions = 20; - */ - public java.lang.String getActions(int index) { - return actions_.get(index); + public static org.sonarqube.ws.Issues.Issue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - /** - * repeated string actions = 20; - */ - public com.google.protobuf.ByteString - getActionsBytes(int index) { - return actions_.getByteString(index); + public static org.sonarqube.ws.Issues.Issue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); } - - public static final int COMMENTS_FIELD_NUMBER = 21; - private java.util.List comments_; - /** - * repeated .sonarqube.ws.issues.Comment comments = 21; - */ - public java.util.List getCommentsList() { - return comments_; + public static org.sonarqube.ws.Issues.Issue parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); } - /** - * repeated .sonarqube.ws.issues.Comment comments = 21; - */ - public java.util.List - getCommentsOrBuilderList() { - return comments_; + public static org.sonarqube.ws.Issues.Issue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); } - /** - * repeated .sonarqube.ws.issues.Comment comments = 21; - */ - public int getCommentsCount() { - return comments_.size(); + public static org.sonarqube.ws.Issues.Issue parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); } - /** - * repeated .sonarqube.ws.issues.Comment comments = 21; - */ - public org.sonarqube.ws.Issues.Comment getComments(int index) { - return comments_.get(index); + public static org.sonarqube.ws.Issues.Issue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); } - /** - * repeated .sonarqube.ws.issues.Comment comments = 21; - */ - public org.sonarqube.ws.Issues.CommentOrBuilder getCommentsOrBuilder( - int index) { - return comments_.get(index); + public static org.sonarqube.ws.Issues.Issue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); } - public static final int CREATIONDATE_FIELD_NUMBER = 22; - private java.lang.Object creationDate_; - /** - * optional string creationDate = 22; - */ - public boolean hasCreationDate() { - return ((bitField0_ & 0x00020000) == 0x00020000); + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonarqube.ws.Issues.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; } /** - * optional string creationDate = 22; + * Protobuf type {@code sonarqube.ws.issues.Issue} */ - public java.lang.String getCreationDate() { - java.lang.Object ref = creationDate_; - 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()) { - creationDate_ = s; + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:sonarqube.ws.issues.Issue) + org.sonarqube.ws.Issues.IssueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Issues.Issue.class, org.sonarqube.ws.Issues.Issue.Builder.class); + } + + // Construct using org.sonarqube.ws.Issues.Issue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getCommentsFieldBuilder(); } - return s; } - } - /** - * optional string creationDate = 22; - */ - public com.google.protobuf.ByteString - getCreationDateBytes() { - java.lang.Object ref = creationDate_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - creationDate_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private static Builder create() { + return new Builder(); } - } - public static final int UPDATEDATE_FIELD_NUMBER = 23; - private java.lang.Object updateDate_; - /** - * optional string updateDate = 23; - */ - public boolean hasUpdateDate() { - return ((bitField0_ & 0x00040000) == 0x00040000); - } - /** - * optional string updateDate = 23; - */ - public java.lang.String getUpdateDate() { - java.lang.Object ref = updateDate_; - 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()) { - updateDate_ = s; + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + rule_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + severity_ = org.sonarqube.ws.Common.Severity.INFO; + bitField0_ = (bitField0_ & ~0x00000004); + component_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + componentId_ = 0L; + bitField0_ = (bitField0_ & ~0x00000010); + project_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + line_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + resolution_ = ""; + bitField0_ = (bitField0_ & ~0x00000080); + status_ = ""; + bitField0_ = (bitField0_ & ~0x00000100); + message_ = ""; + bitField0_ = (bitField0_ & ~0x00000200); + debt_ = ""; + bitField0_ = (bitField0_ & ~0x00000400); + assignee_ = ""; + bitField0_ = (bitField0_ & ~0x00000800); + reporter_ = ""; + bitField0_ = (bitField0_ & ~0x00001000); + author_ = ""; + bitField0_ = (bitField0_ & ~0x00002000); + actionPlan_ = ""; + bitField0_ = (bitField0_ & ~0x00004000); + actionPlanName_ = ""; + bitField0_ = (bitField0_ & ~0x00008000); + attr_ = ""; + bitField0_ = (bitField0_ & ~0x00010000); + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00020000); + transitionsPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00040000); + transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00080000); + actionsPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00100000); + actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00200000); + commentsPresentIfEmpty_ = false; + bitField0_ = (bitField0_ & ~0x00400000); + if (commentsBuilder_ == null) { + comments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000); + } else { + commentsBuilder_.clear(); + } + creationDate_ = ""; + bitField0_ = (bitField0_ & ~0x01000000); + updateDate_ = ""; + bitField0_ = (bitField0_ & ~0x02000000); + fUpdateAge_ = ""; + bitField0_ = (bitField0_ & ~0x04000000); + closeDate_ = ""; + bitField0_ = (bitField0_ & ~0x08000000); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_descriptor; + } + + public org.sonarqube.ws.Issues.Issue getDefaultInstanceForType() { + return org.sonarqube.ws.Issues.Issue.getDefaultInstance(); + } + + public org.sonarqube.ws.Issues.Issue build() { + org.sonarqube.ws.Issues.Issue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonarqube.ws.Issues.Issue buildPartial() { + org.sonarqube.ws.Issues.Issue result = new org.sonarqube.ws.Issues.Issue(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.rule_ = rule_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.severity_ = severity_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.component_ = component_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.componentId_ = componentId_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.project_ = project_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.line_ = line_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.resolution_ = resolution_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.status_ = status_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.message_ = message_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.debt_ = debt_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000800; + } + result.assignee_ = assignee_; + if (((from_bitField0_ & 0x00001000) == 0x00001000)) { + to_bitField0_ |= 0x00001000; + } + result.reporter_ = reporter_; + if (((from_bitField0_ & 0x00002000) == 0x00002000)) { + to_bitField0_ |= 0x00002000; + } + result.author_ = author_; + if (((from_bitField0_ & 0x00004000) == 0x00004000)) { + to_bitField0_ |= 0x00004000; + } + result.actionPlan_ = actionPlan_; + if (((from_bitField0_ & 0x00008000) == 0x00008000)) { + to_bitField0_ |= 0x00008000; + } + result.actionPlanName_ = actionPlanName_; + if (((from_bitField0_ & 0x00010000) == 0x00010000)) { + to_bitField0_ |= 0x00010000; + } + result.attr_ = attr_; + if (((bitField0_ & 0x00020000) == 0x00020000)) { + tags_ = tags_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00020000); } - return s; - } - } - /** - * optional string updateDate = 23; - */ - public com.google.protobuf.ByteString - getUpdateDateBytes() { - java.lang.Object ref = updateDate_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateDate_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + result.tags_ = tags_; + if (((from_bitField0_ & 0x00040000) == 0x00040000)) { + to_bitField0_ |= 0x00020000; + } + result.transitionsPresentIfEmpty_ = transitionsPresentIfEmpty_; + if (((bitField0_ & 0x00080000) == 0x00080000)) { + transitions_ = transitions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00080000); + } + result.transitions_ = transitions_; + if (((from_bitField0_ & 0x00100000) == 0x00100000)) { + to_bitField0_ |= 0x00040000; + } + result.actionsPresentIfEmpty_ = actionsPresentIfEmpty_; + if (((bitField0_ & 0x00200000) == 0x00200000)) { + actions_ = actions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00200000); + } + result.actions_ = actions_; + if (((from_bitField0_ & 0x00400000) == 0x00400000)) { + to_bitField0_ |= 0x00080000; + } + result.commentsPresentIfEmpty_ = commentsPresentIfEmpty_; + if (commentsBuilder_ == null) { + if (((bitField0_ & 0x00800000) == 0x00800000)) { + comments_ = java.util.Collections.unmodifiableList(comments_); + bitField0_ = (bitField0_ & ~0x00800000); + } + result.comments_ = comments_; + } else { + result.comments_ = commentsBuilder_.build(); + } + if (((from_bitField0_ & 0x01000000) == 0x01000000)) { + to_bitField0_ |= 0x00100000; + } + result.creationDate_ = creationDate_; + if (((from_bitField0_ & 0x02000000) == 0x02000000)) { + to_bitField0_ |= 0x00200000; + } + result.updateDate_ = updateDate_; + if (((from_bitField0_ & 0x04000000) == 0x04000000)) { + to_bitField0_ |= 0x00400000; + } + result.fUpdateAge_ = fUpdateAge_; + if (((from_bitField0_ & 0x08000000) == 0x08000000)) { + to_bitField0_ |= 0x00800000; + } + result.closeDate_ = closeDate_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; } - } - public static final int FUPDATEAGE_FIELD_NUMBER = 24; - private java.lang.Object fUpdateAge_; - /** - * optional string fUpdateAge = 24; - */ - public boolean hasFUpdateAge() { - return ((bitField0_ & 0x00080000) == 0x00080000); - } - /** - * optional string fUpdateAge = 24; - */ - public java.lang.String getFUpdateAge() { - java.lang.Object ref = fUpdateAge_; - 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()) { - fUpdateAge_ = s; + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.Issues.Issue) { + return mergeFrom((org.sonarqube.ws.Issues.Issue)other); + } else { + super.mergeFrom(other); + return this; } - return s; - } - } - /** - * optional string fUpdateAge = 24; - */ - public com.google.protobuf.ByteString - getFUpdateAgeBytes() { - java.lang.Object ref = fUpdateAge_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - fUpdateAge_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; } - } - public static final int CLOSEDATE_FIELD_NUMBER = 25; - private java.lang.Object closeDate_; - /** - * optional string closeDate = 25; - */ - public boolean hasCloseDate() { - return ((bitField0_ & 0x00100000) == 0x00100000); - } - /** - * optional string closeDate = 25; - */ - public java.lang.String getCloseDate() { - java.lang.Object ref = closeDate_; - 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()) { - closeDate_ = s; + public Builder mergeFrom(org.sonarqube.ws.Issues.Issue other) { + if (other == org.sonarqube.ws.Issues.Issue.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasRule()) { + bitField0_ |= 0x00000002; + rule_ = other.rule_; + onChanged(); + } + if (other.hasSeverity()) { + setSeverity(other.getSeverity()); + } + if (other.hasComponent()) { + bitField0_ |= 0x00000008; + component_ = other.component_; + onChanged(); + } + if (other.hasComponentId()) { + setComponentId(other.getComponentId()); + } + if (other.hasProject()) { + bitField0_ |= 0x00000020; + project_ = other.project_; + onChanged(); + } + if (other.hasLine()) { + setLine(other.getLine()); + } + if (other.hasResolution()) { + bitField0_ |= 0x00000080; + resolution_ = other.resolution_; + onChanged(); + } + if (other.hasStatus()) { + bitField0_ |= 0x00000100; + status_ = other.status_; + onChanged(); + } + if (other.hasMessage()) { + bitField0_ |= 0x00000200; + message_ = other.message_; + onChanged(); + } + if (other.hasDebt()) { + bitField0_ |= 0x00000400; + debt_ = other.debt_; + onChanged(); + } + if (other.hasAssignee()) { + bitField0_ |= 0x00000800; + assignee_ = other.assignee_; + onChanged(); + } + if (other.hasReporter()) { + bitField0_ |= 0x00001000; + reporter_ = other.reporter_; + onChanged(); + } + if (other.hasAuthor()) { + bitField0_ |= 0x00002000; + author_ = other.author_; + onChanged(); + } + if (other.hasActionPlan()) { + bitField0_ |= 0x00004000; + actionPlan_ = other.actionPlan_; + onChanged(); + } + if (other.hasActionPlanName()) { + bitField0_ |= 0x00008000; + actionPlanName_ = other.actionPlanName_; + onChanged(); + } + if (other.hasAttr()) { + bitField0_ |= 0x00010000; + attr_ = other.attr_; + onChanged(); + } + if (!other.tags_.isEmpty()) { + if (tags_.isEmpty()) { + tags_ = other.tags_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureTagsIsMutable(); + tags_.addAll(other.tags_); + } + onChanged(); + } + if (other.hasTransitionsPresentIfEmpty()) { + setTransitionsPresentIfEmpty(other.getTransitionsPresentIfEmpty()); + } + if (!other.transitions_.isEmpty()) { + if (transitions_.isEmpty()) { + transitions_ = other.transitions_; + bitField0_ = (bitField0_ & ~0x00080000); + } else { + ensureTransitionsIsMutable(); + transitions_.addAll(other.transitions_); + } + onChanged(); + } + if (other.hasActionsPresentIfEmpty()) { + setActionsPresentIfEmpty(other.getActionsPresentIfEmpty()); + } + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00200000); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + if (other.hasCommentsPresentIfEmpty()) { + setCommentsPresentIfEmpty(other.getCommentsPresentIfEmpty()); + } + if (commentsBuilder_ == null) { + if (!other.comments_.isEmpty()) { + if (comments_.isEmpty()) { + comments_ = other.comments_; + bitField0_ = (bitField0_ & ~0x00800000); + } else { + ensureCommentsIsMutable(); + comments_.addAll(other.comments_); + } + onChanged(); + } + } else { + if (!other.comments_.isEmpty()) { + if (commentsBuilder_.isEmpty()) { + commentsBuilder_.dispose(); + commentsBuilder_ = null; + comments_ = other.comments_; + bitField0_ = (bitField0_ & ~0x00800000); + commentsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getCommentsFieldBuilder() : null; + } else { + commentsBuilder_.addAllMessages(other.comments_); + } + } + } + if (other.hasCreationDate()) { + bitField0_ |= 0x01000000; + creationDate_ = other.creationDate_; + onChanged(); + } + if (other.hasUpdateDate()) { + bitField0_ |= 0x02000000; + updateDate_ = other.updateDate_; + onChanged(); } - return s; - } - } - /** - * optional string closeDate = 25; - */ - public com.google.protobuf.ByteString - getCloseDateBytes() { - java.lang.Object ref = closeDate_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - closeDate_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + if (other.hasFUpdateAge()) { + bitField0_ |= 0x04000000; + fUpdateAge_ = other.fUpdateAge_; + onChanged(); + } + if (other.hasCloseDate()) { + bitField0_ |= 0x08000000; + closeDate_ = other.closeDate_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; } - } - - private void initFields() { - key_ = ""; - rule_ = ""; - component_ = ""; - componentId_ = 0; - project_ = ""; - subProject_ = ""; - line_ = 0; - resolution_ = ""; - status_ = ""; - message_ = ""; - debt_ = ""; - assignee_ = ""; - reporter_ = ""; - scmAuthor_ = ""; - actionPlan_ = ""; - actionPlanName_ = ""; - attr_ = ""; - tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - comments_ = java.util.Collections.emptyList(); - creationDate_ = ""; - updateDate_ = ""; - fUpdateAge_ = ""; - closeDate_ = ""; - } - 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, getKeyBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getRuleBytes()); + public final boolean isInitialized() { + return true; } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getComponentBytes()); + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonarqube.ws.Issues.Issue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.Issues.Issue) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(4, componentId_); + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * optional string key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getProjectBytes()); + /** + * 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; + } } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(6, getSubProjectBytes()); + /** + * 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; + } } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeInt32(7, line_); + /** + * optional string key = 1; + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(8, getResolutionBytes()); + /** + * optional string key = 1; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBytes(9, getStatusBytes()); + /** + * 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; } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeBytes(10, getMessageBytes()); + + private java.lang.Object rule_ = ""; + /** + * optional string rule = 2; + */ + public boolean hasRule() { + return ((bitField0_ & 0x00000002) == 0x00000002); } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeBytes(11, getDebtBytes()); + /** + * optional string rule = 2; + */ + public java.lang.String getRule() { + java.lang.Object ref = rule_; + 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()) { + rule_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - output.writeBytes(12, getAssigneeBytes()); + /** + * optional string rule = 2; + */ + public com.google.protobuf.ByteString + getRuleBytes() { + java.lang.Object ref = rule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - output.writeBytes(13, getReporterBytes()); + /** + * optional string rule = 2; + */ + public Builder setRule( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + rule_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - output.writeBytes(14, getScmAuthorBytes()); + /** + * optional string rule = 2; + */ + public Builder clearRule() { + bitField0_ = (bitField0_ & ~0x00000002); + rule_ = getDefaultInstance().getRule(); + onChanged(); + return this; } - if (((bitField0_ & 0x00004000) == 0x00004000)) { - output.writeBytes(15, getActionPlanBytes()); + /** + * optional string rule = 2; + */ + public Builder setRuleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + rule_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00008000) == 0x00008000)) { - output.writeBytes(16, getActionPlanNameBytes()); + + private org.sonarqube.ws.Common.Severity severity_ = org.sonarqube.ws.Common.Severity.INFO; + /** + * optional .sonarqube.ws.Severity severity = 3; + */ + public boolean hasSeverity() { + return ((bitField0_ & 0x00000004) == 0x00000004); } - if (((bitField0_ & 0x00010000) == 0x00010000)) { - output.writeBytes(17, getAttrBytes()); + /** + * optional .sonarqube.ws.Severity severity = 3; + */ + public org.sonarqube.ws.Common.Severity getSeverity() { + return severity_; } - for (int i = 0; i < tags_.size(); i++) { - output.writeBytes(18, tags_.getByteString(i)); + /** + * optional .sonarqube.ws.Severity severity = 3; + */ + public Builder setSeverity(org.sonarqube.ws.Common.Severity value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + severity_ = value; + onChanged(); + return this; } - for (int i = 0; i < transitions_.size(); i++) { - output.writeBytes(19, transitions_.getByteString(i)); + /** + * optional .sonarqube.ws.Severity severity = 3; + */ + public Builder clearSeverity() { + bitField0_ = (bitField0_ & ~0x00000004); + severity_ = org.sonarqube.ws.Common.Severity.INFO; + onChanged(); + return this; } - for (int i = 0; i < actions_.size(); i++) { - output.writeBytes(20, actions_.getByteString(i)); + + private java.lang.Object component_ = ""; + /** + * optional string component = 4; + */ + public boolean hasComponent() { + return ((bitField0_ & 0x00000008) == 0x00000008); } - for (int i = 0; i < comments_.size(); i++) { - output.writeMessage(21, comments_.get(i)); + /** + * optional string component = 4; + */ + public java.lang.String getComponent() { + java.lang.Object ref = component_; + 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()) { + component_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } - if (((bitField0_ & 0x00020000) == 0x00020000)) { - output.writeBytes(22, getCreationDateBytes()); + /** + * optional string component = 4; + */ + public com.google.protobuf.ByteString + getComponentBytes() { + java.lang.Object ref = component_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + component_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00040000) == 0x00040000)) { - output.writeBytes(23, getUpdateDateBytes()); + /** + * optional string component = 4; + */ + public Builder setComponent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + component_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00080000) == 0x00080000)) { - output.writeBytes(24, getFUpdateAgeBytes()); + /** + * optional string component = 4; + */ + public Builder clearComponent() { + bitField0_ = (bitField0_ & ~0x00000008); + component_ = getDefaultInstance().getComponent(); + onChanged(); + return this; } - if (((bitField0_ & 0x00100000) == 0x00100000)) { - output.writeBytes(25, getCloseDateBytes()); + /** + * optional string component = 4; + */ + public Builder setComponentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + component_ = value; + 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, getKeyBytes()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getRuleBytes()); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getComponentBytes()); + private long componentId_ ; + /** + * optional int64 componentId = 5; + */ + public boolean hasComponentId() { + return ((bitField0_ & 0x00000010) == 0x00000010); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, componentId_); + /** + * optional int64 componentId = 5; + */ + public long getComponentId() { + return componentId_; } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getProjectBytes()); + /** + * optional int64 componentId = 5; + */ + public Builder setComponentId(long value) { + bitField0_ |= 0x00000010; + componentId_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getSubProjectBytes()); + /** + * optional int64 componentId = 5; + */ + public Builder clearComponentId() { + bitField0_ = (bitField0_ & ~0x00000010); + componentId_ = 0L; + onChanged(); + return this; } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(7, line_); + + private java.lang.Object project_ = ""; + /** + * optional string project = 6; + */ + public boolean hasProject() { + return ((bitField0_ & 0x00000020) == 0x00000020); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, getResolutionBytes()); + /** + * optional string project = 6; + */ + public java.lang.String getProject() { + java.lang.Object ref = project_; + 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()) { + project_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(9, getStatusBytes()); + /** + * optional string project = 6; + */ + public com.google.protobuf.ByteString + getProjectBytes() { + java.lang.Object ref = project_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + project_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, getMessageBytes()); + /** + * optional string project = 6; + */ + public Builder setProject( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + project_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(11, getDebtBytes()); + /** + * optional string project = 6; + */ + public Builder clearProject() { + bitField0_ = (bitField0_ & ~0x00000020); + project_ = getDefaultInstance().getProject(); + onChanged(); + return this; } - if (((bitField0_ & 0x00000800) == 0x00000800)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(12, getAssigneeBytes()); + /** + * optional string project = 6; + */ + public Builder setProjectBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + project_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00001000) == 0x00001000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(13, getReporterBytes()); + + private int line_ ; + /** + * optional int32 line = 7; + */ + public boolean hasLine() { + return ((bitField0_ & 0x00000040) == 0x00000040); } - if (((bitField0_ & 0x00002000) == 0x00002000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(14, getScmAuthorBytes()); + /** + * optional int32 line = 7; + */ + public int getLine() { + return line_; } - if (((bitField0_ & 0x00004000) == 0x00004000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(15, getActionPlanBytes()); + /** + * optional int32 line = 7; + */ + public Builder setLine(int value) { + bitField0_ |= 0x00000040; + line_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00008000) == 0x00008000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(16, getActionPlanNameBytes()); + /** + * optional int32 line = 7; + */ + public Builder clearLine() { + bitField0_ = (bitField0_ & ~0x00000040); + line_ = 0; + onChanged(); + return this; } - if (((bitField0_ & 0x00010000) == 0x00010000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(17, getAttrBytes()); + + private java.lang.Object resolution_ = ""; + /** + * optional string resolution = 8; + */ + public boolean hasResolution() { + return ((bitField0_ & 0x00000080) == 0x00000080); } - { - int dataSize = 0; - for (int i = 0; i < tags_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(tags_.getByteString(i)); + /** + * optional string resolution = 8; + */ + public java.lang.String getResolution() { + java.lang.Object ref = resolution_; + 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()) { + resolution_ = s; + } + return s; + } else { + return (java.lang.String) ref; } - size += dataSize; - size += 2 * getTagsList().size(); } - { - int dataSize = 0; - for (int i = 0; i < transitions_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(transitions_.getByteString(i)); + /** + * optional string resolution = 8; + */ + public com.google.protobuf.ByteString + getResolutionBytes() { + java.lang.Object ref = resolution_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + resolution_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - size += dataSize; - size += 2 * getTransitionsList().size(); } - { - int dataSize = 0; - for (int i = 0; i < actions_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(actions_.getByteString(i)); - } - size += dataSize; - size += 2 * getActionsList().size(); + /** + * optional string resolution = 8; + */ + public Builder setResolution( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + resolution_ = value; + onChanged(); + return this; } - for (int i = 0; i < comments_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(21, comments_.get(i)); + /** + * optional string resolution = 8; + */ + public Builder clearResolution() { + bitField0_ = (bitField0_ & ~0x00000080); + resolution_ = getDefaultInstance().getResolution(); + onChanged(); + return this; } - if (((bitField0_ & 0x00020000) == 0x00020000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(22, getCreationDateBytes()); + /** + * optional string resolution = 8; + */ + public Builder setResolutionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + resolution_ = value; + onChanged(); + return this; } - if (((bitField0_ & 0x00040000) == 0x00040000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(23, getUpdateDateBytes()); + + private java.lang.Object status_ = ""; + /** + * optional string status = 9; + */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000100) == 0x00000100); } - if (((bitField0_ & 0x00080000) == 0x00080000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(24, getFUpdateAgeBytes()); + /** + * optional string status = 9; + */ + public java.lang.String getStatus() { + java.lang.Object ref = status_; + 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()) { + status_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } } - if (((bitField0_ & 0x00100000) == 0x00100000)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(25, getCloseDateBytes()); + /** + * optional string status = 9; + */ + public com.google.protobuf.ByteString + getStatusBytes() { + java.lang.Object ref = status_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + status_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - 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.sonarqube.ws.Issues.Issue parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonarqube.ws.Issues.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.sonarqube.ws.Issues.Issue parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.sonarqube.ws.Issues.Issue parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.sonarqube.ws.Issues.Issue parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonarqube.ws.Issues.Issue parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.sonarqube.ws.Issues.Issue parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.sonarqube.ws.Issues.Issue parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.sonarqube.ws.Issues.Issue parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.sonarqube.ws.Issues.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.sonarqube.ws.Issues.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 sonarqube.ws.issues.Issue} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:sonarqube.ws.issues.Issue) - org.sonarqube.ws.Issues.IssueOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_descriptor; + /** + * optional string status = 9; + */ + public Builder setStatus( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + status_ = value; + onChanged(); + return this; } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonarqube.ws.Issues.Issue.class, org.sonarqube.ws.Issues.Issue.Builder.class); + /** + * optional string status = 9; + */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000100); + status_ = getDefaultInstance().getStatus(); + onChanged(); + return this; } - - // Construct using org.sonarqube.ws.Issues.Issue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); + /** + * optional string status = 9; + */ + public Builder setStatusBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + status_ = value; + onChanged(); + return this; } - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); + private java.lang.Object message_ = ""; + /** + * optional string message = 10; + */ + public boolean hasMessage() { + return ((bitField0_ & 0x00000200) == 0x00000200); } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getCommentsFieldBuilder(); + /** + * optional string message = 10; + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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()) { + message_ = s; + } + return s; + } else { + return (java.lang.String) ref; } } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - key_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - rule_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - component_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - componentId_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - project_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - subProject_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); - line_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - resolution_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - status_ = ""; - bitField0_ = (bitField0_ & ~0x00000100); - message_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); - debt_ = ""; - bitField0_ = (bitField0_ & ~0x00000400); - assignee_ = ""; - bitField0_ = (bitField0_ & ~0x00000800); - reporter_ = ""; - bitField0_ = (bitField0_ & ~0x00001000); - scmAuthor_ = ""; - bitField0_ = (bitField0_ & ~0x00002000); - actionPlan_ = ""; - bitField0_ = (bitField0_ & ~0x00004000); - actionPlanName_ = ""; - bitField0_ = (bitField0_ & ~0x00008000); - attr_ = ""; - bitField0_ = (bitField0_ & ~0x00010000); - tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00020000); - transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00040000); - actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00080000); - if (commentsBuilder_ == null) { - comments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00100000); + /** + * optional string message = 10; + */ + public com.google.protobuf.ByteString + getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + message_ = b; + return b; } else { - commentsBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - creationDate_ = ""; - bitField0_ = (bitField0_ & ~0x00200000); - updateDate_ = ""; - bitField0_ = (bitField0_ & ~0x00400000); - fUpdateAge_ = ""; - bitField0_ = (bitField0_ & ~0x00800000); - closeDate_ = ""; - bitField0_ = (bitField0_ & ~0x01000000); - return this; } - - public Builder clone() { - return create().mergeFrom(buildPartial()); + /** + * optional string message = 10; + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + message_ = value; + onChanged(); + return this; } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Issue_descriptor; + /** + * optional string message = 10; + */ + public Builder clearMessage() { + bitField0_ = (bitField0_ & ~0x00000200); + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; } - - public org.sonarqube.ws.Issues.Issue getDefaultInstanceForType() { - return org.sonarqube.ws.Issues.Issue.getDefaultInstance(); + /** + * optional string message = 10; + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + message_ = value; + onChanged(); + return this; } - public org.sonarqube.ws.Issues.Issue build() { - org.sonarqube.ws.Issues.Issue result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; + private java.lang.Object debt_ = ""; + /** + * optional string debt = 11; + */ + public boolean hasDebt() { + return ((bitField0_ & 0x00000400) == 0x00000400); } - - public org.sonarqube.ws.Issues.Issue buildPartial() { - org.sonarqube.ws.Issues.Issue result = new org.sonarqube.ws.Issues.Issue(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.rule_ = rule_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.component_ = component_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.componentId_ = componentId_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.project_ = project_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.subProject_ = subProject_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.line_ = line_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.resolution_ = resolution_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.status_ = status_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.message_ = message_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.debt_ = debt_; - if (((from_bitField0_ & 0x00000800) == 0x00000800)) { - to_bitField0_ |= 0x00000800; - } - result.assignee_ = assignee_; - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00001000; - } - result.reporter_ = reporter_; - if (((from_bitField0_ & 0x00002000) == 0x00002000)) { - to_bitField0_ |= 0x00002000; - } - result.scmAuthor_ = scmAuthor_; - if (((from_bitField0_ & 0x00004000) == 0x00004000)) { - to_bitField0_ |= 0x00004000; - } - result.actionPlan_ = actionPlan_; - if (((from_bitField0_ & 0x00008000) == 0x00008000)) { - to_bitField0_ |= 0x00008000; - } - result.actionPlanName_ = actionPlanName_; - if (((from_bitField0_ & 0x00010000) == 0x00010000)) { - to_bitField0_ |= 0x00010000; - } - result.attr_ = attr_; - if (((bitField0_ & 0x00020000) == 0x00020000)) { - tags_ = tags_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00020000); - } - result.tags_ = tags_; - if (((bitField0_ & 0x00040000) == 0x00040000)) { - transitions_ = transitions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00040000); - } - result.transitions_ = transitions_; - if (((bitField0_ & 0x00080000) == 0x00080000)) { - actions_ = actions_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00080000); - } - result.actions_ = actions_; - if (commentsBuilder_ == null) { - if (((bitField0_ & 0x00100000) == 0x00100000)) { - comments_ = java.util.Collections.unmodifiableList(comments_); - bitField0_ = (bitField0_ & ~0x00100000); + /** + * optional string debt = 11; + */ + public java.lang.String getDebt() { + java.lang.Object ref = debt_; + 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()) { + debt_ = s; } - result.comments_ = comments_; + return s; } else { - result.comments_ = commentsBuilder_.build(); - } - if (((from_bitField0_ & 0x00200000) == 0x00200000)) { - to_bitField0_ |= 0x00020000; - } - result.creationDate_ = creationDate_; - if (((from_bitField0_ & 0x00400000) == 0x00400000)) { - to_bitField0_ |= 0x00040000; - } - result.updateDate_ = updateDate_; - if (((from_bitField0_ & 0x00800000) == 0x00800000)) { - to_bitField0_ |= 0x00080000; - } - result.fUpdateAge_ = fUpdateAge_; - if (((from_bitField0_ & 0x01000000) == 0x01000000)) { - to_bitField0_ |= 0x00100000; + return (java.lang.String) ref; } - result.closeDate_ = closeDate_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonarqube.ws.Issues.Issue) { - return mergeFrom((org.sonarqube.ws.Issues.Issue)other); + /** + * optional string debt = 11; + */ + public com.google.protobuf.ByteString + getDebtBytes() { + java.lang.Object ref = debt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + debt_ = b; + return b; } else { - super.mergeFrom(other); - return this; + return (com.google.protobuf.ByteString) ref; } } + /** + * optional string debt = 11; + */ + public Builder setDebt( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + debt_ = value; + onChanged(); + return this; + } + /** + * optional string debt = 11; + */ + public Builder clearDebt() { + bitField0_ = (bitField0_ & ~0x00000400); + debt_ = getDefaultInstance().getDebt(); + onChanged(); + return this; + } + /** + * optional string debt = 11; + */ + public Builder setDebtBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + debt_ = value; + onChanged(); + return this; + } - public Builder mergeFrom(org.sonarqube.ws.Issues.Issue other) { - if (other == org.sonarqube.ws.Issues.Issue.getDefaultInstance()) return this; - if (other.hasKey()) { - bitField0_ |= 0x00000001; - key_ = other.key_; - onChanged(); - } - if (other.hasRule()) { - bitField0_ |= 0x00000002; - rule_ = other.rule_; - onChanged(); - } - if (other.hasComponent()) { - bitField0_ |= 0x00000004; - component_ = other.component_; - onChanged(); - } - if (other.hasComponentId()) { - setComponentId(other.getComponentId()); - } - if (other.hasProject()) { - bitField0_ |= 0x00000010; - project_ = other.project_; - onChanged(); - } - if (other.hasSubProject()) { - bitField0_ |= 0x00000020; - subProject_ = other.subProject_; - onChanged(); - } - if (other.hasLine()) { - setLine(other.getLine()); - } - if (other.hasResolution()) { - bitField0_ |= 0x00000080; - resolution_ = other.resolution_; - onChanged(); - } - if (other.hasStatus()) { - bitField0_ |= 0x00000100; - status_ = other.status_; - onChanged(); - } - if (other.hasMessage()) { - bitField0_ |= 0x00000200; - message_ = other.message_; - onChanged(); - } - if (other.hasDebt()) { - bitField0_ |= 0x00000400; - debt_ = other.debt_; - onChanged(); - } - if (other.hasAssignee()) { - bitField0_ |= 0x00000800; - assignee_ = other.assignee_; - onChanged(); - } - if (other.hasReporter()) { - bitField0_ |= 0x00001000; - reporter_ = other.reporter_; - onChanged(); - } - if (other.hasScmAuthor()) { - bitField0_ |= 0x00002000; - scmAuthor_ = other.scmAuthor_; - onChanged(); - } - if (other.hasActionPlan()) { - bitField0_ |= 0x00004000; - actionPlan_ = other.actionPlan_; - onChanged(); - } - if (other.hasActionPlanName()) { - bitField0_ |= 0x00008000; - actionPlanName_ = other.actionPlanName_; - onChanged(); - } - if (other.hasAttr()) { - bitField0_ |= 0x00010000; - attr_ = other.attr_; - onChanged(); - } - if (!other.tags_.isEmpty()) { - if (tags_.isEmpty()) { - tags_ = other.tags_; - bitField0_ = (bitField0_ & ~0x00020000); - } else { - ensureTagsIsMutable(); - tags_.addAll(other.tags_); + private java.lang.Object assignee_ = ""; + /** + * optional string assignee = 12; + */ + public boolean hasAssignee() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional string assignee = 12; + */ + public java.lang.String getAssignee() { + java.lang.Object ref = assignee_; + 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()) { + assignee_ = s; } - onChanged(); + return s; + } else { + return (java.lang.String) ref; } - if (!other.transitions_.isEmpty()) { - if (transitions_.isEmpty()) { - transitions_ = other.transitions_; - bitField0_ = (bitField0_ & ~0x00040000); - } else { - ensureTransitionsIsMutable(); - transitions_.addAll(other.transitions_); + } + /** + * optional string assignee = 12; + */ + public com.google.protobuf.ByteString + getAssigneeBytes() { + java.lang.Object ref = assignee_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + assignee_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string assignee = 12; + */ + public Builder setAssignee( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + assignee_ = value; + onChanged(); + return this; + } + /** + * optional string assignee = 12; + */ + public Builder clearAssignee() { + bitField0_ = (bitField0_ & ~0x00000800); + assignee_ = getDefaultInstance().getAssignee(); + onChanged(); + return this; + } + /** + * optional string assignee = 12; + */ + public Builder setAssigneeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000800; + assignee_ = value; + onChanged(); + return this; + } + + private java.lang.Object reporter_ = ""; + /** + * optional string reporter = 13; + */ + public boolean hasReporter() { + return ((bitField0_ & 0x00001000) == 0x00001000); + } + /** + * optional string reporter = 13; + */ + public java.lang.String getReporter() { + java.lang.Object ref = reporter_; + 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()) { + reporter_ = s; } - onChanged(); + return s; + } else { + return (java.lang.String) ref; } - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00080000); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); + } + /** + * optional string reporter = 13; + */ + public com.google.protobuf.ByteString + getReporterBytes() { + java.lang.Object ref = reporter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + reporter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - if (commentsBuilder_ == null) { - if (!other.comments_.isEmpty()) { - if (comments_.isEmpty()) { - comments_ = other.comments_; - bitField0_ = (bitField0_ & ~0x00100000); - } else { - ensureCommentsIsMutable(); - comments_.addAll(other.comments_); - } - onChanged(); + } + /** + * optional string reporter = 13; + */ + public Builder setReporter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + reporter_ = value; + onChanged(); + return this; + } + /** + * optional string reporter = 13; + */ + public Builder clearReporter() { + bitField0_ = (bitField0_ & ~0x00001000); + reporter_ = getDefaultInstance().getReporter(); + onChanged(); + return this; + } + /** + * optional string reporter = 13; + */ + public Builder setReporterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00001000; + reporter_ = value; + onChanged(); + return this; + } + + private java.lang.Object author_ = ""; + /** + * optional string author = 14; + * + *
+       * SCM login of the committer who introduced the issue
+       * 
+ */ + public boolean hasAuthor() { + return ((bitField0_ & 0x00002000) == 0x00002000); + } + /** + * optional string author = 14; + * + *
+       * SCM login of the committer who introduced the issue
+       * 
+ */ + 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 { - if (!other.comments_.isEmpty()) { - if (commentsBuilder_.isEmpty()) { - commentsBuilder_.dispose(); - commentsBuilder_ = null; - comments_ = other.comments_; - bitField0_ = (bitField0_ & ~0x00100000); - commentsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getCommentsFieldBuilder() : null; - } else { - commentsBuilder_.addAllMessages(other.comments_); - } - } - } - if (other.hasCreationDate()) { - bitField0_ |= 0x00200000; - creationDate_ = other.creationDate_; - onChanged(); - } - if (other.hasUpdateDate()) { - bitField0_ |= 0x00400000; - updateDate_ = other.updateDate_; - onChanged(); - } - if (other.hasFUpdateAge()) { - bitField0_ |= 0x00800000; - fUpdateAge_ = other.fUpdateAge_; - onChanged(); + return (java.lang.String) ref; } - if (other.hasCloseDate()) { - bitField0_ |= 0x01000000; - closeDate_ = other.closeDate_; - onChanged(); + } + /** + * optional string author = 14; + * + *
+       * SCM login of the committer who introduced the issue
+       * 
+ */ + 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; } - this.mergeUnknownFields(other.getUnknownFields()); + } + /** + * optional string author = 14; + * + *
+       * SCM login of the committer who introduced the issue
+       * 
+ */ + public Builder setAuthor( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + author_ = value; + onChanged(); return this; } - - public final boolean isInitialized() { - return true; + /** + * optional string author = 14; + * + *
+       * SCM login of the committer who introduced the issue
+       * 
+ */ + public Builder clearAuthor() { + bitField0_ = (bitField0_ & ~0x00002000); + author_ = getDefaultInstance().getAuthor(); + onChanged(); + return this; + } + /** + * optional string author = 14; + * + *
+       * SCM login of the committer who introduced the issue
+       * 
+ */ + public Builder setAuthorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00002000; + author_ = value; + onChanged(); + return this; } - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.sonarqube.ws.Issues.Issue parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonarqube.ws.Issues.Issue) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + private java.lang.Object actionPlan_ = ""; + /** + * optional string actionPlan = 15; + */ + public boolean hasActionPlan() { + return ((bitField0_ & 0x00004000) == 0x00004000); + } + /** + * optional string actionPlan = 15; + */ + public java.lang.String getActionPlan() { + java.lang.Object ref = actionPlan_; + 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()) { + actionPlan_ = s; } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string actionPlan = 15; + */ + public com.google.protobuf.ByteString + getActionPlanBytes() { + java.lang.Object ref = actionPlan_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + actionPlan_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } + /** + * optional string actionPlan = 15; + */ + public Builder setActionPlan( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + actionPlan_ = value; + onChanged(); + return this; + } + /** + * optional string actionPlan = 15; + */ + public Builder clearActionPlan() { + bitField0_ = (bitField0_ & ~0x00004000); + actionPlan_ = getDefaultInstance().getActionPlan(); + onChanged(); + return this; + } + /** + * optional string actionPlan = 15; + */ + public Builder setActionPlanBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00004000; + actionPlan_ = value; + onChanged(); return this; } - private int bitField0_; - private java.lang.Object key_ = ""; + private java.lang.Object actionPlanName_ = ""; /** - * optional string key = 1; + * optional string actionPlanName = 16; */ - public boolean hasKey() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public boolean hasActionPlanName() { + return ((bitField0_ & 0x00008000) == 0x00008000); } /** - * optional string key = 1; + * optional string actionPlanName = 16; */ - public java.lang.String getKey() { - java.lang.Object ref = key_; + public java.lang.String getActionPlanName() { + java.lang.Object ref = actionPlanName_; 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; + actionPlanName_ = s; } return s; } else { @@ -5098,75 +7848,75 @@ public final class Issues { } } /** - * optional string key = 1; + * optional string actionPlanName = 16; */ public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; + getActionPlanNameBytes() { + java.lang.Object ref = actionPlanName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - key_ = b; + actionPlanName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string key = 1; + * optional string actionPlanName = 16; */ - public Builder setKey( + public Builder setActionPlanName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - key_ = value; + bitField0_ |= 0x00008000; + actionPlanName_ = value; onChanged(); return this; } /** - * optional string key = 1; + * optional string actionPlanName = 16; */ - public Builder clearKey() { - bitField0_ = (bitField0_ & ~0x00000001); - key_ = getDefaultInstance().getKey(); + public Builder clearActionPlanName() { + bitField0_ = (bitField0_ & ~0x00008000); + actionPlanName_ = getDefaultInstance().getActionPlanName(); onChanged(); return this; } /** - * optional string key = 1; + * optional string actionPlanName = 16; */ - public Builder setKeyBytes( + public Builder setActionPlanNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - key_ = value; + bitField0_ |= 0x00008000; + actionPlanName_ = value; onChanged(); return this; } - private java.lang.Object rule_ = ""; + private java.lang.Object attr_ = ""; /** - * optional string rule = 2; + * optional string attr = 17; */ - public boolean hasRule() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public boolean hasAttr() { + return ((bitField0_ & 0x00010000) == 0x00010000); } /** - * optional string rule = 2; + * optional string attr = 17; */ - public java.lang.String getRule() { - java.lang.Object ref = rule_; + public java.lang.String getAttr() { + java.lang.Object ref = attr_; 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()) { - rule_ = s; + attr_ = s; } return s; } else { @@ -5174,595 +7924,722 @@ public final class Issues { } } /** - * optional string rule = 2; + * optional string attr = 17; */ public com.google.protobuf.ByteString - getRuleBytes() { - java.lang.Object ref = rule_; + getAttrBytes() { + java.lang.Object ref = attr_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - rule_ = b; + attr_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string rule = 2; + * optional string attr = 17; */ - public Builder setRule( + public Builder setAttr( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - rule_ = value; + bitField0_ |= 0x00010000; + attr_ = value; onChanged(); return this; } /** - * optional string rule = 2; + * optional string attr = 17; */ - public Builder clearRule() { - bitField0_ = (bitField0_ & ~0x00000002); - rule_ = getDefaultInstance().getRule(); + public Builder clearAttr() { + bitField0_ = (bitField0_ & ~0x00010000); + attr_ = getDefaultInstance().getAttr(); onChanged(); return this; } /** - * optional string rule = 2; + * optional string attr = 17; */ - public Builder setRuleBytes( + public Builder setAttrBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - rule_ = value; + bitField0_ |= 0x00010000; + attr_ = value; onChanged(); return this; } - private java.lang.Object component_ = ""; + private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00020000) == 0x00020000)) { + tags_ = new com.google.protobuf.LazyStringArrayList(tags_); + bitField0_ |= 0x00020000; + } + } /** - * optional string component = 3; + * repeated string tags = 18; */ - public boolean hasComponent() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public com.google.protobuf.ProtocolStringList + getTagsList() { + return tags_.getUnmodifiableView(); } /** - * optional string component = 3; + * repeated string tags = 18; */ - public java.lang.String getComponent() { - java.lang.Object ref = component_; - 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()) { - component_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } + public int getTagsCount() { + return tags_.size(); + } + /** + * repeated string tags = 18; + */ + public java.lang.String getTags(int index) { + return tags_.get(index); + } + /** + * repeated string tags = 18; + */ + public com.google.protobuf.ByteString + getTagsBytes(int index) { + return tags_.getByteString(index); + } + /** + * repeated string tags = 18; + */ + public Builder setTags( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string tags = 18; + */ + public Builder addTags( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + /** + * repeated string tags = 18; + */ + public Builder addAllTags( + java.lang.Iterable values) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + return this; + } + /** + * repeated string tags = 18; + */ + public Builder clearTags() { + tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + return this; + } + /** + * repeated string tags = 18; + */ + public Builder addTagsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagsIsMutable(); + tags_.add(value); + onChanged(); + return this; + } + + private boolean transitionsPresentIfEmpty_ ; + /** + * optional bool transitionsPresentIfEmpty = 19; + * + *
+       * the transitions allowed for the requesting user.
+       * 
+ */ + public boolean hasTransitionsPresentIfEmpty() { + return ((bitField0_ & 0x00040000) == 0x00040000); + } + /** + * optional bool transitionsPresentIfEmpty = 19; + * + *
+       * the transitions allowed for the requesting user.
+       * 
+ */ + public boolean getTransitionsPresentIfEmpty() { + return transitionsPresentIfEmpty_; + } + /** + * optional bool transitionsPresentIfEmpty = 19; + * + *
+       * the transitions allowed for the requesting user.
+       * 
+ */ + public Builder setTransitionsPresentIfEmpty(boolean value) { + bitField0_ |= 0x00040000; + transitionsPresentIfEmpty_ = value; + onChanged(); + return this; + } + /** + * optional bool transitionsPresentIfEmpty = 19; + * + *
+       * the transitions allowed for the requesting user.
+       * 
+ */ + public Builder clearTransitionsPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00040000); + transitionsPresentIfEmpty_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureTransitionsIsMutable() { + if (!((bitField0_ & 0x00080000) == 0x00080000)) { + transitions_ = new com.google.protobuf.LazyStringArrayList(transitions_); + bitField0_ |= 0x00080000; + } + } + /** + * repeated string transitions = 20; + */ + public com.google.protobuf.ProtocolStringList + getTransitionsList() { + return transitions_.getUnmodifiableView(); + } + /** + * repeated string transitions = 20; + */ + public int getTransitionsCount() { + return transitions_.size(); + } + /** + * repeated string transitions = 20; + */ + public java.lang.String getTransitions(int index) { + return transitions_.get(index); } /** - * optional string component = 3; + * repeated string transitions = 20; */ public com.google.protobuf.ByteString - getComponentBytes() { - java.lang.Object ref = component_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - component_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + getTransitionsBytes(int index) { + return transitions_.getByteString(index); } /** - * optional string component = 3; + * repeated string transitions = 20; */ - public Builder setComponent( + public Builder setTransitions( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransitionsIsMutable(); + transitions_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string transitions = 20; + */ + public Builder addTransitions( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - component_ = value; + ensureTransitionsIsMutable(); + transitions_.add(value); onChanged(); return this; } /** - * optional string component = 3; + * repeated string transitions = 20; */ - public Builder clearComponent() { - bitField0_ = (bitField0_ & ~0x00000004); - component_ = getDefaultInstance().getComponent(); + public Builder addAllTransitions( + java.lang.Iterable values) { + ensureTransitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, transitions_); onChanged(); return this; } /** - * optional string component = 3; + * repeated string transitions = 20; */ - public Builder setComponentBytes( + public Builder clearTransitions() { + transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00080000); + onChanged(); + return this; + } + /** + * repeated string transitions = 20; + */ + public Builder addTransitionsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - component_ = value; + ensureTransitionsIsMutable(); + transitions_.add(value); onChanged(); return this; } - private int componentId_ ; + private boolean actionsPresentIfEmpty_ ; /** - * optional int32 componentId = 4; + * optional bool actionsPresentIfEmpty = 21; + * + *
+       * the actions allowed for the requesting user.
+       * 
*/ - public boolean hasComponentId() { - return ((bitField0_ & 0x00000008) == 0x00000008); + public boolean hasActionsPresentIfEmpty() { + return ((bitField0_ & 0x00100000) == 0x00100000); } /** - * optional int32 componentId = 4; + * optional bool actionsPresentIfEmpty = 21; + * + *
+       * the actions allowed for the requesting user.
+       * 
*/ - public int getComponentId() { - return componentId_; + public boolean getActionsPresentIfEmpty() { + return actionsPresentIfEmpty_; } /** - * optional int32 componentId = 4; + * optional bool actionsPresentIfEmpty = 21; + * + *
+       * the actions allowed for the requesting user.
+       * 
*/ - public Builder setComponentId(int value) { - bitField0_ |= 0x00000008; - componentId_ = value; + public Builder setActionsPresentIfEmpty(boolean value) { + bitField0_ |= 0x00100000; + actionsPresentIfEmpty_ = value; onChanged(); return this; } /** - * optional int32 componentId = 4; + * optional bool actionsPresentIfEmpty = 21; + * + *
+       * the actions allowed for the requesting user.
+       * 
*/ - public Builder clearComponentId() { - bitField0_ = (bitField0_ & ~0x00000008); - componentId_ = 0; + public Builder clearActionsPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00100000); + actionsPresentIfEmpty_ = false; onChanged(); return this; } - private java.lang.Object project_ = ""; + private com.google.protobuf.LazyStringList actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00200000) == 0x00200000)) { + actions_ = new com.google.protobuf.LazyStringArrayList(actions_); + bitField0_ |= 0x00200000; + } + } /** - * optional string project = 5; + * repeated string actions = 22; */ - public boolean hasProject() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public com.google.protobuf.ProtocolStringList + getActionsList() { + return actions_.getUnmodifiableView(); } /** - * optional string project = 5; + * repeated string actions = 22; */ - public java.lang.String getProject() { - java.lang.Object ref = project_; - 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()) { - project_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } + public int getActionsCount() { + return actions_.size(); } /** - * optional string project = 5; + * repeated string actions = 22; + */ + public java.lang.String getActions(int index) { + return actions_.get(index); + } + /** + * repeated string actions = 22; */ public com.google.protobuf.ByteString - getProjectBytes() { - java.lang.Object ref = project_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - project_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + getActionsBytes(int index) { + return actions_.getByteString(index); } /** - * optional string project = 5; + * repeated string actions = 22; */ - public Builder setProject( - java.lang.String value) { + public Builder setActions( + int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; - project_ = value; - onChanged(); - return this; - } - /** - * optional string project = 5; - */ - public Builder clearProject() { - bitField0_ = (bitField0_ & ~0x00000010); - project_ = getDefaultInstance().getProject(); + ensureActionsIsMutable(); + actions_.set(index, value); onChanged(); return this; } /** - * optional string project = 5; + * repeated string actions = 22; */ - public Builder setProjectBytes( - com.google.protobuf.ByteString value) { + public Builder addActions( + java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; - project_ = value; + ensureActionsIsMutable(); + actions_.add(value); onChanged(); return this; } - - private java.lang.Object subProject_ = ""; - /** - * optional string subProject = 6; - */ - public boolean hasSubProject() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional string subProject = 6; - */ - public java.lang.String getSubProject() { - java.lang.Object ref = subProject_; - 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()) { - subProject_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string subProject = 6; - */ - public com.google.protobuf.ByteString - getSubProjectBytes() { - java.lang.Object ref = subProject_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - subProject_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } /** - * optional string subProject = 6; + * repeated string actions = 22; */ - public Builder setSubProject( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000020; - subProject_ = value; + public Builder addAllActions( + java.lang.Iterable values) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); onChanged(); return this; } /** - * optional string subProject = 6; + * repeated string actions = 22; */ - public Builder clearSubProject() { - bitField0_ = (bitField0_ & ~0x00000020); - subProject_ = getDefaultInstance().getSubProject(); + public Builder clearActions() { + actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00200000); onChanged(); return this; } /** - * optional string subProject = 6; + * repeated string actions = 22; */ - public Builder setSubProjectBytes( + public Builder addActionsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; - subProject_ = value; + ensureActionsIsMutable(); + actions_.add(value); onChanged(); return this; } - private int line_ ; + private boolean commentsPresentIfEmpty_ ; /** - * optional int32 line = 7; + * optional bool commentsPresentIfEmpty = 23; */ - public boolean hasLine() { - return ((bitField0_ & 0x00000040) == 0x00000040); + public boolean hasCommentsPresentIfEmpty() { + return ((bitField0_ & 0x00400000) == 0x00400000); } /** - * optional int32 line = 7; + * optional bool commentsPresentIfEmpty = 23; */ - public int getLine() { - return line_; + public boolean getCommentsPresentIfEmpty() { + return commentsPresentIfEmpty_; } /** - * optional int32 line = 7; + * optional bool commentsPresentIfEmpty = 23; */ - public Builder setLine(int value) { - bitField0_ |= 0x00000040; - line_ = value; + public Builder setCommentsPresentIfEmpty(boolean value) { + bitField0_ |= 0x00400000; + commentsPresentIfEmpty_ = value; onChanged(); return this; } /** - * optional int32 line = 7; + * optional bool commentsPresentIfEmpty = 23; */ - public Builder clearLine() { - bitField0_ = (bitField0_ & ~0x00000040); - line_ = 0; + public Builder clearCommentsPresentIfEmpty() { + bitField0_ = (bitField0_ & ~0x00400000); + commentsPresentIfEmpty_ = false; onChanged(); return this; } - private java.lang.Object resolution_ = ""; + private java.util.List comments_ = + java.util.Collections.emptyList(); + private void ensureCommentsIsMutable() { + if (!((bitField0_ & 0x00800000) == 0x00800000)) { + comments_ = new java.util.ArrayList(comments_); + bitField0_ |= 0x00800000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.Comment, org.sonarqube.ws.Issues.Comment.Builder, org.sonarqube.ws.Issues.CommentOrBuilder> commentsBuilder_; + /** - * optional string resolution = 8; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public boolean hasResolution() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public java.util.List getCommentsList() { + if (commentsBuilder_ == null) { + return java.util.Collections.unmodifiableList(comments_); + } else { + return commentsBuilder_.getMessageList(); + } } /** - * optional string resolution = 8; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public java.lang.String getResolution() { - java.lang.Object ref = resolution_; - 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()) { - resolution_ = s; - } - return s; + public int getCommentsCount() { + if (commentsBuilder_ == null) { + return comments_.size(); } else { - return (java.lang.String) ref; + return commentsBuilder_.getCount(); } } /** - * optional string resolution = 8; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public com.google.protobuf.ByteString - getResolutionBytes() { - java.lang.Object ref = resolution_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - resolution_ = b; - return b; + public org.sonarqube.ws.Issues.Comment getComments(int index) { + if (commentsBuilder_ == null) { + return comments_.get(index); } else { - return (com.google.protobuf.ByteString) ref; + return commentsBuilder_.getMessage(index); } } /** - * optional string resolution = 8; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder setResolution( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - resolution_ = value; - onChanged(); + public Builder setComments( + int index, org.sonarqube.ws.Issues.Comment value) { + if (commentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentsIsMutable(); + comments_.set(index, value); + onChanged(); + } else { + commentsBuilder_.setMessage(index, value); + } return this; } /** - * optional string resolution = 8; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder clearResolution() { - bitField0_ = (bitField0_ & ~0x00000080); - resolution_ = getDefaultInstance().getResolution(); - onChanged(); + public Builder setComments( + int index, org.sonarqube.ws.Issues.Comment.Builder builderForValue) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.set(index, builderForValue.build()); + onChanged(); + } else { + commentsBuilder_.setMessage(index, builderForValue.build()); + } return this; } /** - * optional string resolution = 8; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder setResolutionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000080; - resolution_ = value; - onChanged(); + public Builder addComments(org.sonarqube.ws.Issues.Comment value) { + if (commentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentsIsMutable(); + comments_.add(value); + onChanged(); + } else { + commentsBuilder_.addMessage(value); + } return this; } - - private java.lang.Object status_ = ""; /** - * optional string status = 9; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public boolean hasStatus() { - return ((bitField0_ & 0x00000100) == 0x00000100); + public Builder addComments( + int index, org.sonarqube.ws.Issues.Comment value) { + if (commentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCommentsIsMutable(); + comments_.add(index, value); + onChanged(); + } else { + commentsBuilder_.addMessage(index, value); + } + return this; } /** - * optional string status = 9; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public java.lang.String getStatus() { - java.lang.Object ref = status_; - 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()) { - status_ = s; - } - return s; + public Builder addComments( + org.sonarqube.ws.Issues.Comment.Builder builderForValue) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.add(builderForValue.build()); + onChanged(); } else { - return (java.lang.String) ref; + commentsBuilder_.addMessage(builderForValue.build()); } + return this; } /** - * optional string status = 9; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public com.google.protobuf.ByteString - getStatusBytes() { - java.lang.Object ref = status_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - status_ = b; - return b; + public Builder addComments( + int index, org.sonarqube.ws.Issues.Comment.Builder builderForValue) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.add(index, builderForValue.build()); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + commentsBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** - * optional string status = 9; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder setStatus( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - status_ = value; - onChanged(); + public Builder addAllComments( + java.lang.Iterable values) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, comments_); + onChanged(); + } else { + commentsBuilder_.addAllMessages(values); + } return this; } /** - * optional string status = 9; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder clearStatus() { - bitField0_ = (bitField0_ & ~0x00000100); - status_ = getDefaultInstance().getStatus(); - onChanged(); + public Builder clearComments() { + if (commentsBuilder_ == null) { + comments_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00800000); + onChanged(); + } else { + commentsBuilder_.clear(); + } return this; } /** - * optional string status = 9; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder setStatusBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; - status_ = value; - onChanged(); + public Builder removeComments(int index) { + if (commentsBuilder_ == null) { + ensureCommentsIsMutable(); + comments_.remove(index); + onChanged(); + } else { + commentsBuilder_.remove(index); + } return this; } - - private java.lang.Object message_ = ""; /** - * optional string message = 10; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public boolean hasMessage() { - return ((bitField0_ & 0x00000200) == 0x00000200); + public org.sonarqube.ws.Issues.Comment.Builder getCommentsBuilder( + int index) { + return getCommentsFieldBuilder().getBuilder(index); } /** - * optional string message = 10; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - 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()) { - message_ = s; - } - return s; - } else { - return (java.lang.String) ref; + public org.sonarqube.ws.Issues.CommentOrBuilder getCommentsOrBuilder( + int index) { + if (commentsBuilder_ == null) { + return comments_.get(index); } else { + return commentsBuilder_.getMessageOrBuilder(index); } } /** - * optional string message = 10; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public com.google.protobuf.ByteString - getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - message_ = b; - return b; + public java.util.List + getCommentsOrBuilderList() { + if (commentsBuilder_ != null) { + return commentsBuilder_.getMessageOrBuilderList(); } else { - return (com.google.protobuf.ByteString) ref; + return java.util.Collections.unmodifiableList(comments_); } } /** - * optional string message = 10; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder setMessage( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - message_ = value; - onChanged(); - return this; + public org.sonarqube.ws.Issues.Comment.Builder addCommentsBuilder() { + return getCommentsFieldBuilder().addBuilder( + org.sonarqube.ws.Issues.Comment.getDefaultInstance()); } /** - * optional string message = 10; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder clearMessage() { - bitField0_ = (bitField0_ & ~0x00000200); - message_ = getDefaultInstance().getMessage(); - onChanged(); - return this; + public org.sonarqube.ws.Issues.Comment.Builder addCommentsBuilder( + int index) { + return getCommentsFieldBuilder().addBuilder( + index, org.sonarqube.ws.Issues.Comment.getDefaultInstance()); } /** - * optional string message = 10; + * repeated .sonarqube.ws.issues.Comment comments = 24; */ - public Builder setMessageBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; - message_ = value; - onChanged(); - return this; + public java.util.List + getCommentsBuilderList() { + return getCommentsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.Comment, org.sonarqube.ws.Issues.Comment.Builder, org.sonarqube.ws.Issues.CommentOrBuilder> + getCommentsFieldBuilder() { + if (commentsBuilder_ == null) { + commentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Issues.Comment, org.sonarqube.ws.Issues.Comment.Builder, org.sonarqube.ws.Issues.CommentOrBuilder>( + comments_, + ((bitField0_ & 0x00800000) == 0x00800000), + getParentForChildren(), + isClean()); + comments_ = null; + } + return commentsBuilder_; } - private java.lang.Object debt_ = ""; + private java.lang.Object creationDate_ = ""; /** - * optional string debt = 11; + * optional string creationDate = 25; */ - public boolean hasDebt() { - return ((bitField0_ & 0x00000400) == 0x00000400); + public boolean hasCreationDate() { + return ((bitField0_ & 0x01000000) == 0x01000000); } /** - * optional string debt = 11; + * optional string creationDate = 25; */ - public java.lang.String getDebt() { - java.lang.Object ref = debt_; + public java.lang.String getCreationDate() { + java.lang.Object ref = creationDate_; 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()) { - debt_ = s; + creationDate_ = s; } return s; } else { @@ -5770,75 +8647,75 @@ public final class Issues { } } /** - * optional string debt = 11; + * optional string creationDate = 25; */ public com.google.protobuf.ByteString - getDebtBytes() { - java.lang.Object ref = debt_; + getCreationDateBytes() { + java.lang.Object ref = creationDate_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - debt_ = b; + creationDate_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string debt = 11; + * optional string creationDate = 25; */ - public Builder setDebt( + public Builder setCreationDate( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; - debt_ = value; + bitField0_ |= 0x01000000; + creationDate_ = value; onChanged(); return this; } /** - * optional string debt = 11; + * optional string creationDate = 25; */ - public Builder clearDebt() { - bitField0_ = (bitField0_ & ~0x00000400); - debt_ = getDefaultInstance().getDebt(); + public Builder clearCreationDate() { + bitField0_ = (bitField0_ & ~0x01000000); + creationDate_ = getDefaultInstance().getCreationDate(); onChanged(); return this; } /** - * optional string debt = 11; + * optional string creationDate = 25; */ - public Builder setDebtBytes( + public Builder setCreationDateBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; - debt_ = value; + bitField0_ |= 0x01000000; + creationDate_ = value; onChanged(); return this; } - private java.lang.Object assignee_ = ""; + private java.lang.Object updateDate_ = ""; /** - * optional string assignee = 12; + * optional string updateDate = 26; */ - public boolean hasAssignee() { - return ((bitField0_ & 0x00000800) == 0x00000800); + public boolean hasUpdateDate() { + return ((bitField0_ & 0x02000000) == 0x02000000); } /** - * optional string assignee = 12; + * optional string updateDate = 26; */ - public java.lang.String getAssignee() { - java.lang.Object ref = assignee_; + public java.lang.String getUpdateDate() { + java.lang.Object ref = updateDate_; 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()) { - assignee_ = s; + updateDate_ = s; } return s; } else { @@ -5846,75 +8723,75 @@ public final class Issues { } } /** - * optional string assignee = 12; + * optional string updateDate = 26; */ public com.google.protobuf.ByteString - getAssigneeBytes() { - java.lang.Object ref = assignee_; + getUpdateDateBytes() { + java.lang.Object ref = updateDate_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - assignee_ = b; + updateDate_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string assignee = 12; + * optional string updateDate = 26; */ - public Builder setAssignee( + public Builder setUpdateDate( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000800; - assignee_ = value; + bitField0_ |= 0x02000000; + updateDate_ = value; onChanged(); return this; } /** - * optional string assignee = 12; + * optional string updateDate = 26; */ - public Builder clearAssignee() { - bitField0_ = (bitField0_ & ~0x00000800); - assignee_ = getDefaultInstance().getAssignee(); + public Builder clearUpdateDate() { + bitField0_ = (bitField0_ & ~0x02000000); + updateDate_ = getDefaultInstance().getUpdateDate(); onChanged(); return this; } /** - * optional string assignee = 12; + * optional string updateDate = 26; */ - public Builder setAssigneeBytes( + public Builder setUpdateDateBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000800; - assignee_ = value; + bitField0_ |= 0x02000000; + updateDate_ = value; onChanged(); return this; } - private java.lang.Object reporter_ = ""; + private java.lang.Object fUpdateAge_ = ""; /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ - public boolean hasReporter() { - return ((bitField0_ & 0x00001000) == 0x00001000); + public boolean hasFUpdateAge() { + return ((bitField0_ & 0x04000000) == 0x04000000); } /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ - public java.lang.String getReporter() { - java.lang.Object ref = reporter_; + public java.lang.String getFUpdateAge() { + java.lang.Object ref = fUpdateAge_; 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()) { - reporter_ = s; + fUpdateAge_ = s; } return s; } else { @@ -5922,75 +8799,75 @@ public final class Issues { } } /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ public com.google.protobuf.ByteString - getReporterBytes() { - java.lang.Object ref = reporter_; + getFUpdateAgeBytes() { + java.lang.Object ref = fUpdateAge_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - reporter_ = b; + fUpdateAge_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ - public Builder setReporter( + public Builder setFUpdateAge( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00001000; - reporter_ = value; + bitField0_ |= 0x04000000; + fUpdateAge_ = value; onChanged(); return this; } /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ - public Builder clearReporter() { - bitField0_ = (bitField0_ & ~0x00001000); - reporter_ = getDefaultInstance().getReporter(); + public Builder clearFUpdateAge() { + bitField0_ = (bitField0_ & ~0x04000000); + fUpdateAge_ = getDefaultInstance().getFUpdateAge(); onChanged(); return this; } /** - * optional string reporter = 13; + * optional string fUpdateAge = 27; */ - public Builder setReporterBytes( + public Builder setFUpdateAgeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00001000; - reporter_ = value; + bitField0_ |= 0x04000000; + fUpdateAge_ = value; onChanged(); return this; } - private java.lang.Object scmAuthor_ = ""; + private java.lang.Object closeDate_ = ""; /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ - public boolean hasScmAuthor() { - return ((bitField0_ & 0x00002000) == 0x00002000); + public boolean hasCloseDate() { + return ((bitField0_ & 0x08000000) == 0x08000000); } /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ - public java.lang.String getScmAuthor() { - java.lang.Object ref = scmAuthor_; + public java.lang.String getCloseDate() { + java.lang.Object ref = closeDate_; 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()) { - scmAuthor_ = s; + closeDate_ = s; } return s; } else { @@ -5998,822 +8875,1339 @@ public final class Issues { } } /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ public com.google.protobuf.ByteString - getScmAuthorBytes() { - java.lang.Object ref = scmAuthor_; + getCloseDateBytes() { + java.lang.Object ref = closeDate_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - scmAuthor_ = b; + closeDate_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ - public Builder setScmAuthor( + public Builder setCloseDate( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00002000; - scmAuthor_ = value; + bitField0_ |= 0x08000000; + closeDate_ = value; onChanged(); return this; } /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ - public Builder clearScmAuthor() { - bitField0_ = (bitField0_ & ~0x00002000); - scmAuthor_ = getDefaultInstance().getScmAuthor(); + public Builder clearCloseDate() { + bitField0_ = (bitField0_ & ~0x08000000); + closeDate_ = getDefaultInstance().getCloseDate(); onChanged(); return this; } /** - * optional string scmAuthor = 14; + * optional string closeDate = 28; */ - public Builder setScmAuthorBytes( + public Builder setCloseDateBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00002000; - scmAuthor_ = value; - onChanged(); - return this; - } + bitField0_ |= 0x08000000; + closeDate_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Issue) + } + + static { + defaultInstance = new Issue(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Issue) + } + + public interface CommentOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.issues.Comment) + com.google.protobuf.MessageOrBuilder { + + /** + * 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 login = 2; + */ + boolean hasLogin(); + /** + * optional string login = 2; + */ + java.lang.String getLogin(); + /** + * optional string login = 2; + */ + com.google.protobuf.ByteString + getLoginBytes(); + + /** + * optional string email = 3; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + boolean hasEmail(); + /** + * optional string email = 3; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + java.lang.String getEmail(); + /** + * optional string email = 3; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + com.google.protobuf.ByteString + getEmailBytes(); + + /** + * optional string userName = 4; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + boolean hasUserName(); + /** + * optional string userName = 4; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + java.lang.String getUserName(); + /** + * optional string userName = 4; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + com.google.protobuf.ByteString + getUserNameBytes(); + + /** + * optional string htmlText = 5; + */ + boolean hasHtmlText(); + /** + * optional string htmlText = 5; + */ + java.lang.String getHtmlText(); + /** + * optional string htmlText = 5; + */ + com.google.protobuf.ByteString + getHtmlTextBytes(); + + /** + * optional string markdown = 6; + * + *
+     * TODO rename markdownText ?
+     * 
+ */ + boolean hasMarkdown(); + /** + * optional string markdown = 6; + * + *
+     * TODO rename markdownText ?
+     * 
+ */ + java.lang.String getMarkdown(); + /** + * optional string markdown = 6; + * + *
+     * TODO rename markdownText ?
+     * 
+ */ + com.google.protobuf.ByteString + getMarkdownBytes(); + + /** + * optional bool updatable = 7; + */ + boolean hasUpdatable(); + /** + * optional bool updatable = 7; + */ + boolean getUpdatable(); + + /** + * optional string createdAt = 8; + */ + boolean hasCreatedAt(); + /** + * optional string createdAt = 8; + */ + java.lang.String getCreatedAt(); + /** + * optional string createdAt = 8; + */ + com.google.protobuf.ByteString + getCreatedAtBytes(); + } + /** + * Protobuf type {@code sonarqube.ws.issues.Comment} + */ + public static final class Comment extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Comment) + CommentOrBuilder { + // Use Comment.newBuilder() to construct. + private Comment(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Comment(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private java.lang.Object actionPlan_ = ""; - /** - * optional string actionPlan = 15; - */ - public boolean hasActionPlan() { - return ((bitField0_ & 0x00004000) == 0x00004000); - } - /** - * optional string actionPlan = 15; - */ - public java.lang.String getActionPlan() { - java.lang.Object ref = actionPlan_; - 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()) { - actionPlan_ = s; + private static final Comment defaultInstance; + public static Comment getDefaultInstance() { + return defaultInstance; + } + + public Comment getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Comment( + 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; + login_ = bs; + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + email_ = bs; + break; + } + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000008; + userName_ = bs; + break; + } + case 42: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000010; + htmlText_ = bs; + break; + } + case 50: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000020; + markdown_ = bs; + break; + } + case 56: { + bitField0_ |= 0x00000040; + updatable_ = input.readBool(); + break; + } + case 66: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000080; + createdAt_ = bs; + break; + } } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string actionPlan = 15; - */ - public com.google.protobuf.ByteString - getActionPlanBytes() { - java.lang.Object ref = actionPlan_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - actionPlan_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) 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 actionPlan = 15; - */ - public Builder setActionPlan( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00004000; - actionPlan_ = value; - onChanged(); - return this; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Issues.Comment.class, org.sonarqube.ws.Issues.Comment.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Comment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Comment(input, extensionRegistry); } - /** - * optional string actionPlan = 15; - */ - public Builder clearActionPlan() { - bitField0_ = (bitField0_ & ~0x00004000); - actionPlan_ = getDefaultInstance().getActionPlan(); - onChanged(); - return this; + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + 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) { + 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 actionPlan = 15; - */ - public Builder setActionPlanBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00004000; - actionPlan_ = value; - onChanged(); - return this; + } + /** + * optional string key = 1; + */ + 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 actionPlanName_ = ""; - /** - * optional string actionPlanName = 16; - */ - public boolean hasActionPlanName() { - return ((bitField0_ & 0x00008000) == 0x00008000); - } - /** - * optional string actionPlanName = 16; - */ - public java.lang.String getActionPlanName() { - java.lang.Object ref = actionPlanName_; - 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()) { - actionPlanName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * optional string actionPlanName = 16; - */ - public com.google.protobuf.ByteString - getActionPlanNameBytes() { - java.lang.Object ref = actionPlanName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - actionPlanName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final int LOGIN_FIELD_NUMBER = 2; + private java.lang.Object login_; + /** + * optional string login = 2; + */ + public boolean hasLogin() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string login = 2; + */ + public java.lang.String getLogin() { + java.lang.Object ref = login_; + 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()) { + login_ = s; } + return s; } - /** - * optional string actionPlanName = 16; - */ - public Builder setActionPlanName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00008000; - actionPlanName_ = value; - onChanged(); - return this; + } + /** + * optional string login = 2; + */ + public com.google.protobuf.ByteString + getLoginBytes() { + java.lang.Object ref = login_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + login_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * optional string actionPlanName = 16; - */ - public Builder clearActionPlanName() { - bitField0_ = (bitField0_ & ~0x00008000); - actionPlanName_ = getDefaultInstance().getActionPlanName(); - onChanged(); - return this; + } + + public static final int EMAIL_FIELD_NUMBER = 3; + private java.lang.Object email_; + /** + * optional string email = 3; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + public boolean hasEmail() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string email = 3; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + 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()) { + email_ = s; + } + return s; } - /** - * optional string actionPlanName = 16; - */ - public Builder setActionPlanNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00008000; - actionPlanName_ = value; - onChanged(); - return this; + } + /** + * optional string email = 3; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - private java.lang.Object attr_ = ""; - /** - * optional string attr = 17; - */ - public boolean hasAttr() { - return ((bitField0_ & 0x00010000) == 0x00010000); - } - /** - * optional string attr = 17; - */ - public java.lang.String getAttr() { - java.lang.Object ref = attr_; - 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()) { - attr_ = s; - } - return s; - } else { - return (java.lang.String) ref; + public static final int USERNAME_FIELD_NUMBER = 4; + private java.lang.Object userName_; + /** + * optional string userName = 4; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + public boolean hasUserName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string userName = 4; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + 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()) { + userName_ = s; } + return s; + } + } + /** + * optional string userName = 4; + * + *
+     * TODO drop, it's already in field "users"
+     * 
+ */ + public com.google.protobuf.ByteString + getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * optional string attr = 17; - */ - public com.google.protobuf.ByteString - getAttrBytes() { - java.lang.Object ref = attr_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attr_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + } + + public static final int HTMLTEXT_FIELD_NUMBER = 5; + private java.lang.Object htmlText_; + /** + * optional string htmlText = 5; + */ + public boolean hasHtmlText() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional string htmlText = 5; + */ + public java.lang.String getHtmlText() { + java.lang.Object ref = htmlText_; + 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()) { + htmlText_ = s; } + return s; } - /** - * optional string attr = 17; - */ - public Builder setAttr( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00010000; - attr_ = value; - onChanged(); - return this; - } - /** - * optional string attr = 17; - */ - public Builder clearAttr() { - bitField0_ = (bitField0_ & ~0x00010000); - attr_ = getDefaultInstance().getAttr(); - onChanged(); - return this; - } - /** - * optional string attr = 17; - */ - public Builder setAttrBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00010000; - attr_ = value; - onChanged(); - return this; + } + /** + * optional string htmlText = 5; + */ + public com.google.protobuf.ByteString + getHtmlTextBytes() { + java.lang.Object ref = htmlText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + htmlText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } + } - private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTagsIsMutable() { - if (!((bitField0_ & 0x00020000) == 0x00020000)) { - tags_ = new com.google.protobuf.LazyStringArrayList(tags_); - bitField0_ |= 0x00020000; - } - } - /** - * repeated string tags = 18; - */ - public com.google.protobuf.ProtocolStringList - getTagsList() { - return tags_.getUnmodifiableView(); + public static final int MARKDOWN_FIELD_NUMBER = 6; + private java.lang.Object markdown_; + /** + * optional string markdown = 6; + * + *
+     * TODO rename markdownText ?
+     * 
+ */ + public boolean hasMarkdown() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional string markdown = 6; + * + *
+     * TODO rename markdownText ?
+     * 
+ */ + public java.lang.String getMarkdown() { + java.lang.Object ref = markdown_; + 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()) { + markdown_ = s; + } + return s; } - /** - * repeated string tags = 18; - */ - public int getTagsCount() { - return tags_.size(); + } + /** + * optional string markdown = 6; + * + *
+     * TODO rename markdownText ?
+     * 
+ */ + public com.google.protobuf.ByteString + getMarkdownBytes() { + java.lang.Object ref = markdown_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + markdown_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * repeated string tags = 18; - */ - public java.lang.String getTags(int index) { - return tags_.get(index); + } + + public static final int UPDATABLE_FIELD_NUMBER = 7; + private boolean updatable_; + /** + * optional bool updatable = 7; + */ + public boolean hasUpdatable() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional bool updatable = 7; + */ + public boolean getUpdatable() { + return updatable_; + } + + public static final int CREATEDAT_FIELD_NUMBER = 8; + private java.lang.Object createdAt_; + /** + * optional string createdAt = 8; + */ + public boolean hasCreatedAt() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional string createdAt = 8; + */ + public java.lang.String getCreatedAt() { + java.lang.Object ref = createdAt_; + 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()) { + createdAt_ = s; + } + return s; } - /** - * repeated string tags = 18; - */ - public com.google.protobuf.ByteString - getTagsBytes(int index) { - return tags_.getByteString(index); + } + /** + * optional string createdAt = 8; + */ + public com.google.protobuf.ByteString + getCreatedAtBytes() { + java.lang.Object ref = createdAt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + createdAt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - /** - * repeated string tags = 18; - */ - public Builder setTags( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.set(index, value); - onChanged(); - return this; + } + + private void initFields() { + key_ = ""; + login_ = ""; + email_ = ""; + userName_ = ""; + htmlText_ = ""; + markdown_ = ""; + updatable_ = false; + createdAt_ = ""; + } + 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, getKeyBytes()); } - /** - * repeated string tags = 18; - */ - public Builder addTags( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(value); - onChanged(); - return this; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getLoginBytes()); } - /** - * repeated string tags = 18; - */ - public Builder addAllTags( - java.lang.Iterable values) { - ensureTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tags_); - onChanged(); - return this; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getEmailBytes()); } - /** - * repeated string tags = 18; - */ - public Builder clearTags() { - tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00020000); - onChanged(); - return this; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getUserNameBytes()); } - /** - * repeated string tags = 18; - */ - public Builder addTagsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(value); - onChanged(); - return this; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBytes(5, getHtmlTextBytes()); } - - private com.google.protobuf.LazyStringList transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTransitionsIsMutable() { - if (!((bitField0_ & 0x00040000) == 0x00040000)) { - transitions_ = new com.google.protobuf.LazyStringArrayList(transitions_); - bitField0_ |= 0x00040000; - } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, getMarkdownBytes()); } - /** - * repeated string transitions = 19; - */ - public com.google.protobuf.ProtocolStringList - getTransitionsList() { - return transitions_.getUnmodifiableView(); + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBool(7, updatable_); } - /** - * repeated string transitions = 19; - */ - public int getTransitionsCount() { - return transitions_.size(); + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBytes(8, getCreatedAtBytes()); } - /** - * repeated string transitions = 19; - */ - public java.lang.String getTransitions(int index) { - return transitions_.get(index); + 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, getKeyBytes()); } - /** - * repeated string transitions = 19; - */ - public com.google.protobuf.ByteString - getTransitionsBytes(int index) { - return transitions_.getByteString(index); + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getLoginBytes()); } - /** - * repeated string transitions = 19; - */ - public Builder setTransitions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransitionsIsMutable(); - transitions_.set(index, value); - onChanged(); - return this; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getEmailBytes()); } - /** - * repeated string transitions = 19; - */ - public Builder addTransitions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransitionsIsMutable(); - transitions_.add(value); - onChanged(); - return this; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getUserNameBytes()); } - /** - * repeated string transitions = 19; - */ - public Builder addAllTransitions( - java.lang.Iterable values) { - ensureTransitionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, transitions_); - onChanged(); - return this; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, getHtmlTextBytes()); } - /** - * repeated string transitions = 19; - */ - public Builder clearTransitions() { - transitions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00040000); - onChanged(); - return this; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, getMarkdownBytes()); } - /** - * repeated string transitions = 19; - */ - public Builder addTransitionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransitionsIsMutable(); - transitions_.add(value); - onChanged(); - return this; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(7, updatable_); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(8, getCreatedAtBytes()); + } + 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.sonarqube.ws.Issues.Comment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Issues.Comment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Issues.Comment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Issues.Comment parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Issues.Comment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Issues.Comment parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Issues.Comment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonarqube.ws.Issues.Comment parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Issues.Comment parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Issues.Comment 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.sonarqube.ws.Issues.Comment 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 sonarqube.ws.issues.Comment} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:sonarqube.ws.issues.Comment) + org.sonarqube.ws.Issues.CommentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_descriptor; } - private com.google.protobuf.LazyStringList actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00080000) == 0x00080000)) { - actions_ = new com.google.protobuf.LazyStringArrayList(actions_); - bitField0_ |= 0x00080000; - } - } - /** - * repeated string actions = 20; - */ - public com.google.protobuf.ProtocolStringList - getActionsList() { - return actions_.getUnmodifiableView(); + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Issues.Comment.class, org.sonarqube.ws.Issues.Comment.Builder.class); } - /** - * repeated string actions = 20; - */ - public int getActionsCount() { - return actions_.size(); + + // Construct using org.sonarqube.ws.Issues.Comment.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - /** - * repeated string actions = 20; - */ - public java.lang.String getActions(int index) { - return actions_.get(index); + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - /** - * repeated string actions = 20; - */ - public com.google.protobuf.ByteString - getActionsBytes(int index) { - return actions_.getByteString(index); + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } } - /** - * repeated string actions = 20; - */ - public Builder setActions( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - return this; + private static Builder create() { + return new Builder(); } - /** - * repeated string actions = 20; - */ - public Builder addActions( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); + + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + login_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + email_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + userName_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + htmlText_ = ""; + bitField0_ = (bitField0_ & ~0x00000010); + markdown_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + updatable_ = false; + bitField0_ = (bitField0_ & ~0x00000040); + createdAt_ = ""; + bitField0_ = (bitField0_ & ~0x00000080); return this; } - /** - * repeated string actions = 20; - */ - public Builder addAllActions( - java.lang.Iterable values) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - return this; + + public Builder clone() { + return create().mergeFrom(buildPartial()); } - /** - * repeated string actions = 20; - */ - public Builder clearActions() { - actions_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00080000); - onChanged(); - return this; + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_descriptor; } - /** - * repeated string actions = 20; - */ - public Builder addActionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - return this; + + public org.sonarqube.ws.Issues.Comment getDefaultInstanceForType() { + return org.sonarqube.ws.Issues.Comment.getDefaultInstance(); } - private java.util.List comments_ = - java.util.Collections.emptyList(); - private void ensureCommentsIsMutable() { - if (!((bitField0_ & 0x00100000) == 0x00100000)) { - comments_ = new java.util.ArrayList(comments_); - bitField0_ |= 0x00100000; - } + public org.sonarqube.ws.Issues.Comment build() { + org.sonarqube.ws.Issues.Comment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Issues.Comment, org.sonarqube.ws.Issues.Comment.Builder, org.sonarqube.ws.Issues.CommentOrBuilder> commentsBuilder_; + public org.sonarqube.ws.Issues.Comment buildPartial() { + org.sonarqube.ws.Issues.Comment result = new org.sonarqube.ws.Issues.Comment(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.login_ = login_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.email_ = email_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.userName_ = userName_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.htmlText_ = htmlText_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.markdown_ = markdown_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.updatable_ = updatable_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.createdAt_ = createdAt_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } - /** - * repeated .sonarqube.ws.issues.Comment comments = 21; - */ - public java.util.List getCommentsList() { - if (commentsBuilder_ == null) { - return java.util.Collections.unmodifiableList(comments_); + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.Issues.Comment) { + return mergeFrom((org.sonarqube.ws.Issues.Comment)other); } else { - return commentsBuilder_.getMessageList(); + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonarqube.ws.Issues.Comment other) { + if (other == org.sonarqube.ws.Issues.Comment.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasLogin()) { + bitField0_ |= 0x00000002; + login_ = other.login_; + onChanged(); + } + if (other.hasEmail()) { + bitField0_ |= 0x00000004; + email_ = other.email_; + onChanged(); + } + if (other.hasUserName()) { + bitField0_ |= 0x00000008; + userName_ = other.userName_; + onChanged(); + } + if (other.hasHtmlText()) { + bitField0_ |= 0x00000010; + htmlText_ = other.htmlText_; + onChanged(); + } + if (other.hasMarkdown()) { + bitField0_ |= 0x00000020; + markdown_ = other.markdown_; + onChanged(); + } + if (other.hasUpdatable()) { + setUpdatable(other.getUpdatable()); + } + if (other.hasCreatedAt()) { + bitField0_ |= 0x00000080; + createdAt_ = other.createdAt_; + 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.sonarqube.ws.Issues.Comment parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.Issues.Comment) 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); } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string key = 1; */ - public int getCommentsCount() { - if (commentsBuilder_ == null) { - return comments_.size(); + 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 commentsBuilder_.getCount(); + return (java.lang.String) ref; } } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string key = 1; */ - public org.sonarqube.ws.Issues.Comment getComments(int index) { - if (commentsBuilder_ == null) { - return comments_.get(index); + 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 commentsBuilder_.getMessage(index); + return (com.google.protobuf.ByteString) ref; } } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string key = 1; */ - public Builder setComments( - int index, org.sonarqube.ws.Issues.Comment value) { - if (commentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommentsIsMutable(); - comments_.set(index, value); - onChanged(); - } else { - commentsBuilder_.setMessage(index, value); - } + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); return this; } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string key = 1; */ - public Builder setComments( - int index, org.sonarqube.ws.Issues.Comment.Builder builderForValue) { - if (commentsBuilder_ == null) { - ensureCommentsIsMutable(); - comments_.set(index, builderForValue.build()); - onChanged(); - } else { - commentsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); return this; } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string key = 1; */ - public Builder addComments(org.sonarqube.ws.Issues.Comment value) { - if (commentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommentsIsMutable(); - comments_.add(value); - onChanged(); - } else { - commentsBuilder_.addMessage(value); - } + 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 login_ = ""; /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string login = 2; */ - public Builder addComments( - int index, org.sonarqube.ws.Issues.Comment value) { - if (commentsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCommentsIsMutable(); - comments_.add(index, value); - onChanged(); - } else { - commentsBuilder_.addMessage(index, value); - } - return this; + public boolean hasLogin() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string login = 2; */ - public Builder addComments( - org.sonarqube.ws.Issues.Comment.Builder builderForValue) { - if (commentsBuilder_ == null) { - ensureCommentsIsMutable(); - comments_.add(builderForValue.build()); - onChanged(); + public java.lang.String getLogin() { + java.lang.Object ref = login_; + 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()) { + login_ = s; + } + return s; } else { - commentsBuilder_.addMessage(builderForValue.build()); + return (java.lang.String) ref; } - return this; } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string login = 2; */ - public Builder addComments( - int index, org.sonarqube.ws.Issues.Comment.Builder builderForValue) { - if (commentsBuilder_ == null) { - ensureCommentsIsMutable(); - comments_.add(index, builderForValue.build()); - onChanged(); + public com.google.protobuf.ByteString + getLoginBytes() { + java.lang.Object ref = login_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + login_ = b; + return b; } else { - commentsBuilder_.addMessage(index, builderForValue.build()); + return (com.google.protobuf.ByteString) ref; } - return this; } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string login = 2; */ - public Builder addAllComments( - java.lang.Iterable values) { - if (commentsBuilder_ == null) { - ensureCommentsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, comments_); - onChanged(); - } else { - commentsBuilder_.addAllMessages(values); - } + public Builder setLogin( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + login_ = value; + onChanged(); return this; } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string login = 2; */ - public Builder clearComments() { - if (commentsBuilder_ == null) { - comments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00100000); - onChanged(); - } else { - commentsBuilder_.clear(); - } + public Builder clearLogin() { + bitField0_ = (bitField0_ & ~0x00000002); + login_ = getDefaultInstance().getLogin(); + onChanged(); return this; } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string login = 2; */ - public Builder removeComments(int index) { - if (commentsBuilder_ == null) { - ensureCommentsIsMutable(); - comments_.remove(index); - onChanged(); - } else { - commentsBuilder_.remove(index); - } + public Builder setLoginBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + login_ = value; + onChanged(); return this; } + + private java.lang.Object email_ = ""; /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string email = 3; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public org.sonarqube.ws.Issues.Comment.Builder getCommentsBuilder( - int index) { - return getCommentsFieldBuilder().getBuilder(index); + public boolean hasEmail() { + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string email = 3; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public org.sonarqube.ws.Issues.CommentOrBuilder getCommentsOrBuilder( - int index) { - if (commentsBuilder_ == null) { - return comments_.get(index); } else { - return commentsBuilder_.getMessageOrBuilder(index); + public java.lang.String getEmail() { + java.lang.Object ref = email_; + 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()) { + email_ = s; + } + return s; + } else { + return (java.lang.String) ref; } } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string email = 3; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public java.util.List - getCommentsOrBuilderList() { - if (commentsBuilder_ != null) { - return commentsBuilder_.getMessageOrBuilderList(); + public com.google.protobuf.ByteString + getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + email_ = b; + return b; } else { - return java.util.Collections.unmodifiableList(comments_); + return (com.google.protobuf.ByteString) ref; } } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string email = 3; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public org.sonarqube.ws.Issues.Comment.Builder addCommentsBuilder() { - return getCommentsFieldBuilder().addBuilder( - org.sonarqube.ws.Issues.Comment.getDefaultInstance()); + public Builder setEmail( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + email_ = value; + onChanged(); + return this; } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string email = 3; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public org.sonarqube.ws.Issues.Comment.Builder addCommentsBuilder( - int index) { - return getCommentsFieldBuilder().addBuilder( - index, org.sonarqube.ws.Issues.Comment.getDefaultInstance()); + public Builder clearEmail() { + bitField0_ = (bitField0_ & ~0x00000004); + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; } /** - * repeated .sonarqube.ws.issues.Comment comments = 21; + * optional string email = 3; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public java.util.List - getCommentsBuilderList() { - return getCommentsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Issues.Comment, org.sonarqube.ws.Issues.Comment.Builder, org.sonarqube.ws.Issues.CommentOrBuilder> - getCommentsFieldBuilder() { - if (commentsBuilder_ == null) { - commentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.sonarqube.ws.Issues.Comment, org.sonarqube.ws.Issues.Comment.Builder, org.sonarqube.ws.Issues.CommentOrBuilder>( - comments_, - ((bitField0_ & 0x00100000) == 0x00100000), - getParentForChildren(), - isClean()); - comments_ = null; - } - return commentsBuilder_; + public Builder setEmailBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + email_ = value; + onChanged(); + return this; } - private java.lang.Object creationDate_ = ""; + private java.lang.Object userName_ = ""; /** - * optional string creationDate = 22; + * optional string userName = 4; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public boolean hasCreationDate() { - return ((bitField0_ & 0x00200000) == 0x00200000); + public boolean hasUserName() { + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional string creationDate = 22; + * optional string userName = 4; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public java.lang.String getCreationDate() { - java.lang.Object ref = creationDate_; + public java.lang.String getUserName() { + java.lang.Object ref = userName_; 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()) { - creationDate_ = s; + userName_ = s; } return s; } else { @@ -6821,75 +10215,91 @@ public final class Issues { } } /** - * optional string creationDate = 22; + * optional string userName = 4; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ public com.google.protobuf.ByteString - getCreationDateBytes() { - java.lang.Object ref = creationDate_; + getUserNameBytes() { + java.lang.Object ref = userName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - creationDate_ = b; + userName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string creationDate = 22; + * optional string userName = 4; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public Builder setCreationDate( + public Builder setUserName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00200000; - creationDate_ = value; + bitField0_ |= 0x00000008; + userName_ = value; onChanged(); return this; } /** - * optional string creationDate = 22; + * optional string userName = 4; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public Builder clearCreationDate() { - bitField0_ = (bitField0_ & ~0x00200000); - creationDate_ = getDefaultInstance().getCreationDate(); + public Builder clearUserName() { + bitField0_ = (bitField0_ & ~0x00000008); + userName_ = getDefaultInstance().getUserName(); onChanged(); return this; } /** - * optional string creationDate = 22; + * optional string userName = 4; + * + *
+       * TODO drop, it's already in field "users"
+       * 
*/ - public Builder setCreationDateBytes( + public Builder setUserNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00200000; - creationDate_ = value; + bitField0_ |= 0x00000008; + userName_ = value; onChanged(); return this; } - private java.lang.Object updateDate_ = ""; + private java.lang.Object htmlText_ = ""; /** - * optional string updateDate = 23; + * optional string htmlText = 5; */ - public boolean hasUpdateDate() { - return ((bitField0_ & 0x00400000) == 0x00400000); + public boolean hasHtmlText() { + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional string updateDate = 23; + * optional string htmlText = 5; */ - public java.lang.String getUpdateDate() { - java.lang.Object ref = updateDate_; + public java.lang.String getHtmlText() { + java.lang.Object ref = htmlText_; 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()) { - updateDate_ = s; + htmlText_ = s; } return s; } else { @@ -6897,75 +10307,83 @@ public final class Issues { } } /** - * optional string updateDate = 23; + * optional string htmlText = 5; */ public com.google.protobuf.ByteString - getUpdateDateBytes() { - java.lang.Object ref = updateDate_; + getHtmlTextBytes() { + java.lang.Object ref = htmlText_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - updateDate_ = b; + htmlText_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string updateDate = 23; + * optional string htmlText = 5; */ - public Builder setUpdateDate( + public Builder setHtmlText( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00400000; - updateDate_ = value; + bitField0_ |= 0x00000010; + htmlText_ = value; onChanged(); return this; } /** - * optional string updateDate = 23; + * optional string htmlText = 5; */ - public Builder clearUpdateDate() { - bitField0_ = (bitField0_ & ~0x00400000); - updateDate_ = getDefaultInstance().getUpdateDate(); + public Builder clearHtmlText() { + bitField0_ = (bitField0_ & ~0x00000010); + htmlText_ = getDefaultInstance().getHtmlText(); onChanged(); return this; } /** - * optional string updateDate = 23; + * optional string htmlText = 5; */ - public Builder setUpdateDateBytes( + public Builder setHtmlTextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00400000; - updateDate_ = value; + bitField0_ |= 0x00000010; + htmlText_ = value; onChanged(); return this; } - private java.lang.Object fUpdateAge_ = ""; + private java.lang.Object markdown_ = ""; /** - * optional string fUpdateAge = 24; + * optional string markdown = 6; + * + *
+       * TODO rename markdownText ?
+       * 
*/ - public boolean hasFUpdateAge() { - return ((bitField0_ & 0x00800000) == 0x00800000); + public boolean hasMarkdown() { + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional string fUpdateAge = 24; + * optional string markdown = 6; + * + *
+       * TODO rename markdownText ?
+       * 
*/ - public java.lang.String getFUpdateAge() { - java.lang.Object ref = fUpdateAge_; + public java.lang.String getMarkdown() { + java.lang.Object ref = markdown_; 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()) { - fUpdateAge_ = s; + markdown_ = s; } return s; } else { @@ -6973,75 +10391,123 @@ public final class Issues { } } /** - * optional string fUpdateAge = 24; + * optional string markdown = 6; + * + *
+       * TODO rename markdownText ?
+       * 
*/ public com.google.protobuf.ByteString - getFUpdateAgeBytes() { - java.lang.Object ref = fUpdateAge_; + getMarkdownBytes() { + java.lang.Object ref = markdown_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - fUpdateAge_ = b; + markdown_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string fUpdateAge = 24; + * optional string markdown = 6; + * + *
+       * TODO rename markdownText ?
+       * 
*/ - public Builder setFUpdateAge( + public Builder setMarkdown( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00800000; - fUpdateAge_ = value; + bitField0_ |= 0x00000020; + markdown_ = value; onChanged(); return this; } /** - * optional string fUpdateAge = 24; + * optional string markdown = 6; + * + *
+       * TODO rename markdownText ?
+       * 
*/ - public Builder clearFUpdateAge() { - bitField0_ = (bitField0_ & ~0x00800000); - fUpdateAge_ = getDefaultInstance().getFUpdateAge(); + public Builder clearMarkdown() { + bitField0_ = (bitField0_ & ~0x00000020); + markdown_ = getDefaultInstance().getMarkdown(); onChanged(); return this; } /** - * optional string fUpdateAge = 24; + * optional string markdown = 6; + * + *
+       * TODO rename markdownText ?
+       * 
*/ - public Builder setFUpdateAgeBytes( + public Builder setMarkdownBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00800000; - fUpdateAge_ = value; + bitField0_ |= 0x00000020; + markdown_ = value; onChanged(); return this; } - private java.lang.Object closeDate_ = ""; + private boolean updatable_ ; /** - * optional string closeDate = 25; + * optional bool updatable = 7; */ - public boolean hasCloseDate() { - return ((bitField0_ & 0x01000000) == 0x01000000); + public boolean hasUpdatable() { + return ((bitField0_ & 0x00000040) == 0x00000040); } /** - * optional string closeDate = 25; + * optional bool updatable = 7; */ - public java.lang.String getCloseDate() { - java.lang.Object ref = closeDate_; + public boolean getUpdatable() { + return updatable_; + } + /** + * optional bool updatable = 7; + */ + public Builder setUpdatable(boolean value) { + bitField0_ |= 0x00000040; + updatable_ = value; + onChanged(); + return this; + } + /** + * optional bool updatable = 7; + */ + public Builder clearUpdatable() { + bitField0_ = (bitField0_ & ~0x00000040); + updatable_ = false; + onChanged(); + return this; + } + + private java.lang.Object createdAt_ = ""; + /** + * optional string createdAt = 8; + */ + public boolean hasCreatedAt() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional string createdAt = 8; + */ + public java.lang.String getCreatedAt() { + java.lang.Object ref = createdAt_; 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()) { - closeDate_ = s; + createdAt_ = s; } return s; } else { @@ -7049,70 +10515,70 @@ public final class Issues { } } /** - * optional string closeDate = 25; + * optional string createdAt = 8; */ public com.google.protobuf.ByteString - getCloseDateBytes() { - java.lang.Object ref = closeDate_; + getCreatedAtBytes() { + java.lang.Object ref = createdAt_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - closeDate_ = b; + createdAt_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string closeDate = 25; + * optional string createdAt = 8; */ - public Builder setCloseDate( + public Builder setCreatedAt( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x01000000; - closeDate_ = value; + bitField0_ |= 0x00000080; + createdAt_ = value; onChanged(); return this; } /** - * optional string closeDate = 25; + * optional string createdAt = 8; */ - public Builder clearCloseDate() { - bitField0_ = (bitField0_ & ~0x01000000); - closeDate_ = getDefaultInstance().getCloseDate(); + public Builder clearCreatedAt() { + bitField0_ = (bitField0_ & ~0x00000080); + createdAt_ = getDefaultInstance().getCreatedAt(); onChanged(); return this; } /** - * optional string closeDate = 25; + * optional string createdAt = 8; */ - public Builder setCloseDateBytes( + public Builder setCreatedAtBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x01000000; - closeDate_ = value; + bitField0_ |= 0x00000080; + createdAt_ = value; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Issue) + // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Comment) } static { - defaultInstance = new Issue(true); + defaultInstance = new Comment(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Issue) + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Comment) } - public interface CommentOrBuilder extends - // @@protoc_insertion_point(interface_extends:sonarqube.ws.issues.Comment) + public interface ActionPlanOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.issues.ActionPlan) com.google.protobuf.MessageOrBuilder { /** @@ -7130,118 +10596,105 @@ public final class Issues { getKeyBytes(); /** - * optional string login = 2; - */ - boolean hasLogin(); - /** - * optional string login = 2; - */ - java.lang.String getLogin(); - /** - * optional string login = 2; - */ - com.google.protobuf.ByteString - getLoginBytes(); - - /** - * optional string email = 3; - */ - boolean hasEmail(); - /** - * optional string email = 3; - */ - java.lang.String getEmail(); - /** - * optional string email = 3; - */ - com.google.protobuf.ByteString - getEmailBytes(); - - /** - * optional string userName = 4; + * optional string name = 2; */ - boolean hasUserName(); + boolean hasName(); /** - * optional string userName = 4; + * optional string name = 2; */ - java.lang.String getUserName(); + java.lang.String getName(); /** - * optional string userName = 4; + * optional string name = 2; */ com.google.protobuf.ByteString - getUserNameBytes(); + getNameBytes(); /** - * optional string htmlText = 5; + * optional string status = 3; + * + *
+     * TODO define enum
+     * 
*/ - boolean hasHtmlText(); + boolean hasStatus(); /** - * optional string htmlText = 5; + * optional string status = 3; + * + *
+     * TODO define enum
+     * 
*/ - java.lang.String getHtmlText(); + java.lang.String getStatus(); /** - * optional string htmlText = 5; + * optional string status = 3; + * + *
+     * TODO define enum
+     * 
*/ com.google.protobuf.ByteString - getHtmlTextBytes(); + getStatusBytes(); /** - * optional string markdown = 6; + * optional string deadLine = 4; */ - boolean hasMarkdown(); + boolean hasDeadLine(); /** - * optional string markdown = 6; + * optional string deadLine = 4; */ - java.lang.String getMarkdown(); + java.lang.String getDeadLine(); /** - * optional string markdown = 6; + * optional string deadLine = 4; */ com.google.protobuf.ByteString - getMarkdownBytes(); - - /** - * optional bool updatable = 7; - */ - boolean hasUpdatable(); - /** - * optional bool updatable = 7; - */ - boolean getUpdatable(); + getDeadLineBytes(); /** - * optional string createdAt = 8; + * optional string project = 5; + * + *
+     * TODO to be renamed, is it id or key ?
+     * 
*/ - boolean hasCreatedAt(); + boolean hasProject(); /** - * optional string createdAt = 8; + * optional string project = 5; + * + *
+     * TODO to be renamed, is it id or key ?
+     * 
*/ - java.lang.String getCreatedAt(); + java.lang.String getProject(); /** - * optional string createdAt = 8; + * optional string project = 5; + * + *
+     * TODO to be renamed, is it id or key ?
+     * 
*/ com.google.protobuf.ByteString - getCreatedAtBytes(); + getProjectBytes(); } /** - * Protobuf type {@code sonarqube.ws.issues.Comment} + * Protobuf type {@code sonarqube.ws.issues.ActionPlan} */ - public static final class Comment extends + public static final class ActionPlan extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Comment) - CommentOrBuilder { - // Use Comment.newBuilder() to construct. - private Comment(com.google.protobuf.GeneratedMessage.Builder builder) { + // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.ActionPlan) + ActionPlanOrBuilder { + // Use ActionPlan.newBuilder() to construct. + private ActionPlan(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } - private Comment(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + private ActionPlan(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - private static final Comment defaultInstance; - public static Comment getDefaultInstance() { + private static final ActionPlan defaultInstance; + public static ActionPlan getDefaultInstance() { return defaultInstance; } - public Comment getDefaultInstanceForType() { + public ActionPlan getDefaultInstanceForType() { return defaultInstance; } @@ -7251,7 +10704,7 @@ public final class Issues { getUnknownFields() { return this.unknownFields; } - private Comment( + private ActionPlan( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7283,181 +10736,80 @@ public final class Issues { case 18: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000002; - login_ = bs; + name_ = bs; break; } case 26: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000004; - email_ = bs; + status_ = bs; break; } case 34: { com.google.protobuf.ByteString bs = input.readBytes(); bitField0_ |= 0x00000008; - userName_ = bs; + deadLine_ = bs; break; } case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000010; - htmlText_ = bs; - break; - } - case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000020; - markdown_ = bs; - break; - } - case 56: { - bitField0_ |= 0x00000040; - updatable_ = input.readBool(); - break; - } - case 66: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000080; - createdAt_ = 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.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.sonarqube.ws.Issues.Comment.class, org.sonarqube.ws.Issues.Comment.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Comment parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Comment(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int KEY_FIELD_NUMBER = 1; - 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) { - 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 = 1; - */ - 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; - } - } - - public static final int LOGIN_FIELD_NUMBER = 2; - private java.lang.Object login_; - /** - * optional string login = 2; - */ - public boolean hasLogin() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional string login = 2; - */ - public java.lang.String getLogin() { - java.lang.Object ref = login_; - 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()) { - login_ = s; + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000010; + project_ = bs; + break; + } + } } - return s; + } 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 login = 2; - */ - public com.google.protobuf.ByteString - getLoginBytes() { - java.lang.Object ref = login_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - login_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_ActionPlan_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_ActionPlan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Issues.ActionPlan.class, org.sonarqube.ws.Issues.ActionPlan.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ActionPlan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ActionPlan(input, extensionRegistry); } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; } - public static final int EMAIL_FIELD_NUMBER = 3; - private java.lang.Object email_; + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; /** - * optional string email = 3; + * optional string key = 1; */ - public boolean hasEmail() { - return ((bitField0_ & 0x00000004) == 0x00000004); + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string email = 3; + * optional string key = 1; */ - public java.lang.String getEmail() { - java.lang.Object ref = email_; + public java.lang.String getKey() { + java.lang.Object ref = key_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -7465,41 +10817,41 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - email_ = s; + key_ = s; } return s; } } /** - * optional string email = 3; + * optional string key = 1; */ public com.google.protobuf.ByteString - getEmailBytes() { - java.lang.Object ref = email_; + 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); - email_ = b; + key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int USERNAME_FIELD_NUMBER = 4; - private java.lang.Object userName_; + public static final int NAME_FIELD_NUMBER = 2; + private java.lang.Object name_; /** - * optional string userName = 4; + * optional string name = 2; */ - public boolean hasUserName() { - return ((bitField0_ & 0x00000008) == 0x00000008); + public boolean hasName() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string userName = 4; + * optional string name = 2; */ - public java.lang.String getUserName() { - java.lang.Object ref = userName_; + public java.lang.String getName() { + java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -7507,41 +10859,49 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - userName_ = s; + name_ = s; } return s; } } /** - * optional string userName = 4; + * optional string name = 2; */ public com.google.protobuf.ByteString - getUserNameBytes() { - java.lang.Object ref = userName_; + 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); - userName_ = b; + name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int HTMLTEXT_FIELD_NUMBER = 5; - private java.lang.Object htmlText_; + public static final int STATUS_FIELD_NUMBER = 3; + private java.lang.Object status_; /** - * optional string htmlText = 5; + * optional string status = 3; + * + *
+     * TODO define enum
+     * 
*/ - public boolean hasHtmlText() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * optional string htmlText = 5; + * optional string status = 3; + * + *
+     * TODO define enum
+     * 
*/ - public java.lang.String getHtmlText() { - java.lang.Object ref = htmlText_; + public java.lang.String getStatus() { + java.lang.Object ref = status_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -7549,41 +10909,45 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - htmlText_ = s; + status_ = s; } return s; } } /** - * optional string htmlText = 5; + * optional string status = 3; + * + *
+     * TODO define enum
+     * 
*/ public com.google.protobuf.ByteString - getHtmlTextBytes() { - java.lang.Object ref = htmlText_; + getStatusBytes() { + java.lang.Object ref = status_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - htmlText_ = b; + status_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int MARKDOWN_FIELD_NUMBER = 6; - private java.lang.Object markdown_; + public static final int DEADLINE_FIELD_NUMBER = 4; + private java.lang.Object deadLine_; /** - * optional string markdown = 6; + * optional string deadLine = 4; */ - public boolean hasMarkdown() { - return ((bitField0_ & 0x00000020) == 0x00000020); + public boolean hasDeadLine() { + return ((bitField0_ & 0x00000008) == 0x00000008); } /** - * optional string markdown = 6; + * optional string deadLine = 4; */ - public java.lang.String getMarkdown() { - java.lang.Object ref = markdown_; + public java.lang.String getDeadLine() { + java.lang.Object ref = deadLine_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -7591,56 +10955,49 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - markdown_ = s; + deadLine_ = s; } return s; } } /** - * optional string markdown = 6; + * optional string deadLine = 4; */ public com.google.protobuf.ByteString - getMarkdownBytes() { - java.lang.Object ref = markdown_; + getDeadLineBytes() { + java.lang.Object ref = deadLine_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - markdown_ = b; + deadLine_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int UPDATABLE_FIELD_NUMBER = 7; - private boolean updatable_; - /** - * optional bool updatable = 7; - */ - public boolean hasUpdatable() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool updatable = 7; - */ - public boolean getUpdatable() { - return updatable_; - } - - public static final int CREATEDAT_FIELD_NUMBER = 8; - private java.lang.Object createdAt_; + public static final int PROJECT_FIELD_NUMBER = 5; + private java.lang.Object project_; /** - * optional string createdAt = 8; + * optional string project = 5; + * + *
+     * TODO to be renamed, is it id or key ?
+     * 
*/ - public boolean hasCreatedAt() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public boolean hasProject() { + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional string createdAt = 8; + * optional string project = 5; + * + *
+     * TODO to be renamed, is it id or key ?
+     * 
*/ - public java.lang.String getCreatedAt() { - java.lang.Object ref = createdAt_; + public java.lang.String getProject() { + java.lang.Object ref = project_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { @@ -7648,22 +11005,26 @@ public final class Issues { (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { - createdAt_ = s; + project_ = s; } return s; } } /** - * optional string createdAt = 8; + * optional string project = 5; + * + *
+     * TODO to be renamed, is it id or key ?
+     * 
*/ public com.google.protobuf.ByteString - getCreatedAtBytes() { - java.lang.Object ref = createdAt_; + getProjectBytes() { + java.lang.Object ref = project_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - createdAt_ = b; + project_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -7672,13 +11033,10 @@ public final class Issues { private void initFields() { key_ = ""; - login_ = ""; - email_ = ""; - userName_ = ""; - htmlText_ = ""; - markdown_ = ""; - updatable_ = false; - createdAt_ = ""; + name_ = ""; + status_ = ""; + deadLine_ = ""; + project_ = ""; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -7697,25 +11055,16 @@ public final class Issues { output.writeBytes(1, getKeyBytes()); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getLoginBytes()); + output.writeBytes(2, getNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getEmailBytes()); + output.writeBytes(3, getStatusBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, getUserNameBytes()); + output.writeBytes(4, getDeadLineBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(5, getHtmlTextBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(6, getMarkdownBytes()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBool(7, updatable_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(8, getCreatedAtBytes()); + output.writeBytes(5, getProjectBytes()); } getUnknownFields().writeTo(output); } @@ -7732,31 +11081,19 @@ public final class Issues { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getLoginBytes()); + .computeBytesSize(2, getNameBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getEmailBytes()); + .computeBytesSize(3, getStatusBytes()); } if (((bitField0_ & 0x00000008) == 0x00000008)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getUserNameBytes()); + .computeBytesSize(4, getDeadLineBytes()); } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getHtmlTextBytes()); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getMarkdownBytes()); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(7, updatable_); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(8, getCreatedAtBytes()); + .computeBytesSize(5, getProjectBytes()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -7770,53 +11107,53 @@ public final class Issues { return super.writeReplace(); } - public static org.sonarqube.ws.Issues.Comment parseFrom( + public static org.sonarqube.ws.Issues.ActionPlan parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.Issues.Comment parseFrom( + public static org.sonarqube.ws.Issues.ActionPlan parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.Issues.Comment parseFrom(byte[] data) + public static org.sonarqube.ws.Issues.ActionPlan parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static org.sonarqube.ws.Issues.Comment parseFrom( + public static org.sonarqube.ws.Issues.ActionPlan parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static org.sonarqube.ws.Issues.Comment parseFrom(java.io.InputStream input) + public static org.sonarqube.ws.Issues.ActionPlan parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.Issues.Comment parseFrom( + public static org.sonarqube.ws.Issues.ActionPlan parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } - public static org.sonarqube.ws.Issues.Comment parseDelimitedFrom(java.io.InputStream input) + public static org.sonarqube.ws.Issues.ActionPlan parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } - public static org.sonarqube.ws.Issues.Comment parseDelimitedFrom( + public static org.sonarqube.ws.Issues.ActionPlan parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } - public static org.sonarqube.ws.Issues.Comment parseFrom( + public static org.sonarqube.ws.Issues.ActionPlan parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } - public static org.sonarqube.ws.Issues.Comment parseFrom( + public static org.sonarqube.ws.Issues.ActionPlan parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7825,7 +11162,7 @@ public final class Issues { public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.sonarqube.ws.Issues.Comment prototype) { + public static Builder newBuilder(org.sonarqube.ws.Issues.ActionPlan prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @@ -7837,25 +11174,25 @@ public final class Issues { return builder; } /** - * Protobuf type {@code sonarqube.ws.issues.Comment} + * Protobuf type {@code sonarqube.ws.issues.ActionPlan} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:sonarqube.ws.issues.Comment) - org.sonarqube.ws.Issues.CommentOrBuilder { + // @@protoc_insertion_point(builder_implements:sonarqube.ws.issues.ActionPlan) + org.sonarqube.ws.Issues.ActionPlanOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_descriptor; + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_ActionPlan_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_fieldAccessorTable + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_ActionPlan_fieldAccessorTable .ensureFieldAccessorsInitialized( - org.sonarqube.ws.Issues.Comment.class, org.sonarqube.ws.Issues.Comment.Builder.class); + org.sonarqube.ws.Issues.ActionPlan.class, org.sonarqube.ws.Issues.ActionPlan.Builder.class); } - // Construct using org.sonarqube.ws.Issues.Comment.newBuilder() + // Construct using org.sonarqube.ws.Issues.ActionPlan.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -7877,20 +11214,14 @@ public final class Issues { super.clear(); key_ = ""; bitField0_ = (bitField0_ & ~0x00000001); - login_ = ""; + name_ = ""; bitField0_ = (bitField0_ & ~0x00000002); - email_ = ""; + status_ = ""; bitField0_ = (bitField0_ & ~0x00000004); - userName_ = ""; + deadLine_ = ""; bitField0_ = (bitField0_ & ~0x00000008); - htmlText_ = ""; + project_ = ""; bitField0_ = (bitField0_ & ~0x00000010); - markdown_ = ""; - bitField0_ = (bitField0_ & ~0x00000020); - updatable_ = false; - bitField0_ = (bitField0_ & ~0x00000040); - createdAt_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -7900,23 +11231,23 @@ public final class Issues { public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Comment_descriptor; + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_ActionPlan_descriptor; } - public org.sonarqube.ws.Issues.Comment getDefaultInstanceForType() { - return org.sonarqube.ws.Issues.Comment.getDefaultInstance(); + public org.sonarqube.ws.Issues.ActionPlan getDefaultInstanceForType() { + return org.sonarqube.ws.Issues.ActionPlan.getDefaultInstance(); } - public org.sonarqube.ws.Issues.Comment build() { - org.sonarqube.ws.Issues.Comment result = buildPartial(); + public org.sonarqube.ws.Issues.ActionPlan build() { + org.sonarqube.ws.Issues.ActionPlan result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public org.sonarqube.ws.Issues.Comment buildPartial() { - org.sonarqube.ws.Issues.Comment result = new org.sonarqube.ws.Issues.Comment(this); + public org.sonarqube.ws.Issues.ActionPlan buildPartial() { + org.sonarqube.ws.Issues.ActionPlan result = new org.sonarqube.ws.Issues.ActionPlan(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { @@ -7926,83 +11257,58 @@ public final class Issues { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.login_ = login_; + result.name_ = name_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } - result.email_ = email_; + result.status_ = status_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.userName_ = userName_; + result.deadLine_ = deadLine_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000010; } - result.htmlText_ = htmlText_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.markdown_ = markdown_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.updatable_ = updatable_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.createdAt_ = createdAt_; + result.project_ = project_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.sonarqube.ws.Issues.Comment) { - return mergeFrom((org.sonarqube.ws.Issues.Comment)other); + if (other instanceof org.sonarqube.ws.Issues.ActionPlan) { + return mergeFrom((org.sonarqube.ws.Issues.ActionPlan)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(org.sonarqube.ws.Issues.Comment other) { - if (other == org.sonarqube.ws.Issues.Comment.getDefaultInstance()) return this; + public Builder mergeFrom(org.sonarqube.ws.Issues.ActionPlan other) { + if (other == org.sonarqube.ws.Issues.ActionPlan.getDefaultInstance()) return this; if (other.hasKey()) { bitField0_ |= 0x00000001; key_ = other.key_; onChanged(); } - if (other.hasLogin()) { + if (other.hasName()) { bitField0_ |= 0x00000002; - login_ = other.login_; + name_ = other.name_; onChanged(); } - if (other.hasEmail()) { + if (other.hasStatus()) { bitField0_ |= 0x00000004; - email_ = other.email_; + status_ = other.status_; onChanged(); } - if (other.hasUserName()) { + if (other.hasDeadLine()) { bitField0_ |= 0x00000008; - userName_ = other.userName_; + deadLine_ = other.deadLine_; onChanged(); } - if (other.hasHtmlText()) { + if (other.hasProject()) { bitField0_ |= 0x00000010; - htmlText_ = other.htmlText_; - onChanged(); - } - if (other.hasMarkdown()) { - bitField0_ |= 0x00000020; - markdown_ = other.markdown_; - onChanged(); - } - if (other.hasUpdatable()) { - setUpdatable(other.getUpdatable()); - } - if (other.hasCreatedAt()) { - bitField0_ |= 0x00000080; - createdAt_ = other.createdAt_; + project_ = other.project_; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -8017,11 +11323,11 @@ public final class Issues { com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.sonarqube.ws.Issues.Comment parsedMessage = null; + org.sonarqube.ws.Issues.ActionPlan parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.sonarqube.ws.Issues.Comment) e.getUnfinishedMessage(); + parsedMessage = (org.sonarqube.ws.Issues.ActionPlan) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -8086,46 +11392,306 @@ public final class Issues { return this; } /** - * optional string key = 1; + * 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 name_ = ""; + /** + * optional string name = 2; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string name = 2; + */ + 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 = 2; + */ + 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 = 2; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 2; + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000002); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 2; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object status_ = ""; + /** + * optional string status = 3; + * + *
+       * TODO define enum
+       * 
+ */ + public boolean hasStatus() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string status = 3; + * + *
+       * TODO define enum
+       * 
+ */ + public java.lang.String getStatus() { + java.lang.Object ref = status_; + 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()) { + status_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string status = 3; + * + *
+       * TODO define enum
+       * 
+ */ + public com.google.protobuf.ByteString + getStatusBytes() { + java.lang.Object ref = status_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + status_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string status = 3; + * + *
+       * TODO define enum
+       * 
+ */ + public Builder setStatus( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + status_ = value; + onChanged(); + return this; + } + /** + * optional string status = 3; + * + *
+       * TODO define enum
+       * 
+ */ + public Builder clearStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + status_ = getDefaultInstance().getStatus(); + onChanged(); + return this; + } + /** + * optional string status = 3; + * + *
+       * TODO define enum
+       * 
+ */ + public Builder setStatusBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + status_ = value; + onChanged(); + return this; + } + + private java.lang.Object deadLine_ = ""; + /** + * optional string deadLine = 4; + */ + public boolean hasDeadLine() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string deadLine = 4; + */ + public java.lang.String getDeadLine() { + java.lang.Object ref = deadLine_; + 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()) { + deadLine_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string deadLine = 4; + */ + public com.google.protobuf.ByteString + getDeadLineBytes() { + java.lang.Object ref = deadLine_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + deadLine_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string deadLine = 4; + */ + public Builder setDeadLine( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + deadLine_ = value; + onChanged(); + return this; + } + /** + * optional string deadLine = 4; */ - public Builder clearKey() { - bitField0_ = (bitField0_ & ~0x00000001); - key_ = getDefaultInstance().getKey(); + public Builder clearDeadLine() { + bitField0_ = (bitField0_ & ~0x00000008); + deadLine_ = getDefaultInstance().getDeadLine(); onChanged(); return this; } /** - * optional string key = 1; + * optional string deadLine = 4; */ - public Builder setKeyBytes( + public Builder setDeadLineBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - key_ = value; + bitField0_ |= 0x00000008; + deadLine_ = value; onChanged(); return this; } - private java.lang.Object login_ = ""; + private java.lang.Object project_ = ""; /** - * optional string login = 2; + * optional string project = 5; + * + *
+       * TODO to be renamed, is it id or key ?
+       * 
*/ - public boolean hasLogin() { - return ((bitField0_ & 0x00000002) == 0x00000002); + public boolean hasProject() { + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional string login = 2; + * optional string project = 5; + * + *
+       * TODO to be renamed, is it id or key ?
+       * 
*/ - public java.lang.String getLogin() { - java.lang.Object ref = login_; + public java.lang.String getProject() { + java.lang.Object ref = project_; 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()) { - login_ = s; + project_ = s; } return s; } else { @@ -8133,303 +11699,572 @@ public final class Issues { } } /** - * optional string login = 2; + * optional string project = 5; + * + *
+       * TODO to be renamed, is it id or key ?
+       * 
*/ public com.google.protobuf.ByteString - getLoginBytes() { - java.lang.Object ref = login_; + getProjectBytes() { + java.lang.Object ref = project_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - login_ = b; + project_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string login = 2; + * optional string project = 5; + * + *
+       * TODO to be renamed, is it id or key ?
+       * 
*/ - public Builder setLogin( + public Builder setProject( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - login_ = value; + bitField0_ |= 0x00000010; + project_ = value; onChanged(); return this; } /** - * optional string login = 2; + * optional string project = 5; + * + *
+       * TODO to be renamed, is it id or key ?
+       * 
*/ - public Builder clearLogin() { - bitField0_ = (bitField0_ & ~0x00000002); - login_ = getDefaultInstance().getLogin(); + public Builder clearProject() { + bitField0_ = (bitField0_ & ~0x00000010); + project_ = getDefaultInstance().getProject(); onChanged(); return this; } /** - * optional string login = 2; + * optional string project = 5; + * + *
+       * TODO to be renamed, is it id or key ?
+       * 
*/ - public Builder setLoginBytes( + public Builder setProjectBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - login_ = value; + bitField0_ |= 0x00000010; + project_ = value; onChanged(); return this; } - private java.lang.Object email_ = ""; - /** - * optional string email = 3; - */ - public boolean hasEmail() { - return ((bitField0_ & 0x00000004) == 0x00000004); + // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.ActionPlan) + } + + static { + defaultInstance = new ActionPlan(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.ActionPlan) + } + + public interface LanguageOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.issues.Language) + com.google.protobuf.MessageOrBuilder { + + /** + * 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 name = 2; + */ + boolean hasName(); + /** + * optional string name = 2; + */ + java.lang.String getName(); + /** + * optional string name = 2; + */ + com.google.protobuf.ByteString + getNameBytes(); + } + /** + * Protobuf type {@code sonarqube.ws.issues.Language} + */ + public static final class Language extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:sonarqube.ws.issues.Language) + LanguageOrBuilder { + // Use Language.newBuilder() to construct. + private Language(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Language(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Language defaultInstance; + public static Language getDefaultInstance() { + return defaultInstance; + } + + public Language getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Language( + 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; + name_ = 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.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Language_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Language_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Issues.Language.class, org.sonarqube.ws.Issues.Language.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Language parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Language(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + 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) { + 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 = 1; + */ + 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; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private java.lang.Object name_; + /** + * optional string name = 2; + */ + public boolean hasName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string name = 2; + */ + 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; + } + } + /** + * optional string name = 2; + */ + 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; + } + } + + private void initFields() { + key_ = ""; + name_ = ""; + } + 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, getKeyBytes()); } - /** - * optional string email = 3; - */ - public java.lang.String getEmail() { - java.lang.Object ref = email_; - 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()) { - email_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getNameBytes()); } - /** - * optional string email = 3; - */ - public com.google.protobuf.ByteString - getEmailBytes() { - java.lang.Object ref = email_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - email_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } + 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, getKeyBytes()); } - /** - * optional string email = 3; - */ - public Builder setEmail( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - email_ = value; - onChanged(); - return this; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getNameBytes()); } - /** - * optional string email = 3; - */ - public Builder clearEmail() { - bitField0_ = (bitField0_ & ~0x00000004); - email_ = getDefaultInstance().getEmail(); - 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.sonarqube.ws.Issues.Language parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Issues.Language parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Issues.Language parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Issues.Language parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Issues.Language parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Issues.Language parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Issues.Language parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonarqube.ws.Issues.Language parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Issues.Language parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Issues.Language 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.sonarqube.ws.Issues.Language 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 sonarqube.ws.issues.Language} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:sonarqube.ws.issues.Language) + org.sonarqube.ws.Issues.LanguageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Language_descriptor; } - /** - * optional string email = 3; - */ - public Builder setEmailBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - email_ = value; - onChanged(); - return this; + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Language_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Issues.Language.class, org.sonarqube.ws.Issues.Language.Builder.class); } - private java.lang.Object userName_ = ""; - /** - * optional string userName = 4; - */ - public boolean hasUserName() { - return ((bitField0_ & 0x00000008) == 0x00000008); + // Construct using org.sonarqube.ws.Issues.Language.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); } - /** - * optional string userName = 4; - */ - public java.lang.String getUserName() { - java.lang.Object ref = userName_; - 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()) { - userName_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); } - /** - * optional string userName = 4; - */ - public com.google.protobuf.ByteString - getUserNameBytes() { - java.lang.Object ref = userName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - userName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } - /** - * optional string userName = 4; - */ - public Builder setUserName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - userName_ = value; - onChanged(); - return this; + private static Builder create() { + return new Builder(); } - /** - * optional string userName = 4; - */ - public Builder clearUserName() { - bitField0_ = (bitField0_ & ~0x00000008); - userName_ = getDefaultInstance().getUserName(); - onChanged(); + + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); return this; } - /** - * optional string userName = 4; - */ - public Builder setUserNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000008; - userName_ = value; - onChanged(); - return this; + + public Builder clone() { + return create().mergeFrom(buildPartial()); } - private java.lang.Object htmlText_ = ""; - /** - * optional string htmlText = 5; - */ - public boolean hasHtmlText() { - return ((bitField0_ & 0x00000010) == 0x00000010); + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.Issues.internal_static_sonarqube_ws_issues_Language_descriptor; } - /** - * optional string htmlText = 5; - */ - public java.lang.String getHtmlText() { - java.lang.Object ref = htmlText_; - 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()) { - htmlText_ = s; - } - return s; - } else { - return (java.lang.String) ref; + + public org.sonarqube.ws.Issues.Language getDefaultInstanceForType() { + return org.sonarqube.ws.Issues.Language.getDefaultInstance(); + } + + public org.sonarqube.ws.Issues.Language build() { + org.sonarqube.ws.Issues.Language result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); } + return result; } - /** - * optional string htmlText = 5; - */ - public com.google.protobuf.ByteString - getHtmlTextBytes() { - java.lang.Object ref = htmlText_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - htmlText_ = b; - return b; + + public org.sonarqube.ws.Issues.Language buildPartial() { + org.sonarqube.ws.Issues.Language result = new org.sonarqube.ws.Issues.Language(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.name_ = name_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.Issues.Language) { + return mergeFrom((org.sonarqube.ws.Issues.Language)other); } else { - return (com.google.protobuf.ByteString) ref; + super.mergeFrom(other); + return this; } } - /** - * optional string htmlText = 5; - */ - public Builder setHtmlText( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - htmlText_ = value; - onChanged(); + + public Builder mergeFrom(org.sonarqube.ws.Issues.Language other) { + if (other == org.sonarqube.ws.Issues.Language.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasName()) { + bitField0_ |= 0x00000002; + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); return this; } - /** - * optional string htmlText = 5; - */ - public Builder clearHtmlText() { - bitField0_ = (bitField0_ & ~0x00000010); - htmlText_ = getDefaultInstance().getHtmlText(); - onChanged(); - return this; + + public final boolean isInitialized() { + return true; } - /** - * optional string htmlText = 5; - */ - public Builder setHtmlTextBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; - htmlText_ = value; - onChanged(); + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonarqube.ws.Issues.Language parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.Issues.Language) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } return this; } + private int bitField0_; - private java.lang.Object markdown_ = ""; + private java.lang.Object key_ = ""; /** - * optional string markdown = 6; + * optional string key = 1; */ - public boolean hasMarkdown() { - return ((bitField0_ & 0x00000020) == 0x00000020); + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); } /** - * optional string markdown = 6; + * optional string key = 1; */ - public java.lang.String getMarkdown() { - java.lang.Object ref = markdown_; + 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()) { - markdown_ = s; + key_ = s; } return s; } else { @@ -8437,107 +12272,75 @@ public final class Issues { } } /** - * optional string markdown = 6; + * optional string key = 1; */ public com.google.protobuf.ByteString - getMarkdownBytes() { - java.lang.Object ref = markdown_; + getKeyBytes() { + java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - markdown_ = b; + key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string markdown = 6; + * optional string key = 1; */ - public Builder setMarkdown( + public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; - markdown_ = value; + bitField0_ |= 0x00000001; + key_ = value; onChanged(); return this; } /** - * optional string markdown = 6; + * optional string key = 1; */ - public Builder clearMarkdown() { - bitField0_ = (bitField0_ & ~0x00000020); - markdown_ = getDefaultInstance().getMarkdown(); + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); onChanged(); return this; } /** - * optional string markdown = 6; + * optional string key = 1; */ - public Builder setMarkdownBytes( + public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; - markdown_ = value; - onChanged(); - return this; - } - - private boolean updatable_ ; - /** - * optional bool updatable = 7; - */ - public boolean hasUpdatable() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional bool updatable = 7; - */ - public boolean getUpdatable() { - return updatable_; - } - /** - * optional bool updatable = 7; - */ - public Builder setUpdatable(boolean value) { - bitField0_ |= 0x00000040; - updatable_ = value; - onChanged(); - return this; - } - /** - * optional bool updatable = 7; - */ - public Builder clearUpdatable() { - bitField0_ = (bitField0_ & ~0x00000040); - updatable_ = false; + bitField0_ |= 0x00000001; + key_ = value; onChanged(); return this; } - private java.lang.Object createdAt_ = ""; + private java.lang.Object name_ = ""; /** - * optional string createdAt = 8; + * optional string name = 2; */ - public boolean hasCreatedAt() { - return ((bitField0_ & 0x00000080) == 0x00000080); + public boolean hasName() { + return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * optional string createdAt = 8; + * optional string name = 2; */ - public java.lang.String getCreatedAt() { - java.lang.Object ref = createdAt_; + 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()) { - createdAt_ = s; + name_ = s; } return s; } else { @@ -8545,66 +12348,66 @@ public final class Issues { } } /** - * optional string createdAt = 8; + * optional string name = 2; */ public com.google.protobuf.ByteString - getCreatedAtBytes() { - java.lang.Object ref = createdAt_; + getNameBytes() { + java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - createdAt_ = b; + name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** - * optional string createdAt = 8; + * optional string name = 2; */ - public Builder setCreatedAt( + public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; - createdAt_ = value; + bitField0_ |= 0x00000002; + name_ = value; onChanged(); return this; } /** - * optional string createdAt = 8; + * optional string name = 2; */ - public Builder clearCreatedAt() { - bitField0_ = (bitField0_ & ~0x00000080); - createdAt_ = getDefaultInstance().getCreatedAt(); + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000002); + name_ = getDefaultInstance().getName(); onChanged(); return this; } /** - * optional string createdAt = 8; + * optional string name = 2; */ - public Builder setCreatedAtBytes( + public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; - createdAt_ = value; + bitField0_ |= 0x00000002; + name_ = value; onChanged(); return this; } - // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Comment) + // @@protoc_insertion_point(builder_scope:sonarqube.ws.issues.Language) } static { - defaultInstance = new Comment(true); + defaultInstance = new Language(true); defaultInstance.initFields(); } - // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Comment) + // @@protoc_insertion_point(class_scope:sonarqube.ws.issues.Language) } private static final com.google.protobuf.Descriptors.Descriptor @@ -8622,6 +12425,16 @@ public final class Issues { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_sonarqube_ws_issues_Comment_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_sonarqube_ws_issues_ActionPlan_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_sonarqube_ws_issues_ActionPlan_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_sonarqube_ws_issues_Language_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_sonarqube_ws_issues_Language_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -8632,31 +12445,46 @@ public final class Issues { static { java.lang.String[] descriptorData = { "\n\017ws-issues.proto\022\023sonarqube.ws.issues\032\017" + - "ws-common.proto\"\235\002\n\006Search\022$\n\006paging\030\001 \001" + - "(\0132\024.sonarqube.ws.Paging\022*\n\006issues\030\002 \003(\013" + - "2\032.sonarqube.ws.issues.Issue\022#\n\006facets\030\003" + - " \003(\0132\023.sonarqube.ws.Facet\022)\n\010projects\030\004 " + - "\003(\0132\027.sonarqube.ws.Component\022+\n\ncomponen" + - "ts\030\005 \003(\0132\027.sonarqube.ws.Component\022!\n\005rul" + - "es\030\006 \003(\0132\022.sonarqube.ws.Rule\022!\n\005users\030\007 " + - "\003(\0132\022.sonarqube.ws.User\"\346\003\n\005Issue\022\013\n\003key" + - "\030\001 \001(\t\022\014\n\004rule\030\002 \001(\t\022\021\n\tcomponent\030\003 \001(\t\022", - "\023\n\013componentId\030\004 \001(\005\022\017\n\007project\030\005 \001(\t\022\022\n" + - "\nsubProject\030\006 \001(\t\022\014\n\004line\030\007 \001(\005\022\022\n\nresol" + - "ution\030\010 \001(\t\022\016\n\006status\030\t \001(\t\022\017\n\007message\030\n" + - " \001(\t\022\014\n\004debt\030\013 \001(\t\022\020\n\010assignee\030\014 \001(\t\022\020\n\010" + - "reporter\030\r \001(\t\022\021\n\tscmAuthor\030\016 \001(\t\022\022\n\nact" + - "ionPlan\030\017 \001(\t\022\026\n\016actionPlanName\030\020 \001(\t\022\014\n" + - "\004attr\030\021 \001(\t\022\014\n\004tags\030\022 \003(\t\022\023\n\013transitions" + - "\030\023 \003(\t\022\017\n\007actions\030\024 \003(\t\022.\n\010comments\030\025 \003(" + - "\0132\034.sonarqube.ws.issues.Comment\022\024\n\014creat" + - "ionDate\030\026 \001(\t\022\022\n\nupdateDate\030\027 \001(\t\022\022\n\nfUp", - "dateAge\030\030 \001(\t\022\021\n\tcloseDate\030\031 \001(\t\"\220\001\n\007Com" + - "ment\022\013\n\003key\030\001 \001(\t\022\r\n\005login\030\002 \001(\t\022\r\n\005emai" + - "l\030\003 \001(\t\022\020\n\010userName\030\004 \001(\t\022\020\n\010htmlText\030\005 " + - "\001(\t\022\020\n\010markdown\030\006 \001(\t\022\021\n\tupdatable\030\007 \001(\010" + - "\022\021\n\tcreatedAt\030\010 \001(\tB\034\n\020org.sonarqube.wsB" + - "\006IssuesH\001" + "ws-common.proto\"\234\005\n\006Search\022\r\n\005total\030\001 \001(" + + "\003\022\t\n\001p\030\002 \001(\003\022\n\n\002ps\030\003 \001(\005\022$\n\006paging\030\004 \001(\013" + + "2\024.sonarqube.ws.Paging\022\021\n\tdebtTotal\030\005 \001(" + + "\003\022*\n\006issues\030\006 \003(\0132\032.sonarqube.ws.issues." + + "Issue\022\036\n\026projectsPresentIfEmpty\030\010 \001(\010\022)\n" + + "\010projects\030\t \003(\0132\027.sonarqube.ws.Component" + + "\022 \n\030componentsPresentIfEmpty\030\n \001(\010\022+\n\nco" + + "mponents\030\013 \003(\0132\027.sonarqube.ws.Component\022" + + "\033\n\023rulesPresentIfEmpty\030\014 \001(\010\022!\n\005rules\030\r ", + "\003(\0132\022.sonarqube.ws.Rule\022\033\n\023usersPresentI" + + "fEmpty\030\016 \001(\010\022!\n\005users\030\017 \003(\0132\022.sonarqube." + + "ws.User\022!\n\031actionPlansPresentIfEmpty\030\020 \001" + + "(\010\0224\n\013actionPlans\030\021 \003(\0132\037.sonarqube.ws.i" + + "ssues.ActionPlan\022\037\n\027languagesPresentIfEm" + + "pty\030\022 \001(\010\0220\n\tlanguages\030\023 \003(\0132\035.sonarqube" + + ".ws.issues.Language\022#\n\006facets\030\024 \003(\0132\023.so" + + "narqube.ws.Facet\022\034\n\024facetsPresentIfEmpty" + + "\030\025 \001(\010\"\333\004\n\005Issue\022\013\n\003key\030\001 \001(\t\022\014\n\004rule\030\002 " + + "\001(\t\022(\n\010severity\030\003 \001(\0162\026.sonarqube.ws.Sev", + "erity\022\021\n\tcomponent\030\004 \001(\t\022\023\n\013componentId\030" + + "\005 \001(\003\022\017\n\007project\030\006 \001(\t\022\014\n\004line\030\007 \001(\005\022\022\n\n" + + "resolution\030\010 \001(\t\022\016\n\006status\030\t \001(\t\022\017\n\007mess" + + "age\030\n \001(\t\022\014\n\004debt\030\013 \001(\t\022\020\n\010assignee\030\014 \001(" + + "\t\022\020\n\010reporter\030\r \001(\t\022\016\n\006author\030\016 \001(\t\022\022\n\na" + + "ctionPlan\030\017 \001(\t\022\026\n\016actionPlanName\030\020 \001(\t\022" + + "\014\n\004attr\030\021 \001(\t\022\014\n\004tags\030\022 \003(\t\022!\n\031transitio" + + "nsPresentIfEmpty\030\023 \001(\010\022\023\n\013transitions\030\024 " + + "\003(\t\022\035\n\025actionsPresentIfEmpty\030\025 \001(\010\022\017\n\007ac" + + "tions\030\026 \003(\t\022\036\n\026commentsPresentIfEmpty\030\027 ", + "\001(\010\022.\n\010comments\030\030 \003(\0132\034.sonarqube.ws.iss" + + "ues.Comment\022\024\n\014creationDate\030\031 \001(\t\022\022\n\nupd" + + "ateDate\030\032 \001(\t\022\022\n\nfUpdateAge\030\033 \001(\t\022\021\n\tclo" + + "seDate\030\034 \001(\t\"\220\001\n\007Comment\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005login\030\002 \001(\t\022\r\n\005email\030\003 \001(\t\022\020\n\010userName\030" + + "\004 \001(\t\022\020\n\010htmlText\030\005 \001(\t\022\020\n\010markdown\030\006 \001(" + + "\t\022\021\n\tupdatable\030\007 \001(\010\022\021\n\tcreatedAt\030\010 \001(\t\"" + + "Z\n\nActionPlan\022\013\n\003key\030\001 \001(\t\022\014\n\004name\030\002 \001(\t" + + "\022\016\n\006status\030\003 \001(\t\022\020\n\010deadLine\030\004 \001(\t\022\017\n\007pr" + + "oject\030\005 \001(\t\"%\n\010Language\022\013\n\003key\030\001 \001(\t\022\014\n\004", + "name\030\002 \001(\tB\034\n\020org.sonarqube.wsB\006IssuesH\001" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -8676,19 +12504,31 @@ public final class Issues { internal_static_sonarqube_ws_issues_Search_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_sonarqube_ws_issues_Search_descriptor, - new java.lang.String[] { "Paging", "Issues", "Facets", "Projects", "Components", "Rules", "Users", }); + new java.lang.String[] { "Total", "P", "Ps", "Paging", "DebtTotal", "Issues", "ProjectsPresentIfEmpty", "Projects", "ComponentsPresentIfEmpty", "Components", "RulesPresentIfEmpty", "Rules", "UsersPresentIfEmpty", "Users", "ActionPlansPresentIfEmpty", "ActionPlans", "LanguagesPresentIfEmpty", "Languages", "Facets", "FacetsPresentIfEmpty", }); internal_static_sonarqube_ws_issues_Issue_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_sonarqube_ws_issues_Issue_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_sonarqube_ws_issues_Issue_descriptor, - new java.lang.String[] { "Key", "Rule", "Component", "ComponentId", "Project", "SubProject", "Line", "Resolution", "Status", "Message", "Debt", "Assignee", "Reporter", "ScmAuthor", "ActionPlan", "ActionPlanName", "Attr", "Tags", "Transitions", "Actions", "Comments", "CreationDate", "UpdateDate", "FUpdateAge", "CloseDate", }); + new java.lang.String[] { "Key", "Rule", "Severity", "Component", "ComponentId", "Project", "Line", "Resolution", "Status", "Message", "Debt", "Assignee", "Reporter", "Author", "ActionPlan", "ActionPlanName", "Attr", "Tags", "TransitionsPresentIfEmpty", "Transitions", "ActionsPresentIfEmpty", "Actions", "CommentsPresentIfEmpty", "Comments", "CreationDate", "UpdateDate", "FUpdateAge", "CloseDate", }); internal_static_sonarqube_ws_issues_Comment_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_sonarqube_ws_issues_Comment_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_sonarqube_ws_issues_Comment_descriptor, new java.lang.String[] { "Key", "Login", "Email", "UserName", "HtmlText", "Markdown", "Updatable", "CreatedAt", }); + internal_static_sonarqube_ws_issues_ActionPlan_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_sonarqube_ws_issues_ActionPlan_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_sonarqube_ws_issues_ActionPlan_descriptor, + new java.lang.String[] { "Key", "Name", "Status", "DeadLine", "Project", }); + internal_static_sonarqube_ws_issues_Language_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_sonarqube_ws_issues_Language_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_sonarqube_ws_issues_Language_descriptor, + new java.lang.String[] { "Key", "Name", }); org.sonarqube.ws.Common.getDescriptor(); } diff --git a/sonar-ws/src/main/protobuf/ws-common.proto b/sonar-ws/src/main/protobuf/ws-common.proto index ecebd5236e4..a269ff7f4be 100644 --- a/sonar-ws/src/main/protobuf/ws-common.proto +++ b/sonar-ws/src/main/protobuf/ws-common.proto @@ -25,8 +25,8 @@ option java_outer_classname = "Common"; option optimize_for = SPEED; message Paging { - optional int32 page_index = 1; - optional int32 page_size = 2; + optional int32 pageIndex = 1; + optional int32 pageSize = 2; optional int32 total = 3; optional int32 pages = 4; } @@ -42,17 +42,24 @@ message FacetValue { optional int64 count = 2; } +enum Severity { + INFO = 0; + MINOR = 1; + MAJOR = 2; + CRITICAL = 3; + BLOCKER = 4; +} + message Component { - optional string uuid = 1; + optional string id = 1; optional string key = 2; - optional int32 id = 3; - optional bool enabled = 4; - optional string qualifier = 5; - optional string name = 6; - optional string longName = 7; - optional string path = 8; - optional int32 projectId = 9; - optional int32 subProjectId = 10; + optional bool enabled = 3; + optional string qualifier = 4; + optional string name = 5; + optional string longName = 6; + optional string path = 7; + optional string project = 8; + optional string subProject = 9; } message Rule { diff --git a/sonar-ws/src/main/protobuf/ws-issues.proto b/sonar-ws/src/main/protobuf/ws-issues.proto index d8129a3d725..40c9c9daa77 100644 --- a/sonar-ws/src/main/protobuf/ws-issues.proto +++ b/sonar-ws/src/main/protobuf/ws-issues.proto @@ -29,22 +29,39 @@ option optimize_for = SPEED; // Response of URL api/issues/search message Search { // TODO errors - optional Paging paging = 1; - repeated Issue issues = 2; - repeated Facet facets = 3; - repeated Component projects = 4; - repeated Component components = 5; - repeated Rule rules = 6; - repeated User users = 7; + + optional int64 total = 1; + optional int64 p = 2; + optional int32 ps = 3; + optional Paging paging = 4; + + // Total amount of debt, only when the facet "total" is enabled + optional int64 debtTotal = 5; + + repeated Issue issues = 6; + optional bool projectsPresentIfEmpty = 8; + repeated Component projects = 9; + optional bool componentsPresentIfEmpty = 10; + repeated Component components = 11; + optional bool rulesPresentIfEmpty = 12; + repeated Rule rules = 13; + optional bool usersPresentIfEmpty = 14; + repeated User users = 15; + optional bool actionPlansPresentIfEmpty = 16; + repeated ActionPlan actionPlans = 17; + optional bool languagesPresentIfEmpty = 18; + repeated Language languages = 19; + repeated Facet facets = 20; + optional bool facetsPresentIfEmpty = 21; } message Issue { optional string key = 1; optional string rule = 2; - optional string component = 3; - optional int32 componentId = 4; - optional string project = 5; - optional string subProject = 6; + optional Severity severity = 3; + optional string component = 4; + optional int64 componentId = 5; + optional string project = 6; optional int32 line = 7; optional string resolution = 8; optional string status = 9; @@ -52,27 +69,57 @@ message Issue { optional string debt = 11; optional string assignee = 12; optional string reporter = 13; - optional string scmAuthor = 14; + + // SCM login of the committer who introduced the issue + optional string author = 14; + optional string actionPlan = 15; optional string actionPlanName = 16; optional string attr = 17; repeated string tags = 18; - repeated string transitions = 19; - repeated string actions = 20; - repeated Comment comments = 21; - optional string creationDate= 22; - optional string updateDate= 23; - optional string fUpdateAge= 24; - optional string closeDate= 25; + + // the transitions allowed for the requesting user. + optional bool transitionsPresentIfEmpty=19; + repeated string transitions = 20; + + // the actions allowed for the requesting user. + optional bool actionsPresentIfEmpty=21; + repeated string actions = 22; + + optional bool commentsPresentIfEmpty = 23; + repeated Comment comments = 24; + optional string creationDate= 25; + optional string updateDate= 26; + optional string fUpdateAge= 27; + optional string closeDate= 28; } message Comment { optional string key = 1; optional string login = 2; + // TODO drop, it's already in field "users" optional string email = 3; + // TODO drop, it's already in field "users" optional string userName = 4; optional string htmlText = 5; + // TODO rename markdownText ? optional string markdown = 6; optional bool updatable = 7; optional string createdAt = 8; } + +message ActionPlan { + optional string key = 1; + optional string name = 2; + + // TODO define enum + optional string status = 3; + optional string deadLine = 4; + // TODO to be renamed, is it id or key ? + optional string project = 5; +} + +message Language { + optional string key = 1; + optional string name = 2; +} -- 2.39.5