diff options
author | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-08-04 15:29:06 +0200 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-08-06 09:05:46 +0200 |
commit | b4e4af137329f4c90e6365e233cdcba3a5322697 (patch) | |
tree | b6a87f57f5acb37e51ecb8bdc7d7eb2cae8be23f /sonar-ws | |
parent | 4d119d3c92675105c46ead03ca6eeadb540b7987 (diff) | |
download | sonarqube-b4e4af137329f4c90e6365e233cdcba3a5322697.tar.gz sonarqube-b4e4af137329f4c90e6365e233cdcba3a5322697.zip |
SONAR-6479 WS permissions/users search users with a specific permission
Diffstat (limited to 'sonar-ws')
-rw-r--r-- | sonar-ws/src/main/gen-java/org/sonarqube/ws/Permissions.java | 1655 | ||||
-rw-r--r-- | sonar-ws/src/main/protobuf/ws-permissions.proto | 40 |
2 files changed, 1695 insertions, 0 deletions
diff --git a/sonar-ws/src/main/gen-java/org/sonarqube/ws/Permissions.java b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Permissions.java new file mode 100644 index 00000000000..afdadda5619 --- /dev/null +++ b/sonar-ws/src/main/gen-java/org/sonarqube/ws/Permissions.java @@ -0,0 +1,1655 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ws-permissions.proto + +package org.sonarqube.ws; + +public final class Permissions { + private Permissions() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface UsersResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.permissions.UsersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + java.util.List<org.sonarqube.ws.Permissions.UsersResponse.User> + getUsersList(); + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + org.sonarqube.ws.Permissions.UsersResponse.User getUsers(int index); + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + int getUsersCount(); + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + java.util.List<? extends org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder> + getUsersOrBuilderList(); + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder getUsersOrBuilder( + int index); + + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + boolean hasPaging(); + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + org.sonarqube.ws.Common.Paging getPaging(); + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder(); + } + /** + * Protobuf type {@code sonarqube.ws.permissions.UsersResponse} + * + * <pre> + * WS api/permissions/users for internal use only + * </pre> + */ + public static final class UsersResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.UsersResponse) + UsersResponseOrBuilder { + // Use UsersResponse.newBuilder() to construct. + private UsersResponse(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private UsersResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final UsersResponse defaultInstance; + public static UsersResponse getDefaultInstance() { + return defaultInstance; + } + + public UsersResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UsersResponse( + 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)) { + users_ = new java.util.ArrayList<org.sonarqube.ws.Permissions.UsersResponse.User>(); + mutable_bitField0_ |= 0x00000001; + } + users_.add(input.readMessage(org.sonarqube.ws.Permissions.UsersResponse.User.PARSER, extensionRegistry)); + break; + } + case 18: { + org.sonarqube.ws.Common.Paging.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = paging_.toBuilder(); + } + paging_ = input.readMessage(org.sonarqube.ws.Common.Paging.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(paging_); + paging_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + 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)) { + users_ = java.util.Collections.unmodifiableList(users_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Permissions.UsersResponse.class, org.sonarqube.ws.Permissions.UsersResponse.Builder.class); + } + + public static com.google.protobuf.Parser<UsersResponse> PARSER = + new com.google.protobuf.AbstractParser<UsersResponse>() { + public UsersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UsersResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<UsersResponse> getParserForType() { + return PARSER; + } + + public interface UserOrBuilder extends + // @@protoc_insertion_point(interface_extends:sonarqube.ws.permissions.UsersResponse.User) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>optional string login = 1;</code> + */ + boolean hasLogin(); + /** + * <code>optional string login = 1;</code> + */ + java.lang.String getLogin(); + /** + * <code>optional string login = 1;</code> + */ + com.google.protobuf.ByteString + getLoginBytes(); + + /** + * <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 bool selected = 4;</code> + */ + boolean hasSelected(); + /** + * <code>optional bool selected = 4;</code> + */ + boolean getSelected(); + } + /** + * Protobuf type {@code sonarqube.ws.permissions.UsersResponse.User} + */ + public static final class User extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:sonarqube.ws.permissions.UsersResponse.User) + UserOrBuilder { + // Use User.newBuilder() to construct. + private User(com.google.protobuf.GeneratedMessage.Builder<?> builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private User(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final User defaultInstance; + public static User getDefaultInstance() { + return defaultInstance; + } + + public User getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private User( + 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; + login_ = bs; + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + bitField0_ |= 0x00000002; + name_ = bs; + break; + } + case 32: { + bitField0_ |= 0x00000004; + selected_ = input.readBool(); + 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.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_User_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Permissions.UsersResponse.User.class, org.sonarqube.ws.Permissions.UsersResponse.User.Builder.class); + } + + public static com.google.protobuf.Parser<User> PARSER = + new com.google.protobuf.AbstractParser<User>() { + public User parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new User(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser<User> getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int LOGIN_FIELD_NUMBER = 1; + private java.lang.Object login_; + /** + * <code>optional string login = 1;</code> + */ + public boolean hasLogin() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional string login = 1;</code> + */ + public java.lang.String getLogin() { + java.lang.Object ref = login_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + login_ = s; + } + return s; + } + } + /** + * <code>optional string login = 1;</code> + */ + public com.google.protobuf.ByteString + getLoginBytes() { + java.lang.Object ref = login_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + login_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final 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 SELECTED_FIELD_NUMBER = 4; + private boolean selected_; + /** + * <code>optional bool selected = 4;</code> + */ + public boolean hasSelected() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * <code>optional bool selected = 4;</code> + */ + public boolean getSelected() { + return selected_; + } + + private void initFields() { + login_ = ""; + name_ = ""; + selected_ = false; + } + 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, getLoginBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(4, selected_); + } + 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, getLoginBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getNameBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, selected_); + } + 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.Permissions.UsersResponse.User parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Permissions.UsersResponse.User 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.Permissions.UsersResponse.User parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Permissions.UsersResponse.User parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Permissions.UsersResponse.User parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Permissions.UsersResponse.User parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Permissions.UsersResponse.User parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonarqube.ws.Permissions.UsersResponse.User parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Permissions.UsersResponse.User parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Permissions.UsersResponse.User 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.Permissions.UsersResponse.User 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.permissions.UsersResponse.User} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:sonarqube.ws.permissions.UsersResponse.User) + org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_User_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_User_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Permissions.UsersResponse.User.class, org.sonarqube.ws.Permissions.UsersResponse.User.Builder.class); + } + + // Construct using org.sonarqube.ws.Permissions.UsersResponse.User.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(); + login_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + name_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + selected_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_User_descriptor; + } + + public org.sonarqube.ws.Permissions.UsersResponse.User getDefaultInstanceForType() { + return org.sonarqube.ws.Permissions.UsersResponse.User.getDefaultInstance(); + } + + public org.sonarqube.ws.Permissions.UsersResponse.User build() { + org.sonarqube.ws.Permissions.UsersResponse.User result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonarqube.ws.Permissions.UsersResponse.User buildPartial() { + org.sonarqube.ws.Permissions.UsersResponse.User result = new org.sonarqube.ws.Permissions.UsersResponse.User(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.login_ = login_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.name_ = name_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.selected_ = selected_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.Permissions.UsersResponse.User) { + return mergeFrom((org.sonarqube.ws.Permissions.UsersResponse.User)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonarqube.ws.Permissions.UsersResponse.User other) { + if (other == org.sonarqube.ws.Permissions.UsersResponse.User.getDefaultInstance()) return this; + if (other.hasLogin()) { + bitField0_ |= 0x00000001; + login_ = other.login_; + onChanged(); + } + if (other.hasName()) { + bitField0_ |= 0x00000002; + name_ = other.name_; + onChanged(); + } + if (other.hasSelected()) { + setSelected(other.getSelected()); + } + 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.Permissions.UsersResponse.User parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.Permissions.UsersResponse.User) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.lang.Object login_ = ""; + /** + * <code>optional string login = 1;</code> + */ + public boolean hasLogin() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional string login = 1;</code> + */ + public java.lang.String getLogin() { + java.lang.Object ref = login_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + login_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>optional string login = 1;</code> + */ + public com.google.protobuf.ByteString + getLoginBytes() { + java.lang.Object ref = login_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + login_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>optional string login = 1;</code> + */ + public Builder setLogin( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + login_ = value; + onChanged(); + return this; + } + /** + * <code>optional string login = 1;</code> + */ + public Builder clearLogin() { + bitField0_ = (bitField0_ & ~0x00000001); + login_ = getDefaultInstance().getLogin(); + onChanged(); + return this; + } + /** + * <code>optional string login = 1;</code> + */ + public Builder setLoginBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + login_ = 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 boolean selected_ ; + /** + * <code>optional bool selected = 4;</code> + */ + public boolean hasSelected() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * <code>optional bool selected = 4;</code> + */ + public boolean getSelected() { + return selected_; + } + /** + * <code>optional bool selected = 4;</code> + */ + public Builder setSelected(boolean value) { + bitField0_ |= 0x00000004; + selected_ = value; + onChanged(); + return this; + } + /** + * <code>optional bool selected = 4;</code> + */ + public Builder clearSelected() { + bitField0_ = (bitField0_ & ~0x00000004); + selected_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.UsersResponse.User) + } + + static { + defaultInstance = new User(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.UsersResponse.User) + } + + private int bitField0_; + public static final int USERS_FIELD_NUMBER = 1; + private java.util.List<org.sonarqube.ws.Permissions.UsersResponse.User> users_; + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public java.util.List<org.sonarqube.ws.Permissions.UsersResponse.User> getUsersList() { + return users_; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public java.util.List<? extends org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder> + getUsersOrBuilderList() { + return users_; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public int getUsersCount() { + return users_.size(); + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public org.sonarqube.ws.Permissions.UsersResponse.User getUsers(int index) { + return users_.get(index); + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder getUsersOrBuilder( + int index) { + return users_.get(index); + } + + public static final int PAGING_FIELD_NUMBER = 2; + private org.sonarqube.ws.Common.Paging paging_; + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public boolean hasPaging() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public org.sonarqube.ws.Common.Paging getPaging() { + return paging_; + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { + return paging_; + } + + private void initFields() { + users_ = java.util.Collections.emptyList(); + paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + } + 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 < users_.size(); i++) { + output.writeMessage(1, users_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(2, paging_); + } + 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 < users_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, users_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, paging_); + } + 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.Permissions.UsersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Permissions.UsersResponse 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.Permissions.UsersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.sonarqube.ws.Permissions.UsersResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.sonarqube.ws.Permissions.UsersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Permissions.UsersResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Permissions.UsersResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.sonarqube.ws.Permissions.UsersResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.sonarqube.ws.Permissions.UsersResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.sonarqube.ws.Permissions.UsersResponse 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.Permissions.UsersResponse 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.permissions.UsersResponse} + * + * <pre> + * WS api/permissions/users 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.permissions.UsersResponse) + org.sonarqube.ws.Permissions.UsersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.sonarqube.ws.Permissions.UsersResponse.class, org.sonarqube.ws.Permissions.UsersResponse.Builder.class); + } + + // Construct using org.sonarqube.ws.Permissions.UsersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getUsersFieldBuilder(); + getPagingFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + usersBuilder_.clear(); + } + if (pagingBuilder_ == null) { + paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + } else { + pagingBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.sonarqube.ws.Permissions.internal_static_sonarqube_ws_permissions_UsersResponse_descriptor; + } + + public org.sonarqube.ws.Permissions.UsersResponse getDefaultInstanceForType() { + return org.sonarqube.ws.Permissions.UsersResponse.getDefaultInstance(); + } + + public org.sonarqube.ws.Permissions.UsersResponse build() { + org.sonarqube.ws.Permissions.UsersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.sonarqube.ws.Permissions.UsersResponse buildPartial() { + org.sonarqube.ws.Permissions.UsersResponse result = new org.sonarqube.ws.Permissions.UsersResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (usersBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + users_ = java.util.Collections.unmodifiableList(users_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.users_ = users_; + } else { + result.users_ = usersBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + if (pagingBuilder_ == null) { + result.paging_ = paging_; + } else { + result.paging_ = pagingBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.sonarqube.ws.Permissions.UsersResponse) { + return mergeFrom((org.sonarqube.ws.Permissions.UsersResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.sonarqube.ws.Permissions.UsersResponse other) { + if (other == org.sonarqube.ws.Permissions.UsersResponse.getDefaultInstance()) return this; + if (usersBuilder_ == null) { + if (!other.users_.isEmpty()) { + if (users_.isEmpty()) { + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureUsersIsMutable(); + users_.addAll(other.users_); + } + onChanged(); + } + } else { + if (!other.users_.isEmpty()) { + if (usersBuilder_.isEmpty()) { + usersBuilder_.dispose(); + usersBuilder_ = null; + users_ = other.users_; + bitField0_ = (bitField0_ & ~0x00000001); + usersBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getUsersFieldBuilder() : null; + } else { + usersBuilder_.addAllMessages(other.users_); + } + } + } + if (other.hasPaging()) { + mergePaging(other.getPaging()); + } + 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.Permissions.UsersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.sonarqube.ws.Permissions.UsersResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List<org.sonarqube.ws.Permissions.UsersResponse.User> users_ = + java.util.Collections.emptyList(); + private void ensureUsersIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + users_ = new java.util.ArrayList<org.sonarqube.ws.Permissions.UsersResponse.User>(users_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Permissions.UsersResponse.User, org.sonarqube.ws.Permissions.UsersResponse.User.Builder, org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder> usersBuilder_; + + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public java.util.List<org.sonarqube.ws.Permissions.UsersResponse.User> getUsersList() { + if (usersBuilder_ == null) { + return java.util.Collections.unmodifiableList(users_); + } else { + return usersBuilder_.getMessageList(); + } + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public int getUsersCount() { + if (usersBuilder_ == null) { + return users_.size(); + } else { + return usersBuilder_.getCount(); + } + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public org.sonarqube.ws.Permissions.UsersResponse.User getUsers(int index) { + if (usersBuilder_ == null) { + return users_.get(index); + } else { + return usersBuilder_.getMessage(index); + } + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder setUsers( + int index, org.sonarqube.ws.Permissions.UsersResponse.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.set(index, value); + onChanged(); + } else { + usersBuilder_.setMessage(index, value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder setUsers( + int index, org.sonarqube.ws.Permissions.UsersResponse.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.set(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder addUsers(org.sonarqube.ws.Permissions.UsersResponse.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(value); + onChanged(); + } else { + usersBuilder_.addMessage(value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder addUsers( + int index, org.sonarqube.ws.Permissions.UsersResponse.User value) { + if (usersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUsersIsMutable(); + users_.add(index, value); + onChanged(); + } else { + usersBuilder_.addMessage(index, value); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder addUsers( + org.sonarqube.ws.Permissions.UsersResponse.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder addUsers( + int index, org.sonarqube.ws.Permissions.UsersResponse.User.Builder builderForValue) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.add(index, builderForValue.build()); + onChanged(); + } else { + usersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder addAllUsers( + java.lang.Iterable<? extends org.sonarqube.ws.Permissions.UsersResponse.User> values) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, users_); + onChanged(); + } else { + usersBuilder_.addAllMessages(values); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder clearUsers() { + if (usersBuilder_ == null) { + users_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + usersBuilder_.clear(); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public Builder removeUsers(int index) { + if (usersBuilder_ == null) { + ensureUsersIsMutable(); + users_.remove(index); + onChanged(); + } else { + usersBuilder_.remove(index); + } + return this; + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public org.sonarqube.ws.Permissions.UsersResponse.User.Builder getUsersBuilder( + int index) { + return getUsersFieldBuilder().getBuilder(index); + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder getUsersOrBuilder( + int index) { + if (usersBuilder_ == null) { + return users_.get(index); } else { + return usersBuilder_.getMessageOrBuilder(index); + } + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public java.util.List<? extends org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder> + getUsersOrBuilderList() { + if (usersBuilder_ != null) { + return usersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(users_); + } + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public org.sonarqube.ws.Permissions.UsersResponse.User.Builder addUsersBuilder() { + return getUsersFieldBuilder().addBuilder( + org.sonarqube.ws.Permissions.UsersResponse.User.getDefaultInstance()); + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public org.sonarqube.ws.Permissions.UsersResponse.User.Builder addUsersBuilder( + int index) { + return getUsersFieldBuilder().addBuilder( + index, org.sonarqube.ws.Permissions.UsersResponse.User.getDefaultInstance()); + } + /** + * <code>repeated .sonarqube.ws.permissions.UsersResponse.User users = 1;</code> + */ + public java.util.List<org.sonarqube.ws.Permissions.UsersResponse.User.Builder> + getUsersBuilderList() { + return getUsersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Permissions.UsersResponse.User, org.sonarqube.ws.Permissions.UsersResponse.User.Builder, org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder> + getUsersFieldBuilder() { + if (usersBuilder_ == null) { + usersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.sonarqube.ws.Permissions.UsersResponse.User, org.sonarqube.ws.Permissions.UsersResponse.User.Builder, org.sonarqube.ws.Permissions.UsersResponse.UserOrBuilder>( + users_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + users_ = null; + } + return usersBuilder_; + } + + private org.sonarqube.ws.Common.Paging paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder> pagingBuilder_; + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public boolean hasPaging() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public org.sonarqube.ws.Common.Paging getPaging() { + if (pagingBuilder_ == null) { + return paging_; + } else { + return pagingBuilder_.getMessage(); + } + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public Builder setPaging(org.sonarqube.ws.Common.Paging value) { + if (pagingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + paging_ = value; + onChanged(); + } else { + pagingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public Builder setPaging( + org.sonarqube.ws.Common.Paging.Builder builderForValue) { + if (pagingBuilder_ == null) { + paging_ = builderForValue.build(); + onChanged(); + } else { + pagingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public Builder mergePaging(org.sonarqube.ws.Common.Paging value) { + if (pagingBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + paging_ != org.sonarqube.ws.Common.Paging.getDefaultInstance()) { + paging_ = + org.sonarqube.ws.Common.Paging.newBuilder(paging_).mergeFrom(value).buildPartial(); + } else { + paging_ = value; + } + onChanged(); + } else { + pagingBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + return this; + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public Builder clearPaging() { + if (pagingBuilder_ == null) { + paging_ = org.sonarqube.ws.Common.Paging.getDefaultInstance(); + onChanged(); + } else { + pagingBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public org.sonarqube.ws.Common.Paging.Builder getPagingBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getPagingFieldBuilder().getBuilder(); + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + public org.sonarqube.ws.Common.PagingOrBuilder getPagingOrBuilder() { + if (pagingBuilder_ != null) { + return pagingBuilder_.getMessageOrBuilder(); + } else { + return paging_; + } + } + /** + * <code>optional .sonarqube.ws.commons.Paging paging = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilder< + org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder> + getPagingFieldBuilder() { + if (pagingBuilder_ == null) { + pagingBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.sonarqube.ws.Common.Paging, org.sonarqube.ws.Common.Paging.Builder, org.sonarqube.ws.Common.PagingOrBuilder>( + getPaging(), + getParentForChildren(), + isClean()); + paging_ = null; + } + return pagingBuilder_; + } + + // @@protoc_insertion_point(builder_scope:sonarqube.ws.permissions.UsersResponse) + } + + static { + defaultInstance = new UsersResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:sonarqube.ws.permissions.UsersResponse) + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_sonarqube_ws_permissions_UsersResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_sonarqube_ws_permissions_UsersResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_sonarqube_ws_permissions_UsersResponse_User_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_sonarqube_ws_permissions_UsersResponse_User_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\024ws-permissions.proto\022\030sonarqube.ws.per" + + "missions\032\020ws-commons.proto\"\261\001\n\rUsersResp" + + "onse\022;\n\005users\030\001 \003(\0132,.sonarqube.ws.permi" + + "ssions.UsersResponse.User\022,\n\006paging\030\002 \001(" + + "\0132\034.sonarqube.ws.commons.Paging\0325\n\004User\022" + + "\r\n\005login\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\022\020\n\010selected" + + "\030\004 \001(\010B!\n\020org.sonarqube.wsB\013PermissionsH" + + "\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[] { + org.sonarqube.ws.Common.getDescriptor(), + }, assigner); + internal_static_sonarqube_ws_permissions_UsersResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_sonarqube_ws_permissions_UsersResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_sonarqube_ws_permissions_UsersResponse_descriptor, + new java.lang.String[] { "Users", "Paging", }); + internal_static_sonarqube_ws_permissions_UsersResponse_User_descriptor = + internal_static_sonarqube_ws_permissions_UsersResponse_descriptor.getNestedTypes().get(0); + internal_static_sonarqube_ws_permissions_UsersResponse_User_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_sonarqube_ws_permissions_UsersResponse_User_descriptor, + new java.lang.String[] { "Login", "Name", "Selected", }); + org.sonarqube.ws.Common.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/sonar-ws/src/main/protobuf/ws-permissions.proto b/sonar-ws/src/main/protobuf/ws-permissions.proto new file mode 100644 index 00000000000..f68c26c792f --- /dev/null +++ b/sonar-ws/src/main/protobuf/ws-permissions.proto @@ -0,0 +1,40 @@ +// 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.permissions; + +import "ws-commons.proto"; + +option java_package = "org.sonarqube.ws"; +option java_outer_classname = "Permissions"; +option optimize_for = SPEED; + +// WS api/permissions/users for internal use only +message UsersResponse { + + message User { + optional string login = 1; + optional string name = 2; + optional bool selected = 4; + } + + repeated User users = 1; + optional sonarqube.ws.commons.Paging paging = 2; +} |