import com.google.common.collect.ImmutableMap;
import java.util.Date;
-import java.util.List;
import java.util.Map;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
-import org.sonar.api.rule.RuleKey;
-import org.sonar.api.rule.Severity;
-import org.sonar.api.server.rule.RuleParamType;
-import org.sonar.api.utils.DateUtils;
import org.sonar.api.web.UserRole;
-import org.sonar.batch.protocol.input.ActiveRule;
import org.sonar.batch.protocol.input.FileData;
import org.sonar.batch.protocol.input.ProjectRepositories;
-import org.sonar.batch.protocol.input.QProfile;
import org.sonar.core.permission.GlobalPermissions;
import org.sonar.db.DbSession;
import org.sonar.db.component.ComponentDto;
import org.sonar.db.component.ComponentTesting;
import org.sonar.db.property.PropertyDto;
import org.sonar.db.qualityprofile.QualityProfileDto;
-import org.sonar.db.rule.RuleDto;
-import org.sonar.db.rule.RuleParamDto;
-import org.sonar.db.rule.RuleTesting;
import org.sonar.db.source.FileSourceDao;
import org.sonar.db.source.FileSourceDto;
import org.sonar.db.source.FileSourceDto.Type;
import org.sonar.server.db.DbClient;
import org.sonar.server.exceptions.ForbiddenException;
import org.sonar.server.qualityprofile.QProfileName;
-import org.sonar.server.qualityprofile.RuleActivation;
-import org.sonar.server.qualityprofile.RuleActivator;
import org.sonar.server.tester.ServerTester;
import org.sonar.server.tester.UserSessionRule;
-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.sonar.api.utils.DateUtils.formatDateTime;
// Project properties
tester.get(DbClient.class).propertiesDao().insertProperty(
dbSession, new PropertyDto().setKey("sonar.jira.project.key").setValue("SONAR").setResourceId(project.getId())
- );
+ );
tester.get(DbClient.class).propertiesDao().insertProperty(
dbSession, new PropertyDto().setKey("sonar.jira.login.secured").setValue("john").setResourceId(project.getId())
- );
+ );
dbSession.commit();
ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(projectSettings).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
- ));
+ ));
}
@Test
// Project properties
tester.get(DbClient.class).propertiesDao().insertProperty(
dbSession, new PropertyDto().setKey("sonar.jira.project.key").setValue("SONAR").setResourceId(project.getId())
- );
+ );
tester.get(DbClient.class).propertiesDao().insertProperty(
dbSession, new PropertyDto().setKey("sonar.jira.login.secured").setValue("john").setResourceId(project.getId())
- );
+ );
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()).setPreview(true));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()).setIssuesMode(true));
Map<String, String> projectSettings = ref.settings(project.key());
assertThat(projectSettings).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR"
- ));
+ ));
}
@Test
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
- ));
+ ));
assertThat(ref.settings(module.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR-SERVER",
"sonar.jira.login.secured", "john",
"sonar.coverage.exclusions", "**/*.java"
- ));
+ ));
}
@Test
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
- ));
+ ));
assertThat(ref.settings(module.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
- ));
+ ));
}
@Test
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
- ));
+ ));
assertThat(ref.settings(module.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR-SERVER",
"sonar.jira.login.secured", "john",
"sonar.coverage.exclusions", "**/*.java"
- ));
+ ));
assertThat(ref.settings(subModule.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR-SERVER-DAO",
"sonar.jira.login.secured", "john",
"sonar.coverage.exclusions", "**/*.java"
- ));
+ ));
}
@Test
tester.get(DbClient.class).componentDao().insert(dbSession, module1);
// Module 1 properties
- tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.jira.project.key").setValue("SONAR-SERVER").setResourceId(module1.getId()));
+ tester.get(DbClient.class).propertiesDao()
+ .insertProperty(dbSession, new PropertyDto().setKey("sonar.jira.project.key").setValue("SONAR-SERVER").setResourceId(module1.getId()));
// This property should not be found on the other module
- tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(module1.getId()));
+ tester.get(DbClient.class).propertiesDao()
+ .insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(module1.getId()));
ComponentDto module2 = ComponentTesting.newModuleDto(project);
tester.get(DbClient.class).componentDao().insert(dbSession, module2);
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
- ));
+ ));
assertThat(ref.settings(module1.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR-SERVER",
"sonar.jira.login.secured", "john",
"sonar.coverage.exclusions", "**/*.java"
- ));
+ ));
assertThat(ref.settings(module2.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR-APPLICATION",
"sonar.jira.login.secured", "john"
- ));
+ ));
}
@Test
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
- ));
+ ));
}
@Test
// Sub module properties
tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.jira.project.key").setValue("SONAR").setResourceId(subModule.getId()));
tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.jira.login.secured").setValue("john").setResourceId(subModule.getId()));
- tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(subModule.getId()));
+ tester.get(DbClient.class).propertiesDao()
+ .insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(subModule.getId()));
dbSession.commit();
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john",
"sonar.coverage.exclusions", "**/*.java"
- ));
+ ));
}
@Test
tester.get(DbClient.class).componentDao().insert(dbSession, subModule);
// Sub module properties
- tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(subModule.getId()));
+ tester.get(DbClient.class).propertiesDao()
+ .insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(subModule.getId()));
dbSession.commit();
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john",
"sonar.coverage.exclusions", "**/*.java"
- ));
+ ));
}
@Test
// Project properties
tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.jira.project.key").setValue("SONAR").setResourceId(project.getId()));
tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.jira.login.secured").setValue("john").setResourceId(project.getId()));
- tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(project.getId()));
+ tester.get(DbClient.class).propertiesDao()
+ .insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(project.getId()));
ComponentDto module = ComponentTesting.newModuleDto(project);
tester.get(DbClient.class).componentDao().insert(dbSession, module);
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john",
"sonar.coverage.exclusions", "**/*.java"
- ));
+ ));
}
@Test
// Project properties
tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.jira.login.secured").setValue("john").setResourceId(project.getId()));
- tester.get(DbClient.class).propertiesDao().insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(project.getId()));
+ tester.get(DbClient.class).propertiesDao()
+ .insertProperty(dbSession, new PropertyDto().setKey("sonar.coverage.exclusions").setValue("**/*.java").setResourceId(project.getId()));
ComponentDto module = ComponentTesting.newModuleDto(project);
tester.get(DbClient.class).componentDao().insert(dbSession, module);
"sonar.jira.project.key", "SONAR-SERVER",
"sonar.jira.login.secured", "john",
"sonar.coverage.exclusions", "**/*.java"
- ));
- }
-
- @Test
- public void return_quality_profile_from_project_profile() {
- Date ruleUpdatedAt = DateUtils.parseDateTime("2014-01-14T13:00:00+0100");
-
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
-
- QualityProfileDto profileDto = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd").setRulesUpdatedAt(
- formatDateTime(ruleUpdatedAt));
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
- tester.get(DbClient.class).qualityProfileDao().insertProjectProfileAssociation(project.uuid(), profileDto.getKee(), dbSession);
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- List<QProfile> profiles = newArrayList(ref.qProfiles());
- assertThat(profiles).hasSize(1);
- assertThat(profiles.get(0).key()).isEqualTo("abcd");
- assertThat(profiles.get(0).name()).isEqualTo("SonarQube way");
- assertThat(profiles.get(0).language()).isEqualTo("xoo");
- assertThat(profiles.get(0).rulesUpdatedAt()).isEqualTo(ruleUpdatedAt);
- }
-
- @Test
- public void return_quality_profile_from_default_profile() {
- Date ruleUpdatedAt = DateUtils.parseDateTime("2014-01-14T13:00:00+0100");
-
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
-
- QualityProfileDto profileDto = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd").setRulesUpdatedAt(
- formatDateTime(ruleUpdatedAt)).setDefault(true);
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- List<QProfile> profiles = newArrayList(ref.qProfiles());
- assertThat(profiles).hasSize(1);
- assertThat(profiles.get(0).key()).isEqualTo("abcd");
- assertThat(profiles.get(0).name()).isEqualTo("SonarQube way");
- assertThat(profiles.get(0).language()).isEqualTo("xoo");
- assertThat(profiles.get(0).rulesUpdatedAt()).isEqualTo(ruleUpdatedAt);
- }
-
- @Test
- public void return_quality_profile_from_given_profile_name() {
- Date ruleUpdatedAt = DateUtils.parseDateTime("2014-01-14T13:00:00+0100");
-
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
-
- QualityProfileDto profileDto = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd").setRulesUpdatedAt(
- formatDateTime(ruleUpdatedAt)).setDefault(true);
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()).setProfileName("SonarQube way"));
- List<QProfile> profiles = newArrayList(ref.qProfiles());
- assertThat(profiles).hasSize(1);
- assertThat(profiles.get(0).key()).isEqualTo("abcd");
- assertThat(profiles.get(0).name()).isEqualTo("SonarQube way");
- assertThat(profiles.get(0).language()).isEqualTo("xoo");
- assertThat(profiles.get(0).rulesUpdatedAt()).isEqualTo(ruleUpdatedAt);
- }
-
- @Test
- public void return_quality_profiles_even_when_project_does_not_exists() {
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- Date ruleUpdatedAt = DateUtils.parseDateTime("2014-01-14T13:00:00+0100");
-
- QualityProfileDto profileDto = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd").setRulesUpdatedAt(
- formatDateTime(ruleUpdatedAt)).setDefault(true);
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey("project"));
- List<QProfile> profiles = newArrayList(ref.qProfiles());
- assertThat(profiles).hasSize(1);
- assertThat(profiles.get(0).key()).isEqualTo("abcd");
- assertThat(profiles.get(0).name()).isEqualTo("SonarQube way");
- assertThat(profiles.get(0).language()).isEqualTo("xoo");
- assertThat(profiles.get(0).rulesUpdatedAt()).isEqualTo(ruleUpdatedAt);
- }
-
- @Test
- public void return_provisioned_project_profile() {
- Date ruleUpdatedAt = DateUtils.parseDateTime("2014-01-14T13:00:00+0100");
-
- // No snapshot attached on the project -> provisioned project
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
-
- QualityProfileDto profileDto = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd").setRulesUpdatedAt(
- formatDateTime(ruleUpdatedAt));
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
- tester.get(DbClient.class).qualityProfileDao().insertProjectProfileAssociation(project.uuid(), profileDto.getKee(), dbSession);
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- List<QProfile> profiles = newArrayList(ref.qProfiles());
- assertThat(profiles).hasSize(1);
- assertThat(profiles.get(0).key()).isEqualTo("abcd");
- assertThat(profiles.get(0).name()).isEqualTo("SonarQube way");
- assertThat(profiles.get(0).language()).isEqualTo("xoo");
- assertThat(profiles.get(0).rulesUpdatedAt()).isEqualTo(ruleUpdatedAt);
- }
-
- @Test
- public void fail_when_no_quality_profile_for_a_language() {
- ComponentDto project = ComponentTesting.newProjectDto().setKey("org.codehaus.sonar:sonar");
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
- dbSession.commit();
-
- try {
- loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- fail();
- } catch (Exception e) {
- assertThat(e).isInstanceOf(IllegalStateException.class).hasMessage("No quality profile can been found on language 'xoo' for project 'org.codehaus.sonar:sonar'");
- }
- }
-
- @Test
- public void return_active_rules() {
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
-
- QualityProfileDto profileDto = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd").setRulesUpdatedAt(
- formatDateTime(DateUtils.parseDateTime("2014-01-14T13:00:00+0100"))).setDefault(true);
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
-
- RuleKey ruleKey = RuleKey.of("squid", "AvoidCycle");
- RuleDto rule = RuleTesting.newDto(ruleKey).setName("Avoid Cycle").setConfigKey("squid-1").setLanguage(ServerTester.Xoo.KEY);
- tester.get(DbClient.class).deprecatedRuleDao().insert(dbSession, rule);
- tester.get(DbClient.class).deprecatedRuleDao().insertRuleParam(dbSession, rule, RuleParamDto.createFor(rule)
- .setName("max").setDefaultValue("10").setType(RuleParamType.INTEGER.type()));
-
- RuleActivation activation = new RuleActivation(ruleKey);
- activation.setSeverity(Severity.MINOR);
- activation.setParameter("max", "2");
- tester.get(RuleActivator.class).activate(dbSession, activation, profileDto.getKey());
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- List<ActiveRule> activeRules = newArrayList(ref.activeRules());
- assertThat(activeRules).hasSize(1);
- assertThat(activeRules.get(0).repositoryKey()).isEqualTo("squid");
- assertThat(activeRules.get(0).ruleKey()).isEqualTo("AvoidCycle");
- assertThat(activeRules.get(0).name()).isEqualTo("Avoid Cycle");
- assertThat(activeRules.get(0).language()).isEqualTo("xoo");
- assertThat(activeRules.get(0).severity()).isEqualTo("MINOR");
- assertThat(activeRules.get(0).internalKey()).isEqualTo("squid-1");
- assertThat(activeRules.get(0).params()).isEqualTo(ImmutableMap.of("max", "2"));
- }
-
- @Test
- public void return_only_active_rules_from_project_profile() {
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
-
- RuleKey ruleKey1 = RuleKey.of("squid", "AvoidCycle");
- RuleKey ruleKey2 = RuleKey.of("squid", "AvoidNPE");
- tester.get(DbClient.class).deprecatedRuleDao().insert(dbSession,
- RuleTesting.newDto(ruleKey1).setName("Avoid Cycle").setLanguage(ServerTester.Xoo.KEY),
- RuleTesting.newDto(ruleKey2).setName("Avoid NPE").setLanguage(ServerTester.Xoo.KEY)
- );
-
- QualityProfileDto profileDto1 = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd");
- QualityProfileDto profileDto2 = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "Another profile"), "efgh");
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto1, profileDto2);
-
- // The first profile is the profile used but the project
- tester.get(DbClient.class).qualityProfileDao().insertProjectProfileAssociation(project.uuid(), profileDto1.getKee(), dbSession);
-
- tester.get(RuleActivator.class).activate(dbSession, new RuleActivation(ruleKey1).setSeverity(Severity.MINOR), profileDto1.getKey());
-
- // Active rule from 2nd profile
- tester.get(RuleActivator.class).activate(dbSession, new RuleActivation(ruleKey1).setSeverity(Severity.BLOCKER), profileDto2.getKey());
- tester.get(RuleActivator.class).activate(dbSession, new RuleActivation(ruleKey2).setSeverity(Severity.BLOCKER), profileDto2.getKey());
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- List<ActiveRule> activeRules = newArrayList(ref.activeRules());
- assertThat(activeRules).hasSize(1);
- assertThat(activeRules.get(0).repositoryKey()).isEqualTo("squid");
- assertThat(activeRules.get(0).ruleKey()).isEqualTo("AvoidCycle");
- assertThat(activeRules.get(0).name()).isEqualTo("Avoid Cycle");
- assertThat(activeRules.get(0).language()).isEqualTo("xoo");
- assertThat(activeRules.get(0).severity()).isEqualTo("MINOR");
- }
-
- @Test
- public void return_more_than_10_active_rules() {
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
-
- QualityProfileDto profileDto = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd")
- .setRulesUpdatedAt(formatDateTime(DateUtils.parseDateTime("2014-01-14T13:00:00+0100"))).setDefault(true);
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
-
- for (int i = 0; i < 20; i++) {
- RuleKey ruleKey = RuleKey.of("squid", "Rule" + i);
- tester.get(DbClient.class).deprecatedRuleDao().insert(dbSession, RuleTesting.newDto(ruleKey).setName("Rule" + i).setLanguage(ServerTester.Xoo.KEY));
- tester.get(RuleActivator.class).activate(dbSession, new RuleActivation(ruleKey).setSeverity(Severity.MINOR), profileDto.getKey());
- }
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- assertThat(ref.activeRules()).hasSize(20);
- }
-
- @Test
- public void return_custom_rule() {
- Date ruleUpdatedAt = DateUtils.parseDateTime("2014-01-14T13:00:00+0100");
-
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
-
- QualityProfileDto profileDto = newQProfileDto(QProfileName.createFor(ServerTester.Xoo.KEY, "SonarQube way"), "abcd").setRulesUpdatedAt(
- formatDateTime(ruleUpdatedAt)).setDefault(true);
- tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
-
- RuleKey ruleKey = RuleKey.of("squid", "ArchitecturalConstraint");
- RuleDto templateRule = RuleTesting.newTemplateRule(ruleKey).setName("Architectural Constraint").setLanguage(ServerTester.Xoo.KEY);
- tester.get(DbClient.class).deprecatedRuleDao().insert(dbSession, templateRule);
-
- RuleDto customRule = RuleTesting.newCustomRule(templateRule);
- tester.get(DbClient.class).deprecatedRuleDao().insert(dbSession, customRule);
- tester.get(RuleActivator.class).activate(dbSession, new RuleActivation(customRule.getKey()).setSeverity(Severity.MINOR), profileDto.getKey());
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- List<ActiveRule> activeRules = newArrayList(ref.activeRules());
- assertThat(activeRules).hasSize(1);
- assertThat(activeRules.get(0).repositoryKey()).isEqualTo("squid");
- assertThat(activeRules.get(0).ruleKey()).startsWith("ArchitecturalConstraint_");
- assertThat(activeRules.get(0).templateRuleKey()).isEqualTo("ArchitecturalConstraint");
- assertThat(activeRules.get(0).language()).isEqualTo("xoo");
- assertThat(activeRules.get(0).severity()).isEqualTo("MINOR");
- }
-
- @Test
- public void return_manual_rules() {
- ComponentDto project = ComponentTesting.newProjectDto();
- userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
- tester.get(DbClient.class).componentDao().insert(dbSession, project);
- addDefaultProfile();
-
- RuleDto rule = RuleTesting.newManualRule("manualRuleKey").setName("Name manualRuleKey");
- tester.get(DbClient.class).deprecatedRuleDao().insert(dbSession, rule);
-
- dbSession.commit();
-
- ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
- List<ActiveRule> activeRules = newArrayList(ref.activeRules());
- assertThat(activeRules).extracting("repositoryKey").containsOnly(RuleKey.MANUAL_REPOSITORY_KEY);
- assertThat(activeRules).extracting("ruleKey").containsOnly("manualRuleKey");
- assertThat(activeRules).extracting("name").containsOnly("Name manualRuleKey");
- assertThat(activeRules).extracting("language").containsNull();
- assertThat(activeRules).extracting("severity").containsNull();
+ ));
}
@Test
dbSession.commit();
try {
- loader.load(ProjectDataQuery.create().setModuleKey(project.key()).setPreview(false));
+ loader.load(ProjectDataQuery.create().setModuleKey(project.key()).setIssuesMode(false));
fail();
} catch (Exception e) {
assertThat(e).isInstanceOf(ForbiddenException.class).hasMessage(
// File on project
ComponentDto projectFile = ComponentTesting.newFileDto(project, "projectFile");
tester.get(DbClient.class).componentDao().insert(dbSession, projectFile);
- tester.get(FileSourceDao.class).insert(newFileSourceDto(projectFile).setSrcHash("123456"));
+ tester.get(FileSourceDao.class).insert(newFileSourceDto(projectFile).setSrcHash("123456").setRevision("987654321"));
ComponentDto module = ComponentTesting.newModuleDto(project);
userSessionRule.login("john").setGlobalPermissions(GlobalPermissions.SCAN_EXECUTION);
// File on module
ComponentDto moduleFile = ComponentTesting.newFileDto(module, "moduleFile");
tester.get(DbClient.class).componentDao().insert(dbSession, moduleFile);
- tester.get(FileSourceDao.class).insert(newFileSourceDto(moduleFile).setSrcHash("789456"));
+ tester.get(FileSourceDao.class).insert(newFileSourceDto(moduleFile).setSrcHash("789456").setRevision("123456789"));
dbSession.commit();
ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(module.key()));
assertThat(ref.fileData(module.key(), moduleFile.path()).hash()).isEqualTo("789456");
+ assertThat(ref.fileData(module.key(), moduleFile.path()).revision()).isEqualTo("123456789");
assertThat(ref.fileData(project.key(), projectFile.path())).isNull();
}
tester.get(DbClient.class).qualityProfileDao().insert(dbSession, profileDto);
}
- private FileSourceDto newFileSourceDto(ComponentDto file) {
+ private static FileSourceDto newFileSourceDto(ComponentDto file) {
return new FileSourceDto()
.setFileUuid(file.uuid())
.setProjectUuid(file.projectUuid())
- //.setSourceData(",,,,,,,,,,,,,,,unchanged ,,,,,,,,,,,,,,,content ")
+ // .setSourceData(",,,,,,,,,,,,,,,unchanged ,,,,,,,,,,,,,,,content ")
.setDataHash("0263047cd758c68c27683625f072f010")
.setLineHashes("8d7b3d6b83c0a517eac07e1aac94b773")
.setCreatedAt(System.currentTimeMillis())
.setUpdatedAt(System.currentTimeMillis())
.setDataType(Type.SOURCE)
+ .setRevision("123456789")
.setSrcHash("123456");
}
--- /dev/null
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: ws-batch.proto
+
+package org.sonarqube.ws;
+
+public final class WsBatch {
+ private WsBatch() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ }
+ public interface WsProjectResponseOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:sonarqube.ws.batch.WsProjectResponse)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>optional int64 timestamp = 1;</code>
+ */
+ boolean hasTimestamp();
+ /**
+ * <code>optional int64 timestamp = 1;</code>
+ */
+ long getTimestamp();
+
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.Settings> settingsByModule = 2;</code>
+ */
+ java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>
+ getSettingsByModule();
+
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch = 3;</code>
+ */
+ java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>
+ getFileDataByModuleAndPatch();
+
+ /**
+ * <code>optional int64 lastAnalysisDate = 4;</code>
+ */
+ boolean hasLastAnalysisDate();
+ /**
+ * <code>optional int64 lastAnalysisDate = 4;</code>
+ */
+ long getLastAnalysisDate();
+ }
+ /**
+ * Protobuf type {@code sonarqube.ws.batch.WsProjectResponse}
+ *
+ * <pre>
+ * WS api/batch/project
+ * </pre>
+ */
+ public static final class WsProjectResponse extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:sonarqube.ws.batch.WsProjectResponse)
+ WsProjectResponseOrBuilder {
+ // Use WsProjectResponse.newBuilder() to construct.
+ private WsProjectResponse(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private WsProjectResponse() {
+ timestamp_ = 0L;
+ lastAnalysisDate_ = 0L;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private WsProjectResponse(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ bitField0_ |= 0x00000001;
+ timestamp_ = input.readInt64();
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ settingsByModule_ = com.google.protobuf.MapField.newMapField(
+ SettingsByModuleDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000002;
+ }
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>
+ settingsByModule = input.readMessage(
+ SettingsByModuleDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ settingsByModule_.getMutableMap().put(settingsByModule.getKey(), settingsByModule.getValue());
+ break;
+ }
+ case 26: {
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ fileDataByModuleAndPatch_ = com.google.protobuf.MapField.newMapField(
+ FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000004;
+ }
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>
+ fileDataByModuleAndPatch = input.readMessage(
+ FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ fileDataByModuleAndPatch_.getMutableMap().put(fileDataByModuleAndPatch.getKey(), fileDataByModuleAndPatch.getValue());
+ break;
+ }
+ case 32: {
+ bitField0_ |= 0x00000002;
+ lastAnalysisDate_ = input.readInt64();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ 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.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 2:
+ return internalGetSettingsByModule();
+ case 3:
+ return internalGetFileDataByModuleAndPatch();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.sonarqube.ws.WsBatch.WsProjectResponse.class, org.sonarqube.ws.WsBatch.WsProjectResponse.Builder.class);
+ }
+
+ public interface SettingsOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:sonarqube.ws.batch.WsProjectResponse.Settings)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>map<string, string> settings = 1;</code>
+ */
+ java.util.Map<java.lang.String, java.lang.String>
+ getSettings();
+ }
+ /**
+ * Protobuf type {@code sonarqube.ws.batch.WsProjectResponse.Settings}
+ */
+ public static final class Settings extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:sonarqube.ws.batch.WsProjectResponse.Settings)
+ SettingsOrBuilder {
+ // Use Settings.newBuilder() to construct.
+ private Settings(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private Settings() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Settings(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ 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)) {
+ settings_ = com.google.protobuf.MapField.newMapField(
+ SettingsDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000001;
+ }
+ com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
+ settings = input.readMessage(
+ SettingsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ settings_.getMutableMap().put(settings.getKey(), settings.getValue());
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ 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.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 1:
+ return internalGetSettings();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.class, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.Builder.class);
+ }
+
+ public static final int SETTINGS_FIELD_NUMBER = 1;
+ private static final class SettingsDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, java.lang.String> defaultEntry =
+ com.google.protobuf.MapEntry
+ .<java.lang.String, java.lang.String>newDefaultInstance(
+ org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_SettingsEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "");
+ }
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> settings_;
+ private com.google.protobuf.MapField<java.lang.String, java.lang.String>
+ internalGetSettings() {
+ if (settings_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ SettingsDefaultEntryHolder.defaultEntry);
+ }
+ return settings_;
+ }
+ /**
+ * <code>map<string, string> settings = 1;</code>
+ */
+
+ public java.util.Map<java.lang.String, java.lang.String> getSettings() {
+ return internalGetSettings().getMap();
+ }
+
+ 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 {
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
+ : internalGetSettings().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
+ settings = SettingsDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ output.writeMessage(1, settings);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> entry
+ : internalGetSettings().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<java.lang.String, java.lang.String>
+ settings = SettingsDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, settings);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings 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.WsBatch.WsProjectResponse.Settings parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.sonarqube.ws.WsBatch.WsProjectResponse.Settings prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(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.batch.WsProjectResponse.Settings}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:sonarqube.ws.batch.WsProjectResponse.Settings)
+ org.sonarqube.ws.WsBatch.WsProjectResponse.SettingsOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 1:
+ return internalGetSettings();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMutableMapField(
+ int number) {
+ switch (number) {
+ case 1:
+ return internalGetMutableSettings();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.class, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.Builder.class);
+ }
+
+ // Construct using org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ internalGetMutableSettings().clear();
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.Settings getDefaultInstanceForType() {
+ return org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.getDefaultInstance();
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.Settings build() {
+ org.sonarqube.ws.WsBatch.WsProjectResponse.Settings result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.Settings buildPartial() {
+ org.sonarqube.ws.WsBatch.WsProjectResponse.Settings result = new org.sonarqube.ws.WsBatch.WsProjectResponse.Settings(this);
+ int from_bitField0_ = bitField0_;
+ result.settings_ = internalGetSettings();
+ result.settings_.makeImmutable();
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.sonarqube.ws.WsBatch.WsProjectResponse.Settings) {
+ return mergeFrom((org.sonarqube.ws.WsBatch.WsProjectResponse.Settings)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.sonarqube.ws.WsBatch.WsProjectResponse.Settings other) {
+ if (other == org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.getDefaultInstance()) return this;
+ internalGetMutableSettings().mergeFrom(
+ other.internalGetSettings());
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ 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.WsBatch.WsProjectResponse.Settings parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.sonarqube.ws.WsBatch.WsProjectResponse.Settings) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private com.google.protobuf.MapField<
+ java.lang.String, java.lang.String> settings_;
+ private com.google.protobuf.MapField<java.lang.String, java.lang.String>
+ internalGetSettings() {
+ if (settings_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ SettingsDefaultEntryHolder.defaultEntry);
+ }
+ return settings_;
+ }
+ private com.google.protobuf.MapField<java.lang.String, java.lang.String>
+ internalGetMutableSettings() {
+ onChanged();;
+ if (settings_ == null) {
+ settings_ = com.google.protobuf.MapField.newMapField(
+ SettingsDefaultEntryHolder.defaultEntry);
+ }
+ if (!settings_.isMutable()) {
+ settings_ = settings_.copy();
+ }
+ return settings_;
+ }
+ /**
+ * <code>map<string, string> settings = 1;</code>
+ */
+ public java.util.Map<java.lang.String, java.lang.String> getSettings() {
+ return internalGetSettings().getMap();
+ }
+ /**
+ * <code>map<string, string> settings = 1;</code>
+ */
+ public java.util.Map<java.lang.String, java.lang.String>
+ getMutableSettings() {
+ return internalGetMutableSettings().getMutableMap();
+ }
+
+ // @@protoc_insertion_point(builder_scope:sonarqube.ws.batch.WsProjectResponse.Settings)
+ }
+
+ // @@protoc_insertion_point(class_scope:sonarqube.ws.batch.WsProjectResponse.Settings)
+ private static final org.sonarqube.ws.WsBatch.WsProjectResponse.Settings DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.sonarqube.ws.WsBatch.WsProjectResponse.Settings();
+ }
+
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.Settings getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<Settings> PARSER =
+ new com.google.protobuf.AbstractParser<Settings>() {
+ public Settings parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Settings(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Settings> getParserForType() {
+ return PARSER;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.Settings getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface FileDataByPathOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:sonarqube.ws.batch.WsProjectResponse.FileDataByPath)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.FileData> FileDataByPath = 1;</code>
+ */
+ java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>
+ getFileDataByPath();
+ }
+ /**
+ * Protobuf type {@code sonarqube.ws.batch.WsProjectResponse.FileDataByPath}
+ */
+ public static final class FileDataByPath extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:sonarqube.ws.batch.WsProjectResponse.FileDataByPath)
+ FileDataByPathOrBuilder {
+ // Use FileDataByPath.newBuilder() to construct.
+ private FileDataByPath(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private FileDataByPath() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private FileDataByPath(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ 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)) {
+ fileDataByPath_ = com.google.protobuf.MapField.newMapField(
+ FileDataByPathDefaultEntryHolder.defaultEntry);
+ mutable_bitField0_ |= 0x00000001;
+ }
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>
+ fileDataByPath = input.readMessage(
+ FileDataByPathDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
+ fileDataByPath_.getMutableMap().put(fileDataByPath.getKey(), fileDataByPath.getValue());
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ 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.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 1:
+ return internalGetFileDataByPath();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.class, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.Builder.class);
+ }
+
+ public static final int FILEDATABYPATH_FIELD_NUMBER = 1;
+ private static final class FileDataByPathDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> defaultEntry =
+ com.google.protobuf.MapEntry
+ .<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>newDefaultInstance(
+ org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_FileDataByPathEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.MESSAGE,
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.getDefaultInstance());
+ }
+ private com.google.protobuf.MapField<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> fileDataByPath_;
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>
+ internalGetFileDataByPath() {
+ if (fileDataByPath_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ FileDataByPathDefaultEntryHolder.defaultEntry);
+ }
+ return fileDataByPath_;
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.FileData> FileDataByPath = 1;</code>
+ */
+
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> getFileDataByPath() {
+ return internalGetFileDataByPath().getMap();
+ }
+
+ 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 {
+ for (java.util.Map.Entry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> entry
+ : internalGetFileDataByPath().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>
+ fileDataByPath = FileDataByPathDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ output.writeMessage(1, fileDataByPath);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ private int memoizedSerializedSize = -1;
+ public int getSerializedSize() {
+ int size = memoizedSerializedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (java.util.Map.Entry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> entry
+ : internalGetFileDataByPath().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>
+ fileDataByPath = FileDataByPathDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(1, fileDataByPath);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath 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.WsBatch.WsProjectResponse.FileDataByPath parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(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.batch.WsProjectResponse.FileDataByPath}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:sonarqube.ws.batch.WsProjectResponse.FileDataByPath)
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPathOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 1:
+ return internalGetFileDataByPath();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMutableMapField(
+ int number) {
+ switch (number) {
+ case 1:
+ return internalGetMutableFileDataByPath();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.class, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.Builder.class);
+ }
+
+ // Construct using org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ internalGetMutableFileDataByPath().clear();
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath getDefaultInstanceForType() {
+ return org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.getDefaultInstance();
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath build() {
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath buildPartial() {
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath result = new org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath(this);
+ int from_bitField0_ = bitField0_;
+ result.fileDataByPath_ = internalGetFileDataByPath();
+ result.fileDataByPath_.makeImmutable();
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath) {
+ return mergeFrom((org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath other) {
+ if (other == org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.getDefaultInstance()) return this;
+ internalGetMutableFileDataByPath().mergeFrom(
+ other.internalGetFileDataByPath());
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ 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.WsBatch.WsProjectResponse.FileDataByPath parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private com.google.protobuf.MapField<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> fileDataByPath_;
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>
+ internalGetFileDataByPath() {
+ if (fileDataByPath_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ FileDataByPathDefaultEntryHolder.defaultEntry);
+ }
+ return fileDataByPath_;
+ }
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>
+ internalGetMutableFileDataByPath() {
+ onChanged();;
+ if (fileDataByPath_ == null) {
+ fileDataByPath_ = com.google.protobuf.MapField.newMapField(
+ FileDataByPathDefaultEntryHolder.defaultEntry);
+ }
+ if (!fileDataByPath_.isMutable()) {
+ fileDataByPath_ = fileDataByPath_.copy();
+ }
+ return fileDataByPath_;
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.FileData> FileDataByPath = 1;</code>
+ */
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData> getFileDataByPath() {
+ return internalGetFileDataByPath().getMap();
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.FileData> FileDataByPath = 1;</code>
+ */
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData>
+ getMutableFileDataByPath() {
+ return internalGetMutableFileDataByPath().getMutableMap();
+ }
+
+ // @@protoc_insertion_point(builder_scope:sonarqube.ws.batch.WsProjectResponse.FileDataByPath)
+ }
+
+ // @@protoc_insertion_point(class_scope:sonarqube.ws.batch.WsProjectResponse.FileDataByPath)
+ private static final org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath();
+ }
+
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<FileDataByPath> PARSER =
+ new com.google.protobuf.AbstractParser<FileDataByPath>() {
+ public FileDataByPath parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new FileDataByPath(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<FileDataByPath> getParserForType() {
+ return PARSER;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ public interface FileDataOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:sonarqube.ws.batch.WsProjectResponse.FileData)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ boolean hasHash();
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ java.lang.String getHash();
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ com.google.protobuf.ByteString
+ getHashBytes();
+
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ boolean hasRevision();
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ java.lang.String getRevision();
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ com.google.protobuf.ByteString
+ getRevisionBytes();
+ }
+ /**
+ * Protobuf type {@code sonarqube.ws.batch.WsProjectResponse.FileData}
+ */
+ public static final class FileData extends
+ com.google.protobuf.GeneratedMessage implements
+ // @@protoc_insertion_point(message_implements:sonarqube.ws.batch.WsProjectResponse.FileData)
+ FileDataOrBuilder {
+ // Use FileData.newBuilder() to construct.
+ private FileData(com.google.protobuf.GeneratedMessage.Builder builder) {
+ super(builder);
+ }
+ private FileData() {
+ hash_ = "";
+ revision_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private FileData(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
+ this();
+ 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;
+ hash_ = bs;
+ break;
+ }
+ case 18: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000002;
+ revision_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw new RuntimeException(e.setUnfinishedMessage(this));
+ } catch (java.io.IOException e) {
+ throw new RuntimeException(
+ 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.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.class, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int HASH_FIELD_NUMBER = 1;
+ private volatile java.lang.Object hash_;
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public boolean hasHash() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public java.lang.String getHash() {
+ java.lang.Object ref = hash_;
+ 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()) {
+ hash_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getHashBytes() {
+ java.lang.Object ref = hash_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ hash_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int REVISION_FIELD_NUMBER = 2;
+ private volatile java.lang.Object revision_;
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public boolean hasRevision() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public java.lang.String getRevision() {
+ java.lang.Object ref = revision_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ revision_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRevisionBytes() {
+ java.lang.Object ref = revision_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ revision_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ 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 {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeBytes(1, getHashBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeBytes(2, getRevisionBytes());
+ }
+ unknownFields.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, getHashBytes());
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, getRevisionBytes());
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData 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.WsBatch.WsProjectResponse.FileData parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.sonarqube.ws.WsBatch.WsProjectResponse.FileData prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(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.batch.WsProjectResponse.FileData}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:sonarqube.ws.batch.WsProjectResponse.FileData)
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.class, org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.Builder.class);
+ }
+
+ // Construct using org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ hash_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ revision_ = "";
+ bitField0_ = (bitField0_ & ~0x00000002);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.FileData getDefaultInstanceForType() {
+ return org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.getDefaultInstance();
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.FileData build() {
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileData result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.FileData buildPartial() {
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileData result = new org.sonarqube.ws.WsBatch.WsProjectResponse.FileData(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.hash_ = hash_;
+ if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.revision_ = revision_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.sonarqube.ws.WsBatch.WsProjectResponse.FileData) {
+ return mergeFrom((org.sonarqube.ws.WsBatch.WsProjectResponse.FileData)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.sonarqube.ws.WsBatch.WsProjectResponse.FileData other) {
+ if (other == org.sonarqube.ws.WsBatch.WsProjectResponse.FileData.getDefaultInstance()) return this;
+ if (other.hasHash()) {
+ bitField0_ |= 0x00000001;
+ hash_ = other.hash_;
+ onChanged();
+ }
+ if (other.hasRevision()) {
+ bitField0_ |= 0x00000002;
+ revision_ = other.revision_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ 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.WsBatch.WsProjectResponse.FileData parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.sonarqube.ws.WsBatch.WsProjectResponse.FileData) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object hash_ = "";
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public boolean hasHash() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public java.lang.String getHash() {
+ java.lang.Object ref = hash_;
+ 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()) {
+ hash_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public com.google.protobuf.ByteString
+ getHashBytes() {
+ java.lang.Object ref = hash_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ hash_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public Builder setHash(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ hash_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public Builder clearHash() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ hash_ = getDefaultInstance().getHash();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string hash = 1;</code>
+ */
+ public Builder setHashBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ hash_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object revision_ = "";
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public boolean hasRevision() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public java.lang.String getRevision() {
+ java.lang.Object ref = revision_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ revision_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public com.google.protobuf.ByteString
+ getRevisionBytes() {
+ java.lang.Object ref = revision_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ revision_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public Builder setRevision(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ revision_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public Builder clearRevision() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ revision_ = getDefaultInstance().getRevision();
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional string revision = 2;</code>
+ */
+ public Builder setRevisionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000002;
+ revision_ = value;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:sonarqube.ws.batch.WsProjectResponse.FileData)
+ }
+
+ // @@protoc_insertion_point(class_scope:sonarqube.ws.batch.WsProjectResponse.FileData)
+ private static final org.sonarqube.ws.WsBatch.WsProjectResponse.FileData DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.sonarqube.ws.WsBatch.WsProjectResponse.FileData();
+ }
+
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse.FileData getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<FileData> PARSER =
+ new com.google.protobuf.AbstractParser<FileData>() {
+ public FileData parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new FileData(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<FileData> getParserForType() {
+ return PARSER;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse.FileData getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private int bitField0_;
+ public static final int TIMESTAMP_FIELD_NUMBER = 1;
+ private long timestamp_;
+ /**
+ * <code>optional int64 timestamp = 1;</code>
+ */
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional int64 timestamp = 1;</code>
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ public static final int SETTINGSBYMODULE_FIELD_NUMBER = 2;
+ private static final class SettingsByModuleDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> defaultEntry =
+ com.google.protobuf.MapEntry
+ .<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>newDefaultInstance(
+ org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_SettingsByModuleEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.MESSAGE,
+ org.sonarqube.ws.WsBatch.WsProjectResponse.Settings.getDefaultInstance());
+ }
+ private com.google.protobuf.MapField<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> settingsByModule_;
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>
+ internalGetSettingsByModule() {
+ if (settingsByModule_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ SettingsByModuleDefaultEntryHolder.defaultEntry);
+ }
+ return settingsByModule_;
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.Settings> settingsByModule = 2;</code>
+ */
+
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> getSettingsByModule() {
+ return internalGetSettingsByModule().getMap();
+ }
+
+ public static final int FILEDATABYMODULEANDPATCH_FIELD_NUMBER = 3;
+ private static final class FileDataByModuleAndPatchDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> defaultEntry =
+ com.google.protobuf.MapEntry
+ .<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>newDefaultInstance(
+ org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByModuleAndPatchEntry_descriptor,
+ com.google.protobuf.WireFormat.FieldType.STRING,
+ "",
+ com.google.protobuf.WireFormat.FieldType.MESSAGE,
+ org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath.getDefaultInstance());
+ }
+ private com.google.protobuf.MapField<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch_;
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>
+ internalGetFileDataByModuleAndPatch() {
+ if (fileDataByModuleAndPatch_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry);
+ }
+ return fileDataByModuleAndPatch_;
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch = 3;</code>
+ */
+
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> getFileDataByModuleAndPatch() {
+ return internalGetFileDataByModuleAndPatch().getMap();
+ }
+
+ public static final int LASTANALYSISDATE_FIELD_NUMBER = 4;
+ private long lastAnalysisDate_;
+ /**
+ * <code>optional int64 lastAnalysisDate = 4;</code>
+ */
+ public boolean hasLastAnalysisDate() {
+ return ((bitField0_ & 0x00000002) == 0x00000002);
+ }
+ /**
+ * <code>optional int64 lastAnalysisDate = 4;</code>
+ */
+ public long getLastAnalysisDate() {
+ return lastAnalysisDate_;
+ }
+
+ 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 {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ output.writeInt64(1, timestamp_);
+ }
+ for (java.util.Map.Entry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> entry
+ : internalGetSettingsByModule().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>
+ settingsByModule = SettingsByModuleDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ output.writeMessage(2, settingsByModule);
+ }
+ for (java.util.Map.Entry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> entry
+ : internalGetFileDataByModuleAndPatch().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>
+ fileDataByModuleAndPatch = FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ output.writeMessage(3, fileDataByModuleAndPatch);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ output.writeInt64(4, lastAnalysisDate_);
+ }
+ unknownFields.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
+ .computeInt64Size(1, timestamp_);
+ }
+ for (java.util.Map.Entry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> entry
+ : internalGetSettingsByModule().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>
+ settingsByModule = SettingsByModuleDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, settingsByModule);
+ }
+ for (java.util.Map.Entry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> entry
+ : internalGetFileDataByModuleAndPatch().getMap().entrySet()) {
+ com.google.protobuf.MapEntry<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>
+ fileDataByModuleAndPatch = FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry.newBuilderForType()
+ .setKey(entry.getKey())
+ .setValue(entry.getValue())
+ .build();
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(3, fileDataByModuleAndPatch);
+ }
+ if (((bitField0_ & 0x00000002) == 0x00000002)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(4, lastAnalysisDate_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSerializedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse 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.WsBatch.WsProjectResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseDelimitedFrom(input, extensionRegistry);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input);
+ }
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return PARSER.parseFrom(input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(org.sonarqube.ws.WsBatch.WsProjectResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(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.batch.WsProjectResponse}
+ *
+ * <pre>
+ * WS api/batch/project
+ * </pre>
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:sonarqube.ws.batch.WsProjectResponse)
+ org.sonarqube.ws.WsBatch.WsProjectResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor;
+ }
+
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMapField(
+ int number) {
+ switch (number) {
+ case 2:
+ return internalGetSettingsByModule();
+ case 3:
+ return internalGetFileDataByModuleAndPatch();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ @SuppressWarnings({"rawtypes"})
+ protected com.google.protobuf.MapField internalGetMutableMapField(
+ int number) {
+ switch (number) {
+ case 2:
+ return internalGetMutableSettingsByModule();
+ case 3:
+ return internalGetMutableFileDataByModuleAndPatch();
+ default:
+ throw new RuntimeException(
+ "Invalid map field number: " + number);
+ }
+ }
+ protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ org.sonarqube.ws.WsBatch.WsProjectResponse.class, org.sonarqube.ws.WsBatch.WsProjectResponse.Builder.class);
+ }
+
+ // Construct using org.sonarqube.ws.WsBatch.WsProjectResponse.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ timestamp_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ internalGetMutableSettingsByModule().clear();
+ internalGetMutableFileDataByModuleAndPatch().clear();
+ lastAnalysisDate_ = 0L;
+ bitField0_ = (bitField0_ & ~0x00000008);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return org.sonarqube.ws.WsBatch.internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse getDefaultInstanceForType() {
+ return org.sonarqube.ws.WsBatch.WsProjectResponse.getDefaultInstance();
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse build() {
+ org.sonarqube.ws.WsBatch.WsProjectResponse result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse buildPartial() {
+ org.sonarqube.ws.WsBatch.WsProjectResponse result = new org.sonarqube.ws.WsBatch.WsProjectResponse(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.timestamp_ = timestamp_;
+ result.settingsByModule_ = internalGetSettingsByModule();
+ result.settingsByModule_.makeImmutable();
+ result.fileDataByModuleAndPatch_ = internalGetFileDataByModuleAndPatch();
+ result.fileDataByModuleAndPatch_.makeImmutable();
+ if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+ to_bitField0_ |= 0x00000002;
+ }
+ result.lastAnalysisDate_ = lastAnalysisDate_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof org.sonarqube.ws.WsBatch.WsProjectResponse) {
+ return mergeFrom((org.sonarqube.ws.WsBatch.WsProjectResponse)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(org.sonarqube.ws.WsBatch.WsProjectResponse other) {
+ if (other == org.sonarqube.ws.WsBatch.WsProjectResponse.getDefaultInstance()) return this;
+ if (other.hasTimestamp()) {
+ setTimestamp(other.getTimestamp());
+ }
+ internalGetMutableSettingsByModule().mergeFrom(
+ other.internalGetSettingsByModule());
+ internalGetMutableFileDataByModuleAndPatch().mergeFrom(
+ other.internalGetFileDataByModuleAndPatch());
+ if (other.hasLastAnalysisDate()) {
+ setLastAnalysisDate(other.getLastAnalysisDate());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ 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.WsBatch.WsProjectResponse parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (org.sonarqube.ws.WsBatch.WsProjectResponse) e.getUnfinishedMessage();
+ throw e;
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private long timestamp_ ;
+ /**
+ * <code>optional int64 timestamp = 1;</code>
+ */
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * <code>optional int64 timestamp = 1;</code>
+ */
+ public long getTimestamp() {
+ return timestamp_;
+ }
+ /**
+ * <code>optional int64 timestamp = 1;</code>
+ */
+ public Builder setTimestamp(long value) {
+ bitField0_ |= 0x00000001;
+ timestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional int64 timestamp = 1;</code>
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> settingsByModule_;
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>
+ internalGetSettingsByModule() {
+ if (settingsByModule_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ SettingsByModuleDefaultEntryHolder.defaultEntry);
+ }
+ return settingsByModule_;
+ }
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>
+ internalGetMutableSettingsByModule() {
+ onChanged();;
+ if (settingsByModule_ == null) {
+ settingsByModule_ = com.google.protobuf.MapField.newMapField(
+ SettingsByModuleDefaultEntryHolder.defaultEntry);
+ }
+ if (!settingsByModule_.isMutable()) {
+ settingsByModule_ = settingsByModule_.copy();
+ }
+ return settingsByModule_;
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.Settings> settingsByModule = 2;</code>
+ */
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings> getSettingsByModule() {
+ return internalGetSettingsByModule().getMap();
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.Settings> settingsByModule = 2;</code>
+ */
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.Settings>
+ getMutableSettingsByModule() {
+ return internalGetMutableSettingsByModule().getMutableMap();
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch_;
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>
+ internalGetFileDataByModuleAndPatch() {
+ if (fileDataByModuleAndPatch_ == null) {
+ return com.google.protobuf.MapField.emptyMapField(
+ FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry);
+ }
+ return fileDataByModuleAndPatch_;
+ }
+ private com.google.protobuf.MapField<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>
+ internalGetMutableFileDataByModuleAndPatch() {
+ onChanged();;
+ if (fileDataByModuleAndPatch_ == null) {
+ fileDataByModuleAndPatch_ = com.google.protobuf.MapField.newMapField(
+ FileDataByModuleAndPatchDefaultEntryHolder.defaultEntry);
+ }
+ if (!fileDataByModuleAndPatch_.isMutable()) {
+ fileDataByModuleAndPatch_ = fileDataByModuleAndPatch_.copy();
+ }
+ return fileDataByModuleAndPatch_;
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch = 3;</code>
+ */
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath> getFileDataByModuleAndPatch() {
+ return internalGetFileDataByModuleAndPatch().getMap();
+ }
+ /**
+ * <code>map<string, .sonarqube.ws.batch.WsProjectResponse.FileDataByPath> fileDataByModuleAndPatch = 3;</code>
+ */
+ public java.util.Map<java.lang.String, org.sonarqube.ws.WsBatch.WsProjectResponse.FileDataByPath>
+ getMutableFileDataByModuleAndPatch() {
+ return internalGetMutableFileDataByModuleAndPatch().getMutableMap();
+ }
+
+ private long lastAnalysisDate_ ;
+ /**
+ * <code>optional int64 lastAnalysisDate = 4;</code>
+ */
+ public boolean hasLastAnalysisDate() {
+ return ((bitField0_ & 0x00000008) == 0x00000008);
+ }
+ /**
+ * <code>optional int64 lastAnalysisDate = 4;</code>
+ */
+ public long getLastAnalysisDate() {
+ return lastAnalysisDate_;
+ }
+ /**
+ * <code>optional int64 lastAnalysisDate = 4;</code>
+ */
+ public Builder setLastAnalysisDate(long value) {
+ bitField0_ |= 0x00000008;
+ lastAnalysisDate_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>optional int64 lastAnalysisDate = 4;</code>
+ */
+ public Builder clearLastAnalysisDate() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ lastAnalysisDate_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ // @@protoc_insertion_point(builder_scope:sonarqube.ws.batch.WsProjectResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:sonarqube.ws.batch.WsProjectResponse)
+ private static final org.sonarqube.ws.WsBatch.WsProjectResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.sonarqube.ws.WsBatch.WsProjectResponse();
+ }
+
+ public static org.sonarqube.ws.WsBatch.WsProjectResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<WsProjectResponse> PARSER =
+ new com.google.protobuf.AbstractParser<WsProjectResponse>() {
+ public WsProjectResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new WsProjectResponse(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<WsProjectResponse> getParserForType() {
+ return PARSER;
+ }
+
+ public org.sonarqube.ws.WsBatch.WsProjectResponse getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_sonarqube_ws_batch_WsProjectResponse_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_sonarqube_ws_batch_WsProjectResponse_SettingsByModuleEntry_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_sonarqube_ws_batch_WsProjectResponse_SettingsByModuleEntry_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByModuleAndPatchEntry_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByModuleAndPatchEntry_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_SettingsEntry_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_SettingsEntry_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_FileDataByPathEntry_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_FileDataByPathEntry_fieldAccessorTable;
+ private static com.google.protobuf.Descriptors.Descriptor
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor;
+ private static
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_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-batch.proto\022\022sonarqube.ws.batch\"\364\006\n" +
+ "\021WsProjectResponse\022\021\n\ttimestamp\030\001 \001(\003\022U\n" +
+ "\020settingsByModule\030\002 \003(\0132;.sonarqube.ws.b" +
+ "atch.WsProjectResponse.SettingsByModuleE" +
+ "ntry\022e\n\030fileDataByModuleAndPatch\030\003 \003(\0132C" +
+ ".sonarqube.ws.batch.WsProjectResponse.Fi" +
+ "leDataByModuleAndPatchEntry\022\030\n\020lastAnaly" +
+ "sisDate\030\004 \001(\003\032g\n\025SettingsByModuleEntry\022\013" +
+ "\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..sonarqube.w" +
+ "s.batch.WsProjectResponse.Settings:\0028\001\032u",
+ "\n\035FileDataByModuleAndPatchEntry\022\013\n\003key\030\001" +
+ " \001(\t\022C\n\005value\030\002 \001(\01324.sonarqube.ws.batch" +
+ ".WsProjectResponse.FileDataByPath:\0028\001\032\213\001" +
+ "\n\010Settings\022N\n\010settings\030\001 \003(\0132<.sonarqube" +
+ ".ws.batch.WsProjectResponse.Settings.Set" +
+ "tingsEntry\032/\n\rSettingsEntry\022\013\n\003key\030\001 \001(\t" +
+ "\022\r\n\005value\030\002 \001(\t:\0028\001\032\331\001\n\016FileDataByPath\022`" +
+ "\n\016FileDataByPath\030\001 \003(\0132H.sonarqube.ws.ba" +
+ "tch.WsProjectResponse.FileDataByPath.Fil" +
+ "eDataByPathEntry\032e\n\023FileDataByPathEntry\022",
+ "\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..sonarqube." +
+ "ws.batch.WsProjectResponse.FileData:\0028\001\032" +
+ "*\n\010FileData\022\014\n\004hash\030\001 \001(\t\022\020\n\010revision\030\002 " +
+ "\001(\tB\035\n\020org.sonarqube.wsB\007WsBatchH\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_batch_WsProjectResponse_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_sonarqube_ws_batch_WsProjectResponse_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor,
+ new java.lang.String[] { "Timestamp", "SettingsByModule", "FileDataByModuleAndPatch", "LastAnalysisDate", });
+ internal_static_sonarqube_ws_batch_WsProjectResponse_SettingsByModuleEntry_descriptor =
+ internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor.getNestedTypes().get(0);
+ internal_static_sonarqube_ws_batch_WsProjectResponse_SettingsByModuleEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_sonarqube_ws_batch_WsProjectResponse_SettingsByModuleEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByModuleAndPatchEntry_descriptor =
+ internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor.getNestedTypes().get(1);
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByModuleAndPatchEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByModuleAndPatchEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor =
+ internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor.getNestedTypes().get(2);
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor,
+ new java.lang.String[] { "Settings", });
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_SettingsEntry_descriptor =
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_descriptor.getNestedTypes().get(0);
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_SettingsEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_sonarqube_ws_batch_WsProjectResponse_Settings_SettingsEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor =
+ internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor.getNestedTypes().get(3);
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor,
+ new java.lang.String[] { "FileDataByPath", });
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_FileDataByPathEntry_descriptor =
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_descriptor.getNestedTypes().get(0);
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_FileDataByPathEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileDataByPath_FileDataByPathEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor =
+ internal_static_sonarqube_ws_batch_WsProjectResponse_descriptor.getNestedTypes().get(4);
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+ internal_static_sonarqube_ws_batch_WsProjectResponse_FileData_descriptor,
+ new java.lang.String[] { "Hash", "Revision", });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}