diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-07-29 08:34:35 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-08-05 19:32:09 +0200 |
commit | b0652b91c5696ae696e8b05176978d3d567e5364 (patch) | |
tree | c13e8a70e9f619d43f5e98cb8878d5c7ee7afdb7 /server | |
parent | 105176fb19c3ab8a82eec620abd99b32b1387139 (diff) | |
download | sonarqube-b0652b91c5696ae696e8b05176978d3d567e5364.tar.gz sonarqube-b0652b91c5696ae696e8b05176978d3d567e5364.zip |
New WS api/rules/list for batch
Diffstat (limited to 'server')
3 files changed, 1576 insertions, 4 deletions
diff --git a/server/sonar-server/src/main/gen-java/org/sonarqube/ws/Rules.java b/server/sonar-server/src/main/gen-java/org/sonarqube/ws/Rules.java new file mode 100644 index 00000000000..346793fee19 --- /dev/null +++ b/server/sonar-server/src/main/gen-java/org/sonarqube/ws/Rules.java @@ -0,0 +1,1537 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ws-rules.proto + +package org.sonarqube.ws; + +public final class Rules { + private Rules() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface ListResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.rules.ListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + java.util.List<org.sonarqube.ws.Rules.ListResponse.Rule> + getRulesList(); + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + org.sonarqube.ws.Rules.ListResponse.Rule getRules(int index); + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + int getRulesCount(); + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + java.util.List<? extends org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder> + getRulesOrBuilderList(); + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder getRulesOrBuilder( + int index); + } + /** + * Protobuf type {@code sonarqube.ws.rules.ListResponse} + * + * <pre> + * WS api/rules/list for internal use only + * </pre> + */ + public static final class ListResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:sonarqube.ws.rules.ListResponse) + ListResponseOrBuilder { + // Use ListResponse.newBuilder() to construct. + private ListResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ListResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ListResponse defaultInstance; + public static ListResponse getDefaultInstance() { + return defaultInstance; + } + + public ListResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList<org.sonarqube.ws.Rules.ListResponse.Rule>(); + mutable_bitField0_ |= 0x00000001; + } + rules_.add(input.readMessage(org.sonarqube.ws.Rules.ListResponse.Rule.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Rules.ListResponse.class, org.sonarqube.ws.Rules.ListResponse.Builder.class); + } + + public static com.google.protobuf.Parser<ListResponse> PARSER = + new com.google.protobuf.AbstractParser<ListResponse>() { + public ListResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<ListResponse> getParserForType() { + return PARSER; + } + + public interface RuleOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.rules.ListResponse.Rule) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>optional string repository = 1;</code> + */ + boolean hasRepository(); + /** + * <code>optional string repository = 1;</code> + */ + java.lang.String getRepository(); + /** + * <code>optional string repository = 1;</code> + */ + com.google.protobuf.ByteString + getRepositoryBytes(); + + /** + * <code>optional string key = 2;</code> + */ + boolean hasKey(); + /** + * <code>optional string key = 2;</code> + */ + java.lang.String getKey(); + /** + * <code>optional string key = 2;</code> + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * <code>optional string internal_key = 3;</code> + */ + boolean hasInternalKey(); + /** + * <code>optional string internal_key = 3;</code> + */ + java.lang.String getInternalKey(); + /** + * <code>optional string internal_key = 3;</code> + */ + com.google.protobuf.ByteString + getInternalKeyBytes(); + } + /** + * Protobuf type {@code sonarqube.ws.rules.ListResponse.Rule} + */ + public static final class Rule extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:sonarqube.ws.rules.ListResponse.Rule) + RuleOrBuilder { + // Use Rule.newBuilder() to construct. + private Rule(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Rule(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Rule defaultInstance; + public static Rule getDefaultInstance() { + return defaultInstance; + } + + public Rule getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Rule( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000001; + repository_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + key_ = bs; + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000004; + internalKey_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Rules.ListResponse.Rule.class, org.sonarqube.ws.Rules.ListResponse.Rule.Builder.class); + } + + public static com.google.protobuf.Parser<Rule> PARSER = + new com.google.protobuf.AbstractParser<Rule>() { + public Rule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Rule(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<Rule> getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int REPOSITORY_FIELD_NUMBER = 1; + private java.lang.Object repository_; + /** + * <code>optional string repository = 1;</code> + */ + public boolean hasRepository() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional string repository = 1;</code> + */ + public java.lang.String getRepository() { + java.lang.Object ref = repository_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + repository_ = s; + } + return s; + } + } + /** + * <code>optional string repository = 1;</code> + */ + public com.google.protobuf.ByteString + getRepositoryBytes() { + java.lang.Object ref = repository_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + repository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KEY_FIELD_NUMBER = 2; + private java.lang.Object key_; + /** + * <code>optional string key = 2;</code> + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional string key = 2;</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 = 2;</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 INTERNAL_KEY_FIELD_NUMBER = 3; + private java.lang.Object internalKey_; + /** + * <code>optional string internal_key = 3;</code> + */ + public boolean hasInternalKey() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * <code>optional string internal_key = 3;</code> + */ + public java.lang.String getInternalKey() { + java.lang.Object ref = internalKey_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + internalKey_ = s; + } + return s; + } + } + /** + * <code>optional string internal_key = 3;</code> + */ + public com.google.protobuf.ByteString + getInternalKeyBytes() { + java.lang.Object ref = internalKey_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + internalKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + repository_ = ""; + key_ = ""; + internalKey_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getRepositoryBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getKeyBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(3, getInternalKeyBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getRepositoryBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getKeyBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getInternalKeyBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Rules.ListResponse.Rule parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonarqube.ws.Rules.ListResponse.Rule prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code sonarqube.ws.rules.ListResponse.Rule} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:sonarqube.ws.rules.ListResponse.Rule) + org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Rules.ListResponse.Rule.class, org.sonarqube.ws.Rules.ListResponse.Rule.Builder.class); + } + + // Construct using org.sonarqube.ws.Rules.ListResponse.Rule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + repository_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + internalKey_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; + } + + public org.sonarqube.ws.Rules.ListResponse.Rule getDefaultInstanceForType() { + return org.sonarqube.ws.Rules.ListResponse.Rule.getDefaultInstance(); + } + + public org.sonarqube.ws.Rules.ListResponse.Rule build() { + org.sonarqube.ws.Rules.ListResponse.Rule result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonarqube.ws.Rules.ListResponse.Rule buildPartial() { + org.sonarqube.ws.Rules.ListResponse.Rule result = new org.sonarqube.ws.Rules.ListResponse.Rule(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.repository_ = repository_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.internalKey_ = internalKey_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.Rules.ListResponse.Rule) { + return mergeFrom((org.sonarqube.ws.Rules.ListResponse.Rule)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonarqube.ws.Rules.ListResponse.Rule other) { + if (other == org.sonarqube.ws.Rules.ListResponse.Rule.getDefaultInstance()) return this; + if (other.hasRepository()) { + bitField0_ |= 0x00000001; + repository_ = other.repository_; + onChanged(); + } + if (other.hasKey()) { + bitField0_ |= 0x00000002; + key_ = other.key_; + onChanged(); + } + if (other.hasInternalKey()) { + bitField0_ |= 0x00000004; + internalKey_ = other.internalKey_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonarqube.ws.Rules.ListResponse.Rule parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.Rules.ListResponse.Rule) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object repository_ = ""; + /** + * <code>optional string repository = 1;</code> + */ + public boolean hasRepository() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional string repository = 1;</code> + */ + public java.lang.String getRepository() { + java.lang.Object ref = repository_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + repository_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string repository = 1;</code> + */ + public com.google.protobuf.ByteString + getRepositoryBytes() { + java.lang.Object ref = repository_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + repository_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string repository = 1;</code> + */ + public Builder setRepository( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + repository_ = value; + onChanged(); + return this; + } + /** + * <code>optional string repository = 1;</code> + */ + public Builder clearRepository() { + bitField0_ = (bitField0_ & ~0x00000001); + repository_ = getDefaultInstance().getRepository(); + onChanged(); + return this; + } + /** + * <code>optional string repository = 1;</code> + */ + public Builder setRepositoryBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + repository_ = value; + onChanged(); + return this; + } + + private java.lang.Object key_ = ""; + /** + * <code>optional string key = 2;</code> + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional string key = 2;</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 = 2;</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 = 2;</code> + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + key_ = value; + onChanged(); + return this; + } + /** + * <code>optional string key = 2;</code> + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000002); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * <code>optional string key = 2;</code> + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + key_ = value; + onChanged(); + return this; + } + + private java.lang.Object internalKey_ = ""; + /** + * <code>optional string internal_key = 3;</code> + */ + public boolean hasInternalKey() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * <code>optional string internal_key = 3;</code> + */ + public java.lang.String getInternalKey() { + java.lang.Object ref = internalKey_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + internalKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string internal_key = 3;</code> + */ + public com.google.protobuf.ByteString + getInternalKeyBytes() { + java.lang.Object ref = internalKey_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + internalKey_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string internal_key = 3;</code> + */ + public Builder setInternalKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + internalKey_ = value; + onChanged(); + return this; + } + /** + * <code>optional string internal_key = 3;</code> + */ + public Builder clearInternalKey() { + bitField0_ = (bitField0_ & ~0x00000004); + internalKey_ = getDefaultInstance().getInternalKey(); + onChanged(); + return this; + } + /** + * <code>optional string internal_key = 3;</code> + */ + public Builder setInternalKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + internalKey_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:sonarqube.ws.rules.ListResponse.Rule) + } + + static { + defaultInstance = new Rule(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.ListResponse.Rule) + } + + public static final int RULES_FIELD_NUMBER = 1; + private java.util.List<org.sonarqube.ws.Rules.ListResponse.Rule> rules_; + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public java.util.List<org.sonarqube.ws.Rules.ListResponse.Rule> getRulesList() { + return rules_; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public java.util.List<? extends org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder> + getRulesOrBuilderList() { + return rules_; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public int getRulesCount() { + return rules_.size(); + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public org.sonarqube.ws.Rules.ListResponse.Rule getRules(int index) { + return rules_.get(index); + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder getRulesOrBuilder( + int index) { + return rules_.get(index); + } + + private void initFields() { + rules_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < rules_.size(); i++) { + output.writeMessage(1, rules_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rules_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, rules_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + public static org.sonarqube.ws.Rules.ListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Rules.ListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Rules.ListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Rules.ListResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Rules.ListResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Rules.ListResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Rules.ListResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonarqube.ws.Rules.ListResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Rules.ListResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Rules.ListResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.sonarqube.ws.Rules.ListResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code sonarqube.ws.rules.ListResponse} + * + * <pre> + * WS api/rules/list for internal use only + * </pre> + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:sonarqube.ws.rules.ListResponse) + org.sonarqube.ws.Rules.ListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Rules.ListResponse.class, org.sonarqube.ws.Rules.ListResponse.Builder.class); + } + + // Construct using org.sonarqube.ws.Rules.ListResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getRulesFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rulesBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.Rules.internal_static_sonarqube_ws_rules_ListResponse_descriptor; + } + + public org.sonarqube.ws.Rules.ListResponse getDefaultInstanceForType() { + return org.sonarqube.ws.Rules.ListResponse.getDefaultInstance(); + } + + public org.sonarqube.ws.Rules.ListResponse build() { + org.sonarqube.ws.Rules.ListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonarqube.ws.Rules.ListResponse buildPartial() { + org.sonarqube.ws.Rules.ListResponse result = new org.sonarqube.ws.Rules.ListResponse(this); + int from_bitField0_ = bitField0_; + if (rulesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = java.util.Collections.unmodifiableList(rules_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rules_ = rules_; + } else { + result.rules_ = rulesBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.Rules.ListResponse) { + return mergeFrom((org.sonarqube.ws.Rules.ListResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonarqube.ws.Rules.ListResponse other) { + if (other == org.sonarqube.ws.Rules.ListResponse.getDefaultInstance()) return this; + if (rulesBuilder_ == null) { + if (!other.rules_.isEmpty()) { + if (rules_.isEmpty()) { + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRulesIsMutable(); + rules_.addAll(other.rules_); + } + onChanged(); + } + } else { + if (!other.rules_.isEmpty()) { + if (rulesBuilder_.isEmpty()) { + rulesBuilder_.dispose(); + rulesBuilder_ = null; + rules_ = other.rules_; + bitField0_ = (bitField0_ & ~0x00000001); + rulesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRulesFieldBuilder() : null; + } else { + rulesBuilder_.addAllMessages(other.rules_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.sonarqube.ws.Rules.ListResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.Rules.ListResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List<org.sonarqube.ws.Rules.ListResponse.Rule> rules_ = + java.util.Collections.emptyList(); + private void ensureRulesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + rules_ = new java.util.ArrayList<org.sonarqube.ws.Rules.ListResponse.Rule>(rules_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Rules.ListResponse.Rule, org.sonarqube.ws.Rules.ListResponse.Rule.Builder, org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder> rulesBuilder_; + + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public java.util.List<org.sonarqube.ws.Rules.ListResponse.Rule> getRulesList() { + if (rulesBuilder_ == null) { + return java.util.Collections.unmodifiableList(rules_); + } else { + return rulesBuilder_.getMessageList(); + } + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public int getRulesCount() { + if (rulesBuilder_ == null) { + return rules_.size(); + } else { + return rulesBuilder_.getCount(); + } + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public org.sonarqube.ws.Rules.ListResponse.Rule getRules(int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); + } else { + return rulesBuilder_.getMessage(index); + } + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder setRules( + int index, org.sonarqube.ws.Rules.ListResponse.Rule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.set(index, value); + onChanged(); + } else { + rulesBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder setRules( + int index, org.sonarqube.ws.Rules.ListResponse.Rule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.set(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder addRules(org.sonarqube.ws.Rules.ListResponse.Rule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(value); + onChanged(); + } else { + rulesBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder addRules( + int index, org.sonarqube.ws.Rules.ListResponse.Rule value) { + if (rulesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRulesIsMutable(); + rules_.add(index, value); + onChanged(); + } else { + rulesBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder addRules( + org.sonarqube.ws.Rules.ListResponse.Rule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder addRules( + int index, org.sonarqube.ws.Rules.ListResponse.Rule.Builder builderForValue) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(index, builderForValue.build()); + onChanged(); + } else { + rulesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder addAllRules( + java.lang.Iterable<? extends org.sonarqube.ws.Rules.ListResponse.Rule> values) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rules_); + onChanged(); + } else { + rulesBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder clearRules() { + if (rulesBuilder_ == null) { + rules_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rulesBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public Builder removeRules(int index) { + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.remove(index); + onChanged(); + } else { + rulesBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public org.sonarqube.ws.Rules.ListResponse.Rule.Builder getRulesBuilder( + int index) { + return getRulesFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder getRulesOrBuilder( + int index) { + if (rulesBuilder_ == null) { + return rules_.get(index); } else { + return rulesBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public java.util.List<? extends org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder> + getRulesOrBuilderList() { + if (rulesBuilder_ != null) { + return rulesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rules_); + } + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public org.sonarqube.ws.Rules.ListResponse.Rule.Builder addRulesBuilder() { + return getRulesFieldBuilder().addBuilder( + org.sonarqube.ws.Rules.ListResponse.Rule.getDefaultInstance()); + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public org.sonarqube.ws.Rules.ListResponse.Rule.Builder addRulesBuilder( + int index) { + return getRulesFieldBuilder().addBuilder( + index, org.sonarqube.ws.Rules.ListResponse.Rule.getDefaultInstance()); + } + /** + * <code>repeated .sonarqube.ws.rules.ListResponse.Rule rules = 1;</code> + */ + public java.util.List<org.sonarqube.ws.Rules.ListResponse.Rule.Builder> + getRulesBuilderList() { + return getRulesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Rules.ListResponse.Rule, org.sonarqube.ws.Rules.ListResponse.Rule.Builder, org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder> + getRulesFieldBuilder() { + if (rulesBuilder_ == null) { + rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Rules.ListResponse.Rule, org.sonarqube.ws.Rules.ListResponse.Rule.Builder, org.sonarqube.ws.Rules.ListResponse.RuleOrBuilder>( + rules_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + rules_ = null; + } + return rulesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:sonarqube.ws.rules.ListResponse) + } + + static { + defaultInstance = new ListResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.rules.ListResponse) + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_sonarqube_ws_rules_ListResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_sonarqube_ws_rules_ListResponse_Rule_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\016ws-rules.proto\022\022sonarqube.ws.rules\"\203\001\n" + + "\014ListResponse\0224\n\005rules\030\001 \003(\0132%.sonarqube" + + ".ws.rules.ListResponse.Rule\032=\n\004Rule\022\022\n\nr" + + "epository\030\001 \001(\t\022\013\n\003key\030\002 \001(\t\022\024\n\014internal" + + "_key\030\003 \001(\tB\033\n\020org.sonarqube.wsB\005RulesH\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_sonarqube_ws_rules_ListResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_sonarqube_ws_rules_ListResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_sonarqube_ws_rules_ListResponse_descriptor, + new java.lang.String[] { "Rules", }); + internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor = + internal_static_sonarqube_ws_rules_ListResponse_descriptor.getNestedTypes().get(0); + internal_static_sonarqube_ws_rules_ListResponse_Rule_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_sonarqube_ws_rules_ListResponse_Rule_descriptor, + new java.lang.String[] { "Repository", "Key", "InternalKey", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/ListAction.java b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/ListAction.java index 8a4d5d0ce4c..52be58caef3 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/rule/ws/ListAction.java +++ b/server/sonar-server/src/main/java/org/sonar/server/rule/ws/ListAction.java @@ -63,10 +63,6 @@ public class ListAction implements RulesWsAction { .clear() .setRepository(dto.getRepositoryKey()) .setKey(dto.getRuleKey()); - String name = dto.getName(); - if (!Strings.isNullOrEmpty(name)) { - ruleBuilder.setName(name); - } String internalKey = dto.getConfigKey(); if (!Strings.isNullOrEmpty(internalKey)) { ruleBuilder.setInternalKey(internalKey); diff --git a/server/sonar-server/src/main/protobuf/ws-rules.proto b/server/sonar-server/src/main/protobuf/ws-rules.proto new file mode 100644 index 00000000000..43a04956ebb --- /dev/null +++ b/server/sonar-server/src/main/protobuf/ws-rules.proto @@ -0,0 +1,39 @@ +// SonarQube, open source software quality management tool. +// Copyright (C) 2008-2015 SonarSource +// mailto:contact AT sonarsource DOT com +// +// SonarQube is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 3 of the License, or (at your option) any later version. +// +// SonarQube is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program; if not, write to the Free Software Foundation, +// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +syntax = "proto2"; + +package sonarqube.ws.rules; + +option java_package = "org.sonarqube.ws"; +option java_outer_classname = "Rules"; +option optimize_for = SPEED; + +// WS api/rules/list for internal use only +message ListResponse { + + message Rule { + optional string repository = 1; + optional string key = 2; + optional string internal_key = 3; + optional string name = 4; + } + + repeated Rule rules = 1; + +} |