diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-09-08 17:48:53 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-09-17 09:30:51 +0200 |
commit | aaf2651b94c2f15b3c47e482fe519a6b56e31256 (patch) | |
tree | da32dad5520c94f981b802d40f3ae8e990421bad /sonar-ws | |
parent | bac72033230c2ea0d1a99434376ae04ca05cf00e (diff) | |
download | sonarqube-aaf2651b94c2f15b3c47e482fe519a6b56e31256.tar.gz sonarqube-aaf2651b94c2f15b3c47e482fe519a6b56e31256.zip |
SONAR-6821 WS qualityprofiles/search use protocol buffers to build response
Diffstat (limited to 'sonar-ws')
-rw-r--r-- | sonar-ws/src/main/gen-java/org/sonarqube/ws/QualityProfiles.java | 2483 | ||||
-rw-r--r-- | sonar-ws/src/main/protobuf/ws-qualityprofiles.proto | 46 |
2 files changed, 2529 insertions, 0 deletions
diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/QualityProfiles.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/QualityProfiles.java new file mode 100644 index 00000000000..c606ae3cbaa --- /dev/null +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/QualityProfiles.java @@ -0,0 +1,2483 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ws-qualityprofiles.proto + +package org.sonarqube.ws; + +public final class QualityProfiles { + private QualityProfiles() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface WsSearchResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.rules.WsSearchResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + java.util.List<org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile> + getProfilesList(); + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile getProfiles(int index); + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + int getProfilesCount(); + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + java.util.List<? extends org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder> + getProfilesOrBuilderList(); + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder getProfilesOrBuilder( + int index); + } + /** + * Protobuf type {@code sonarqube.ws.rules.WsSearchResponse} + * + * <pre> + * WS api/qualityprofiles/search + * </pre> + */ + public static final class WsSearchResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:sonarqube.ws.rules.WsSearchResponse) + WsSearchResponseOrBuilder { + // Use WsSearchResponse.newBuilder() to construct. + private WsSearchResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private WsSearchResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final WsSearchResponse defaultInstance; + public static WsSearchResponse getDefaultInstance() { + return defaultInstance; + } + + public WsSearchResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private WsSearchResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + profiles_ = new java.util.ArrayList<org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile>(); + mutable_bitField0_ |= 0x00000001; + } + profiles_.add(input.readMessage(org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + profiles_ = java.util.Collections.unmodifiableList(profiles_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.QualityProfiles.WsSearchResponse.class, org.sonarqube.ws.QualityProfiles.WsSearchResponse.Builder.class); + } + + public static com.google.protobuf.Parser<WsSearchResponse> PARSER = + new com.google.protobuf.AbstractParser<WsSearchResponse>() { + public WsSearchResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new WsSearchResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<WsSearchResponse> getParserForType() { + return PARSER; + } + + public interface QualityProfileOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.rules.WsSearchResponse.QualityProfile) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>optional string key = 1;</code> + */ + boolean hasKey(); + /** + * <code>optional string key = 1;</code> + */ + java.lang.String getKey(); + /** + * <code>optional string key = 1;</code> + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * <code>optional string name = 2;</code> + */ + boolean hasName(); + /** + * <code>optional string name = 2;</code> + */ + java.lang.String getName(); + /** + * <code>optional string name = 2;</code> + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * <code>optional string language = 3;</code> + */ + boolean hasLanguage(); + /** + * <code>optional string language = 3;</code> + */ + java.lang.String getLanguage(); + /** + * <code>optional string language = 3;</code> + */ + com.google.protobuf.ByteString + getLanguageBytes(); + + /** + * <code>optional string languageName = 4;</code> + */ + boolean hasLanguageName(); + /** + * <code>optional string languageName = 4;</code> + */ + java.lang.String getLanguageName(); + /** + * <code>optional string languageName = 4;</code> + */ + com.google.protobuf.ByteString + getLanguageNameBytes(); + + /** + * <code>optional bool isInherited = 5;</code> + */ + boolean hasIsInherited(); + /** + * <code>optional bool isInherited = 5;</code> + */ + boolean getIsInherited(); + + /** + * <code>optional string parentKey = 6;</code> + */ + boolean hasParentKey(); + /** + * <code>optional string parentKey = 6;</code> + */ + java.lang.String getParentKey(); + /** + * <code>optional string parentKey = 6;</code> + */ + com.google.protobuf.ByteString + getParentKeyBytes(); + + /** + * <code>optional string parentName = 7;</code> + */ + boolean hasParentName(); + /** + * <code>optional string parentName = 7;</code> + */ + java.lang.String getParentName(); + /** + * <code>optional string parentName = 7;</code> + */ + com.google.protobuf.ByteString + getParentNameBytes(); + + /** + * <code>optional bool isDefault = 8;</code> + */ + boolean hasIsDefault(); + /** + * <code>optional bool isDefault = 8;</code> + */ + boolean getIsDefault(); + + /** + * <code>optional int64 activeRuleCount = 9;</code> + */ + boolean hasActiveRuleCount(); + /** + * <code>optional int64 activeRuleCount = 9;</code> + */ + long getActiveRuleCount(); + + /** + * <code>optional int64 projectCount = 10;</code> + */ + boolean hasProjectCount(); + /** + * <code>optional int64 projectCount = 10;</code> + */ + long getProjectCount(); + + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + boolean hasRulesUpdatedAt(); + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + java.lang.String getRulesUpdatedAt(); + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + com.google.protobuf.ByteString + getRulesUpdatedAtBytes(); + } + /** + * Protobuf type {@code sonarqube.ws.rules.WsSearchResponse.QualityProfile} + */ + public static final class QualityProfile extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:sonarqube.ws.rules.WsSearchResponse.QualityProfile) + QualityProfileOrBuilder { + // Use QualityProfile.newBuilder() to construct. + private QualityProfile(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private QualityProfile(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final QualityProfile defaultInstance; + public static QualityProfile getDefaultInstance() { + return defaultInstance; + } + + public QualityProfile getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QualityProfile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + key_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + name_ = bs; + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + language_ = bs; + break; + } + case 34: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000008; + languageName_ = bs; + break; + } + case 40: { + bitField0_ |= 0x00000010; + isInherited_ = input.readBool(); + break; + } + case 50: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000020; + parentKey_ = bs; + break; + } + case 58: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000040; + parentName_ = bs; + break; + } + case 64: { + bitField0_ |= 0x00000080; + isDefault_ = input.readBool(); + break; + } + case 72: { + bitField0_ |= 0x00000100; + activeRuleCount_ = input.readInt64(); + break; + } + case 80: { + bitField0_ |= 0x00000200; + projectCount_ = input.readInt64(); + break; + } + case 90: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000400; + rulesUpdatedAt_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.class, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder.class); + } + + public static com.google.protobuf.Parser<QualityProfile> PARSER = + new com.google.protobuf.AbstractParser<QualityProfile>() { + public QualityProfile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QualityProfile(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<QualityProfile> getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + /** + * <code>optional string key = 1;</code> + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional string key = 1;</code> + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } + } + /** + * <code>optional string key = 1;</code> + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + private java.lang.Object name_; + /** + * <code>optional string name = 2;</code> + */ + public boolean hasName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional string name = 2;</code> + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * <code>optional string name = 2;</code> + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_FIELD_NUMBER = 3; + private java.lang.Object language_; + /** + * <code>optional string language = 3;</code> + */ + public boolean hasLanguage() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * <code>optional string language = 3;</code> + */ + public java.lang.String getLanguage() { + java.lang.Object ref = language_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + language_ = s; + } + return s; + } + } + /** + * <code>optional string language = 3;</code> + */ + public com.google.protobuf.ByteString + getLanguageBytes() { + java.lang.Object ref = language_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + language_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGENAME_FIELD_NUMBER = 4; + private java.lang.Object languageName_; + /** + * <code>optional string languageName = 4;</code> + */ + public boolean hasLanguageName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * <code>optional string languageName = 4;</code> + */ + public java.lang.String getLanguageName() { + java.lang.Object ref = languageName_; + 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()) { + languageName_ = s; + } + return s; + } + } + /** + * <code>optional string languageName = 4;</code> + */ + public com.google.protobuf.ByteString + getLanguageNameBytes() { + java.lang.Object ref = languageName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISINHERITED_FIELD_NUMBER = 5; + private boolean isInherited_; + /** + * <code>optional bool isInherited = 5;</code> + */ + public boolean hasIsInherited() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * <code>optional bool isInherited = 5;</code> + */ + public boolean getIsInherited() { + return isInherited_; + } + + public static final int PARENTKEY_FIELD_NUMBER = 6; + private java.lang.Object parentKey_; + /** + * <code>optional string parentKey = 6;</code> + */ + public boolean hasParentKey() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * <code>optional string parentKey = 6;</code> + */ + public java.lang.String getParentKey() { + java.lang.Object ref = parentKey_; + 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()) { + parentKey_ = s; + } + return s; + } + } + /** + * <code>optional string parentKey = 6;</code> + */ + public com.google.protobuf.ByteString + getParentKeyBytes() { + java.lang.Object ref = parentKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENTNAME_FIELD_NUMBER = 7; + private java.lang.Object parentName_; + /** + * <code>optional string parentName = 7;</code> + */ + public boolean hasParentName() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * <code>optional string parentName = 7;</code> + */ + public java.lang.String getParentName() { + java.lang.Object ref = parentName_; + 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()) { + parentName_ = s; + } + return s; + } + } + /** + * <code>optional string parentName = 7;</code> + */ + public com.google.protobuf.ByteString + getParentNameBytes() { + java.lang.Object ref = parentName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ISDEFAULT_FIELD_NUMBER = 8; + private boolean isDefault_; + /** + * <code>optional bool isDefault = 8;</code> + */ + public boolean hasIsDefault() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * <code>optional bool isDefault = 8;</code> + */ + public boolean getIsDefault() { + return isDefault_; + } + + public static final int ACTIVERULECOUNT_FIELD_NUMBER = 9; + private long activeRuleCount_; + /** + * <code>optional int64 activeRuleCount = 9;</code> + */ + public boolean hasActiveRuleCount() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * <code>optional int64 activeRuleCount = 9;</code> + */ + public long getActiveRuleCount() { + return activeRuleCount_; + } + + public static final int PROJECTCOUNT_FIELD_NUMBER = 10; + private long projectCount_; + /** + * <code>optional int64 projectCount = 10;</code> + */ + public boolean hasProjectCount() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * <code>optional int64 projectCount = 10;</code> + */ + public long getProjectCount() { + return projectCount_; + } + + public static final int RULESUPDATEDAT_FIELD_NUMBER = 11; + private java.lang.Object rulesUpdatedAt_; + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public boolean hasRulesUpdatedAt() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public java.lang.String getRulesUpdatedAt() { + java.lang.Object ref = rulesUpdatedAt_; + 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()) { + rulesUpdatedAt_ = s; + } + return s; + } + } + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public com.google.protobuf.ByteString + getRulesUpdatedAtBytes() { + java.lang.Object ref = rulesUpdatedAt_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rulesUpdatedAt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + key_ = ""; + name_ = ""; + language_ = ""; + languageName_ = ""; + isInherited_ = false; + parentKey_ = ""; + parentName_ = ""; + isDefault_ = false; + activeRuleCount_ = 0L; + projectCount_ = 0L; + rulesUpdatedAt_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getLanguageBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeBytes(4, getLanguageNameBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeBool(5, isInherited_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeBytes(6, getParentKeyBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeBytes(7, getParentNameBytes()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + output.writeBool(8, isDefault_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + output.writeInt64(9, activeRuleCount_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + output.writeInt64(10, projectCount_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + output.writeBytes(11, getRulesUpdatedAtBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getLanguageBytes()); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getLanguageNameBytes()); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, isInherited_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, getParentKeyBytes()); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(7, getParentNameBytes()); + } + if (((bitField0_ & 0x00000080) == 0x00000080)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, isDefault_); + } + if (((bitField0_ & 0x00000100) == 0x00000100)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(9, activeRuleCount_); + } + if (((bitField0_ & 0x00000200) == 0x00000200)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(10, projectCount_); + } + if (((bitField0_ & 0x00000400) == 0x00000400)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(11, getRulesUpdatedAtBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile 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.QualityProfiles.WsSearchResponse.QualityProfile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code sonarqube.ws.rules.WsSearchResponse.QualityProfile} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:sonarqube.ws.rules.WsSearchResponse.QualityProfile) + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.class, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder.class); + } + + // Construct using org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + language_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + languageName_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + isInherited_ = false; + bitField0_ = (bitField0_ & ~0x00000010); + parentKey_ = ""; + bitField0_ = (bitField0_ & ~0x00000020); + parentName_ = ""; + bitField0_ = (bitField0_ & ~0x00000040); + isDefault_ = false; + bitField0_ = (bitField0_ & ~0x00000080); + activeRuleCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000100); + projectCount_ = 0L; + bitField0_ = (bitField0_ & ~0x00000200); + rulesUpdatedAt_ = ""; + bitField0_ = (bitField0_ & ~0x00000400); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_descriptor; + } + + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile getDefaultInstanceForType() { + return org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.getDefaultInstance(); + } + + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile build() { + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile buildPartial() { + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile result = new org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.language_ = language_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.languageName_ = languageName_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } + result.isInherited_ = isInherited_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.parentKey_ = parentKey_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000040; + } + result.parentName_ = parentName_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000080; + } + result.isDefault_ = isDefault_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000100; + } + result.activeRuleCount_ = activeRuleCount_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000200; + } + result.projectCount_ = projectCount_; + if (((from_bitField0_ & 0x00000400) == 0x00000400)) { + to_bitField0_ |= 0x00000400; + } + result.rulesUpdatedAt_ = rulesUpdatedAt_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile) { + return mergeFrom((org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile other) { + if (other == org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasName()) { + bitField0_ |= 0x00000002; + name_ = other.name_; + onChanged(); + } + if (other.hasLanguage()) { + bitField0_ |= 0x00000004; + language_ = other.language_; + onChanged(); + } + if (other.hasLanguageName()) { + bitField0_ |= 0x00000008; + languageName_ = other.languageName_; + onChanged(); + } + if (other.hasIsInherited()) { + setIsInherited(other.getIsInherited()); + } + if (other.hasParentKey()) { + bitField0_ |= 0x00000020; + parentKey_ = other.parentKey_; + onChanged(); + } + if (other.hasParentName()) { + bitField0_ |= 0x00000040; + parentName_ = other.parentName_; + onChanged(); + } + if (other.hasIsDefault()) { + setIsDefault(other.getIsDefault()); + } + if (other.hasActiveRuleCount()) { + setActiveRuleCount(other.getActiveRuleCount()); + } + if (other.hasProjectCount()) { + setProjectCount(other.getProjectCount()); + } + if (other.hasRulesUpdatedAt()) { + bitField0_ |= 0x00000400; + rulesUpdatedAt_ = other.rulesUpdatedAt_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object key_ = ""; + /** + * <code>optional string key = 1;</code> + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional string key = 1;</code> + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string key = 1;</code> + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string key = 1;</code> + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + /** + * <code>optional string key = 1;</code> + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * <code>optional string key = 1;</code> + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * <code>optional string name = 2;</code> + */ + public boolean hasName() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional string name = 2;</code> + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string name = 2;</code> + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string name = 2;</code> + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + name_ = value; + onChanged(); + return this; + } + /** + * <code>optional string name = 2;</code> + */ + public Builder clearName() { + bitField0_ = (bitField0_ & ~0x00000002); + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * <code>optional string name = 2;</code> + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object language_ = ""; + /** + * <code>optional string language = 3;</code> + */ + public boolean hasLanguage() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * <code>optional string language = 3;</code> + */ + public java.lang.String getLanguage() { + java.lang.Object ref = language_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + language_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string language = 3;</code> + */ + public com.google.protobuf.ByteString + getLanguageBytes() { + java.lang.Object ref = language_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + language_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string language = 3;</code> + */ + public Builder setLanguage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + language_ = value; + onChanged(); + return this; + } + /** + * <code>optional string language = 3;</code> + */ + public Builder clearLanguage() { + bitField0_ = (bitField0_ & ~0x00000004); + language_ = getDefaultInstance().getLanguage(); + onChanged(); + return this; + } + /** + * <code>optional string language = 3;</code> + */ + public Builder setLanguageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + language_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageName_ = ""; + /** + * <code>optional string languageName = 4;</code> + */ + public boolean hasLanguageName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * <code>optional string languageName = 4;</code> + */ + public java.lang.String getLanguageName() { + java.lang.Object ref = languageName_; + 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()) { + languageName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string languageName = 4;</code> + */ + public com.google.protobuf.ByteString + getLanguageNameBytes() { + java.lang.Object ref = languageName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + languageName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string languageName = 4;</code> + */ + public Builder setLanguageName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + languageName_ = value; + onChanged(); + return this; + } + /** + * <code>optional string languageName = 4;</code> + */ + public Builder clearLanguageName() { + bitField0_ = (bitField0_ & ~0x00000008); + languageName_ = getDefaultInstance().getLanguageName(); + onChanged(); + return this; + } + /** + * <code>optional string languageName = 4;</code> + */ + public Builder setLanguageNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + languageName_ = value; + onChanged(); + return this; + } + + private boolean isInherited_ ; + /** + * <code>optional bool isInherited = 5;</code> + */ + public boolean hasIsInherited() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * <code>optional bool isInherited = 5;</code> + */ + public boolean getIsInherited() { + return isInherited_; + } + /** + * <code>optional bool isInherited = 5;</code> + */ + public Builder setIsInherited(boolean value) { + bitField0_ |= 0x00000010; + isInherited_ = value; + onChanged(); + return this; + } + /** + * <code>optional bool isInherited = 5;</code> + */ + public Builder clearIsInherited() { + bitField0_ = (bitField0_ & ~0x00000010); + isInherited_ = false; + onChanged(); + return this; + } + + private java.lang.Object parentKey_ = ""; + /** + * <code>optional string parentKey = 6;</code> + */ + public boolean hasParentKey() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * <code>optional string parentKey = 6;</code> + */ + public java.lang.String getParentKey() { + java.lang.Object ref = parentKey_; + 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()) { + parentKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string parentKey = 6;</code> + */ + public com.google.protobuf.ByteString + getParentKeyBytes() { + java.lang.Object ref = parentKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string parentKey = 6;</code> + */ + public Builder setParentKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + parentKey_ = value; + onChanged(); + return this; + } + /** + * <code>optional string parentKey = 6;</code> + */ + public Builder clearParentKey() { + bitField0_ = (bitField0_ & ~0x00000020); + parentKey_ = getDefaultInstance().getParentKey(); + onChanged(); + return this; + } + /** + * <code>optional string parentKey = 6;</code> + */ + public Builder setParentKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + parentKey_ = value; + onChanged(); + return this; + } + + private java.lang.Object parentName_ = ""; + /** + * <code>optional string parentName = 7;</code> + */ + public boolean hasParentName() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * <code>optional string parentName = 7;</code> + */ + public java.lang.String getParentName() { + java.lang.Object ref = parentName_; + 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()) { + parentName_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string parentName = 7;</code> + */ + public com.google.protobuf.ByteString + getParentNameBytes() { + java.lang.Object ref = parentName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + parentName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string parentName = 7;</code> + */ + public Builder setParentName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + parentName_ = value; + onChanged(); + return this; + } + /** + * <code>optional string parentName = 7;</code> + */ + public Builder clearParentName() { + bitField0_ = (bitField0_ & ~0x00000040); + parentName_ = getDefaultInstance().getParentName(); + onChanged(); + return this; + } + /** + * <code>optional string parentName = 7;</code> + */ + public Builder setParentNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000040; + parentName_ = value; + onChanged(); + return this; + } + + private boolean isDefault_ ; + /** + * <code>optional bool isDefault = 8;</code> + */ + public boolean hasIsDefault() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * <code>optional bool isDefault = 8;</code> + */ + public boolean getIsDefault() { + return isDefault_; + } + /** + * <code>optional bool isDefault = 8;</code> + */ + public Builder setIsDefault(boolean value) { + bitField0_ |= 0x00000080; + isDefault_ = value; + onChanged(); + return this; + } + /** + * <code>optional bool isDefault = 8;</code> + */ + public Builder clearIsDefault() { + bitField0_ = (bitField0_ & ~0x00000080); + isDefault_ = false; + onChanged(); + return this; + } + + private long activeRuleCount_ ; + /** + * <code>optional int64 activeRuleCount = 9;</code> + */ + public boolean hasActiveRuleCount() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * <code>optional int64 activeRuleCount = 9;</code> + */ + public long getActiveRuleCount() { + return activeRuleCount_; + } + /** + * <code>optional int64 activeRuleCount = 9;</code> + */ + public Builder setActiveRuleCount(long value) { + bitField0_ |= 0x00000100; + activeRuleCount_ = value; + onChanged(); + return this; + } + /** + * <code>optional int64 activeRuleCount = 9;</code> + */ + public Builder clearActiveRuleCount() { + bitField0_ = (bitField0_ & ~0x00000100); + activeRuleCount_ = 0L; + onChanged(); + return this; + } + + private long projectCount_ ; + /** + * <code>optional int64 projectCount = 10;</code> + */ + public boolean hasProjectCount() { + return ((bitField0_ & 0x00000200) == 0x00000200); + } + /** + * <code>optional int64 projectCount = 10;</code> + */ + public long getProjectCount() { + return projectCount_; + } + /** + * <code>optional int64 projectCount = 10;</code> + */ + public Builder setProjectCount(long value) { + bitField0_ |= 0x00000200; + projectCount_ = value; + onChanged(); + return this; + } + /** + * <code>optional int64 projectCount = 10;</code> + */ + public Builder clearProjectCount() { + bitField0_ = (bitField0_ & ~0x00000200); + projectCount_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object rulesUpdatedAt_ = ""; + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public boolean hasRulesUpdatedAt() { + return ((bitField0_ & 0x00000400) == 0x00000400); + } + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public java.lang.String getRulesUpdatedAt() { + java.lang.Object ref = rulesUpdatedAt_; + 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()) { + rulesUpdatedAt_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public com.google.protobuf.ByteString + getRulesUpdatedAtBytes() { + java.lang.Object ref = rulesUpdatedAt_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + rulesUpdatedAt_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public Builder setRulesUpdatedAt( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + rulesUpdatedAt_ = value; + onChanged(); + return this; + } + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public Builder clearRulesUpdatedAt() { + bitField0_ = (bitField0_ & ~0x00000400); + rulesUpdatedAt_ = getDefaultInstance().getRulesUpdatedAt(); + onChanged(); + return this; + } + /** + * <code>optional string rulesUpdatedAt = 11;</code> + */ + public Builder setRulesUpdatedAtBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + rulesUpdatedAt_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:sonarqube.ws.rules.WsSearchResponse.QualityProfile) + } + + static { + defaultInstance = new QualityProfile(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.WsSearchResponse.QualityProfile) + } + + public static final int PROFILES_FIELD_NUMBER = 1; + private java.util.List<org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile> profiles_; + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public java.util.List<org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile> getProfilesList() { + return profiles_; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public java.util.List<? extends org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder> + getProfilesOrBuilderList() { + return profiles_; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public int getProfilesCount() { + return profiles_.size(); + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile getProfiles(int index) { + return profiles_.get(index); + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder getProfilesOrBuilder( + int index) { + return profiles_.get(index); + } + + private void initFields() { + profiles_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < profiles_.size(); i++) { + output.writeMessage(1, profiles_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < profiles_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, profiles_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse 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.QualityProfiles.WsSearchResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.QualityProfiles.WsSearchResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonarqube.ws.QualityProfiles.WsSearchResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code sonarqube.ws.rules.WsSearchResponse} + * + * <pre> + * WS api/qualityprofiles/search + * </pre> + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:sonarqube.ws.rules.WsSearchResponse) + org.sonarqube.ws.QualityProfiles.WsSearchResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.QualityProfiles.WsSearchResponse.class, org.sonarqube.ws.QualityProfiles.WsSearchResponse.Builder.class); + } + + // Construct using org.sonarqube.ws.QualityProfiles.WsSearchResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getProfilesFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (profilesBuilder_ == null) { + profiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + profilesBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.QualityProfiles.internal_static_sonarqube_ws_rules_WsSearchResponse_descriptor; + } + + public org.sonarqube.ws.QualityProfiles.WsSearchResponse getDefaultInstanceForType() { + return org.sonarqube.ws.QualityProfiles.WsSearchResponse.getDefaultInstance(); + } + + public org.sonarqube.ws.QualityProfiles.WsSearchResponse build() { + org.sonarqube.ws.QualityProfiles.WsSearchResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonarqube.ws.QualityProfiles.WsSearchResponse buildPartial() { + org.sonarqube.ws.QualityProfiles.WsSearchResponse result = new org.sonarqube.ws.QualityProfiles.WsSearchResponse(this); + int from_bitField0_ = bitField0_; + if (profilesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + profiles_ = java.util.Collections.unmodifiableList(profiles_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.profiles_ = profiles_; + } else { + result.profiles_ = profilesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.QualityProfiles.WsSearchResponse) { + return mergeFrom((org.sonarqube.ws.QualityProfiles.WsSearchResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonarqube.ws.QualityProfiles.WsSearchResponse other) { + if (other == org.sonarqube.ws.QualityProfiles.WsSearchResponse.getDefaultInstance()) return this; + if (profilesBuilder_ == null) { + if (!other.profiles_.isEmpty()) { + if (profiles_.isEmpty()) { + profiles_ = other.profiles_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProfilesIsMutable(); + profiles_.addAll(other.profiles_); + } + onChanged(); + } + } else { + if (!other.profiles_.isEmpty()) { + if (profilesBuilder_.isEmpty()) { + profilesBuilder_.dispose(); + profilesBuilder_ = null; + profiles_ = other.profiles_; + bitField0_ = (bitField0_ & ~0x00000001); + profilesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getProfilesFieldBuilder() : null; + } else { + profilesBuilder_.addAllMessages(other.profiles_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonarqube.ws.QualityProfiles.WsSearchResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.QualityProfiles.WsSearchResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List<org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile> profiles_ = + java.util.Collections.emptyList(); + private void ensureProfilesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + profiles_ = new java.util.ArrayList<org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile>(profiles_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder> profilesBuilder_; + + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public java.util.List<org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile> getProfilesList() { + if (profilesBuilder_ == null) { + return java.util.Collections.unmodifiableList(profiles_); + } else { + return profilesBuilder_.getMessageList(); + } + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public int getProfilesCount() { + if (profilesBuilder_ == null) { + return profiles_.size(); + } else { + return profilesBuilder_.getCount(); + } + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile getProfiles(int index) { + if (profilesBuilder_ == null) { + return profiles_.get(index); + } else { + return profilesBuilder_.getMessage(index); + } + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder setProfiles( + int index, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile value) { + if (profilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfilesIsMutable(); + profiles_.set(index, value); + onChanged(); + } else { + profilesBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder setProfiles( + int index, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder builderForValue) { + if (profilesBuilder_ == null) { + ensureProfilesIsMutable(); + profiles_.set(index, builderForValue.build()); + onChanged(); + } else { + profilesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder addProfiles(org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile value) { + if (profilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfilesIsMutable(); + profiles_.add(value); + onChanged(); + } else { + profilesBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder addProfiles( + int index, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile value) { + if (profilesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProfilesIsMutable(); + profiles_.add(index, value); + onChanged(); + } else { + profilesBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder addProfiles( + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder builderForValue) { + if (profilesBuilder_ == null) { + ensureProfilesIsMutable(); + profiles_.add(builderForValue.build()); + onChanged(); + } else { + profilesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder addProfiles( + int index, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder builderForValue) { + if (profilesBuilder_ == null) { + ensureProfilesIsMutable(); + profiles_.add(index, builderForValue.build()); + onChanged(); + } else { + profilesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder addAllProfiles( + java.lang.Iterable<? extends org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile> values) { + if (profilesBuilder_ == null) { + ensureProfilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, profiles_); + onChanged(); + } else { + profilesBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder clearProfiles() { + if (profilesBuilder_ == null) { + profiles_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + profilesBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public Builder removeProfiles(int index) { + if (profilesBuilder_ == null) { + ensureProfilesIsMutable(); + profiles_.remove(index); + onChanged(); + } else { + profilesBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder getProfilesBuilder( + int index) { + return getProfilesFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder getProfilesOrBuilder( + int index) { + if (profilesBuilder_ == null) { + return profiles_.get(index); } else { + return profilesBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public java.util.List<? extends org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder> + getProfilesOrBuilderList() { + if (profilesBuilder_ != null) { + return profilesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(profiles_); + } + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder addProfilesBuilder() { + return getProfilesFieldBuilder().addBuilder( + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.getDefaultInstance()); + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder addProfilesBuilder( + int index) { + return getProfilesFieldBuilder().addBuilder( + index, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.getDefaultInstance()); + } + /** + * <code>repeated .sonarqube.ws.rules.WsSearchResponse.QualityProfile profiles = 1;</code> + */ + public java.util.List<org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder> + getProfilesBuilderList() { + return getProfilesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder> + getProfilesFieldBuilder() { + if (profilesBuilder_ == null) { + profilesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfile.Builder, org.sonarqube.ws.QualityProfiles.WsSearchResponse.QualityProfileOrBuilder>( + profiles_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + profiles_ = null; + } + return profilesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:sonarqube.ws.rules.WsSearchResponse) + } + + static { + defaultInstance = new WsSearchResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.WsSearchResponse) + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_sonarqube_ws_rules_WsSearchResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_sonarqube_ws_rules_WsSearchResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_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\030ws-qualityprofiles.proto\022\022sonarqube.ws" + + ".rules\"\305\002\n\020WsSearchResponse\022E\n\010profiles\030" + + "\001 \003(\01323.sonarqube.ws.rules.WsSearchRespo" + + "nse.QualityProfile\032\351\001\n\016QualityProfile\022\013\n" + + "\003key\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\020\n\010language\030\003 \001" + + "(\t\022\024\n\014languageName\030\004 \001(\t\022\023\n\013isInherited\030" + + "\005 \001(\010\022\021\n\tparentKey\030\006 \001(\t\022\022\n\nparentName\030\007" + + " \001(\t\022\021\n\tisDefault\030\010 \001(\010\022\027\n\017activeRuleCou" + + "nt\030\t \001(\003\022\024\n\014projectCount\030\n \001(\003\022\026\n\016rulesU" + + "pdatedAt\030\013 \001(\tB%\n\020org.sonarqube.wsB\017Qual", + "ityProfilesH\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_sonarqube_ws_rules_WsSearchResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_sonarqube_ws_rules_WsSearchResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_sonarqube_ws_rules_WsSearchResponse_descriptor, + new java.lang.String[] { "Profiles", }); + internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_descriptor = + internal_static_sonarqube_ws_rules_WsSearchResponse_descriptor.getNestedTypes().get(0); + internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_sonarqube_ws_rules_WsSearchResponse_QualityProfile_descriptor, + new java.lang.String[] { "Key", "Name", "Language", "LanguageName", "IsInherited", "ParentKey", "ParentName", "IsDefault", "ActiveRuleCount", "ProjectCount", "RulesUpdatedAt", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/sonar-ws/src/main/protobuf/ws-qualityprofiles.proto b/sonar-ws/src/main/protobuf/ws-qualityprofiles.proto new file mode 100644 index 00000000000..f3708259d24 --- /dev/null +++ b/sonar-ws/src/main/protobuf/ws-qualityprofiles.proto @@ -0,0 +1,46 @@ +// SonarQube, open source software quality management tool. +// Copyright (C) 2008-2015 SonarSource +// mailto:contact AT sonarsource DOT com +// +// SonarQube is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// SonarQube is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +syntax = "proto2"; + +package sonarqube.ws.rules; + +option java_package = "org.sonarqube.ws"; + +option java_outer_classname = "QualityProfiles"; + +option optimize_for = SPEED; + +// WS api/qualityprofiles/search +message WsSearchResponse { + repeated QualityProfile profiles = 1; + + message QualityProfile { + optional string key = 1; + optional string name = 2; + optional string language = 3; + optional string languageName = 4; + optional bool isInherited = 5; + optional string parentKey = 6; + optional string parentName = 7; + optional bool isDefault = 8; + optional int64 activeRuleCount = 9; + optional int64 projectCount = 10; + optional string rulesUpdatedAt = 11; + } +} |