All Downloads are FREE. Search and download functionalities are using the official Maven repository.

authpb.Auth Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: etcd/auth/authpb/auth.proto

package authpb;

public final class Auth {
  private Auth() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  public interface UserOrBuilder extends
      // @@protoc_insertion_point(interface_extends:authpb.User)
      com.google.protobuf.MessageOrBuilder {

    /**
     * bytes name = 1;
     */
    com.google.protobuf.ByteString getName();

    /**
     * bytes password = 2;
     */
    com.google.protobuf.ByteString getPassword();

    /**
     * repeated string roles = 3;
     */
    java.util.List
        getRolesList();
    /**
     * repeated string roles = 3;
     */
    int getRolesCount();
    /**
     * repeated string roles = 3;
     */
    java.lang.String getRoles(int index);
    /**
     * repeated string roles = 3;
     */
    com.google.protobuf.ByteString
        getRolesBytes(int index);
  }
  /**
   * 
   * User is a single entry in the bucket authUsers
   * 
* * Protobuf type {@code authpb.User} */ public static final class User extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authpb.User) UserOrBuilder { private static final long serialVersionUID = 0L; // Use User.newBuilder() to construct. private User(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private User() { name_ = com.google.protobuf.ByteString.EMPTY; password_ = com.google.protobuf.ByteString.EMPTY; roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @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 { this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { name_ = input.readBytes(); break; } case 18: { password_ = input.readBytes(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { roles_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } roles_.add(s); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { roles_ = roles_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return authpb.Auth.internal_static_authpb_User_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return authpb.Auth.internal_static_authpb_User_fieldAccessorTable .ensureFieldAccessorsInitialized( authpb.Auth.User.class, authpb.Auth.User.Builder.class); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private com.google.protobuf.ByteString name_; /** * bytes name = 1; */ public com.google.protobuf.ByteString getName() { return name_; } public static final int PASSWORD_FIELD_NUMBER = 2; private com.google.protobuf.ByteString password_; /** * bytes password = 2; */ public com.google.protobuf.ByteString getPassword() { return password_; } public static final int ROLES_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList roles_; /** * repeated string roles = 3; */ public com.google.protobuf.ProtocolStringList getRolesList() { return roles_; } /** * repeated string roles = 3; */ public int getRolesCount() { return roles_.size(); } /** * repeated string roles = 3; */ public java.lang.String getRoles(int index) { return roles_.get(index); } /** * repeated string roles = 3; */ public com.google.protobuf.ByteString getRolesBytes(int index) { return roles_.getByteString(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!name_.isEmpty()) { output.writeBytes(1, name_); } if (!password_.isEmpty()) { output.writeBytes(2, password_); } for (int i = 0; i < roles_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, roles_.getRaw(i)); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!name_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, name_); } if (!password_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, password_); } { int dataSize = 0; for (int i = 0; i < roles_.size(); i++) { dataSize += computeStringSizeNoTag(roles_.getRaw(i)); } size += dataSize; size += 1 * getRolesList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof authpb.Auth.User)) { return super.equals(obj); } authpb.Auth.User other = (authpb.Auth.User) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getPassword() .equals(other.getPassword()); result = result && getRolesList() .equals(other.getRolesList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + PASSWORD_FIELD_NUMBER; hash = (53 * hash) + getPassword().hashCode(); if (getRolesCount() > 0) { hash = (37 * hash) + ROLES_FIELD_NUMBER; hash = (53 * hash) + getRolesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static authpb.Auth.User parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.User parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.User parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.User parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.User parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.User parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.User parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static authpb.Auth.User parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static authpb.Auth.User parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static authpb.Auth.User parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static authpb.Auth.User parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static authpb.Auth.User parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(authpb.Auth.User prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * User is a single entry in the bucket authUsers
     * 
* * Protobuf type {@code authpb.User} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authpb.User) authpb.Auth.UserOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return authpb.Auth.internal_static_authpb_User_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return authpb.Auth.internal_static_authpb_User_fieldAccessorTable .ensureFieldAccessorsInitialized( authpb.Auth.User.class, authpb.Auth.User.Builder.class); } // Construct using authpb.Auth.User.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); name_ = com.google.protobuf.ByteString.EMPTY; password_ = com.google.protobuf.ByteString.EMPTY; roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return authpb.Auth.internal_static_authpb_User_descriptor; } public authpb.Auth.User getDefaultInstanceForType() { return authpb.Auth.User.getDefaultInstance(); } public authpb.Auth.User build() { authpb.Auth.User result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public authpb.Auth.User buildPartial() { authpb.Auth.User result = new authpb.Auth.User(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.password_ = password_; if (((bitField0_ & 0x00000004) == 0x00000004)) { roles_ = roles_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } result.roles_ = roles_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof authpb.Auth.User) { return mergeFrom((authpb.Auth.User)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(authpb.Auth.User other) { if (other == authpb.Auth.User.getDefaultInstance()) return this; if (other.getName() != com.google.protobuf.ByteString.EMPTY) { setName(other.getName()); } if (other.getPassword() != com.google.protobuf.ByteString.EMPTY) { setPassword(other.getPassword()); } if (!other.roles_.isEmpty()) { if (roles_.isEmpty()) { roles_ = other.roles_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureRolesIsMutable(); roles_.addAll(other.roles_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { authpb.Auth.User parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (authpb.Auth.User) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString name_ = com.google.protobuf.ByteString.EMPTY; /** * bytes name = 1; */ public com.google.protobuf.ByteString getName() { return name_; } /** * bytes name = 1; */ public Builder setName(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * bytes name = 1; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } private com.google.protobuf.ByteString password_ = com.google.protobuf.ByteString.EMPTY; /** * bytes password = 2; */ public com.google.protobuf.ByteString getPassword() { return password_; } /** * bytes password = 2; */ public Builder setPassword(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } password_ = value; onChanged(); return this; } /** * bytes password = 2; */ public Builder clearPassword() { password_ = getDefaultInstance().getPassword(); onChanged(); return this; } private com.google.protobuf.LazyStringList roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureRolesIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { roles_ = new com.google.protobuf.LazyStringArrayList(roles_); bitField0_ |= 0x00000004; } } /** * repeated string roles = 3; */ public com.google.protobuf.ProtocolStringList getRolesList() { return roles_.getUnmodifiableView(); } /** * repeated string roles = 3; */ public int getRolesCount() { return roles_.size(); } /** * repeated string roles = 3; */ public java.lang.String getRoles(int index) { return roles_.get(index); } /** * repeated string roles = 3; */ public com.google.protobuf.ByteString getRolesBytes(int index) { return roles_.getByteString(index); } /** * repeated string roles = 3; */ public Builder setRoles( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRolesIsMutable(); roles_.set(index, value); onChanged(); return this; } /** * repeated string roles = 3; */ public Builder addRoles( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureRolesIsMutable(); roles_.add(value); onChanged(); return this; } /** * repeated string roles = 3; */ public Builder addAllRoles( java.lang.Iterable values) { ensureRolesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, roles_); onChanged(); return this; } /** * repeated string roles = 3; */ public Builder clearRoles() { roles_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * repeated string roles = 3; */ public Builder addRolesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureRolesIsMutable(); roles_.add(value); onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authpb.User) } // @@protoc_insertion_point(class_scope:authpb.User) private static final authpb.Auth.User DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new authpb.Auth.User(); } public static authpb.Auth.User getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public User parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new User(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public authpb.Auth.User getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PermissionOrBuilder extends // @@protoc_insertion_point(interface_extends:authpb.Permission) com.google.protobuf.MessageOrBuilder { /** * .authpb.Permission.Type permType = 1; */ int getPermTypeValue(); /** * .authpb.Permission.Type permType = 1; */ authpb.Auth.Permission.Type getPermType(); /** * bytes key = 2; */ com.google.protobuf.ByteString getKey(); /** * bytes range_end = 3; */ com.google.protobuf.ByteString getRangeEnd(); } /** *
   * Permission is a single entity
   * 
* * Protobuf type {@code authpb.Permission} */ public static final class Permission extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authpb.Permission) PermissionOrBuilder { private static final long serialVersionUID = 0L; // Use Permission.newBuilder() to construct. private Permission(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Permission() { permType_ = 0; key_ = com.google.protobuf.ByteString.EMPTY; rangeEnd_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Permission( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 8: { int rawValue = input.readEnum(); permType_ = rawValue; break; } case 18: { key_ = input.readBytes(); break; } case 26: { rangeEnd_ = input.readBytes(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return authpb.Auth.internal_static_authpb_Permission_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return authpb.Auth.internal_static_authpb_Permission_fieldAccessorTable .ensureFieldAccessorsInitialized( authpb.Auth.Permission.class, authpb.Auth.Permission.Builder.class); } /** * Protobuf enum {@code authpb.Permission.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** * READ = 0; */ READ(0), /** * WRITE = 1; */ WRITE(1), /** * READWRITE = 2; */ READWRITE(2), UNRECOGNIZED(-1), ; /** * READ = 0; */ public static final int READ_VALUE = 0; /** * WRITE = 1; */ public static final int WRITE_VALUE = 1; /** * READWRITE = 2; */ public static final int READWRITE_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Type valueOf(int value) { return forNumber(value); } public static Type forNumber(int value) { switch (value) { case 0: return READ; case 1: return WRITE; case 2: return READWRITE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Type> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { return Type.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return authpb.Auth.Permission.getDescriptor().getEnumTypes().get(0); } private static final Type[] VALUES = values(); public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Type(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:authpb.Permission.Type) } public static final int PERMTYPE_FIELD_NUMBER = 1; private int permType_; /** * .authpb.Permission.Type permType = 1; */ public int getPermTypeValue() { return permType_; } /** * .authpb.Permission.Type permType = 1; */ public authpb.Auth.Permission.Type getPermType() { authpb.Auth.Permission.Type result = authpb.Auth.Permission.Type.valueOf(permType_); return result == null ? authpb.Auth.Permission.Type.UNRECOGNIZED : result; } public static final int KEY_FIELD_NUMBER = 2; private com.google.protobuf.ByteString key_; /** * bytes key = 2; */ public com.google.protobuf.ByteString getKey() { return key_; } public static final int RANGE_END_FIELD_NUMBER = 3; private com.google.protobuf.ByteString rangeEnd_; /** * bytes range_end = 3; */ public com.google.protobuf.ByteString getRangeEnd() { return rangeEnd_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (permType_ != authpb.Auth.Permission.Type.READ.getNumber()) { output.writeEnum(1, permType_); } if (!key_.isEmpty()) { output.writeBytes(2, key_); } if (!rangeEnd_.isEmpty()) { output.writeBytes(3, rangeEnd_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (permType_ != authpb.Auth.Permission.Type.READ.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, permType_); } if (!key_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, key_); } if (!rangeEnd_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, rangeEnd_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof authpb.Auth.Permission)) { return super.equals(obj); } authpb.Auth.Permission other = (authpb.Auth.Permission) obj; boolean result = true; result = result && permType_ == other.permType_; result = result && getKey() .equals(other.getKey()); result = result && getRangeEnd() .equals(other.getRangeEnd()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PERMTYPE_FIELD_NUMBER; hash = (53 * hash) + permType_; hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + RANGE_END_FIELD_NUMBER; hash = (53 * hash) + getRangeEnd().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static authpb.Auth.Permission parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.Permission parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.Permission parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.Permission parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.Permission parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.Permission parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.Permission parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static authpb.Auth.Permission parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static authpb.Auth.Permission parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static authpb.Auth.Permission parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static authpb.Auth.Permission parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static authpb.Auth.Permission parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(authpb.Auth.Permission prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Permission is a single entity
     * 
* * Protobuf type {@code authpb.Permission} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authpb.Permission) authpb.Auth.PermissionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return authpb.Auth.internal_static_authpb_Permission_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return authpb.Auth.internal_static_authpb_Permission_fieldAccessorTable .ensureFieldAccessorsInitialized( authpb.Auth.Permission.class, authpb.Auth.Permission.Builder.class); } // Construct using authpb.Auth.Permission.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); permType_ = 0; key_ = com.google.protobuf.ByteString.EMPTY; rangeEnd_ = com.google.protobuf.ByteString.EMPTY; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return authpb.Auth.internal_static_authpb_Permission_descriptor; } public authpb.Auth.Permission getDefaultInstanceForType() { return authpb.Auth.Permission.getDefaultInstance(); } public authpb.Auth.Permission build() { authpb.Auth.Permission result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public authpb.Auth.Permission buildPartial() { authpb.Auth.Permission result = new authpb.Auth.Permission(this); result.permType_ = permType_; result.key_ = key_; result.rangeEnd_ = rangeEnd_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof authpb.Auth.Permission) { return mergeFrom((authpb.Auth.Permission)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(authpb.Auth.Permission other) { if (other == authpb.Auth.Permission.getDefaultInstance()) return this; if (other.permType_ != 0) { setPermTypeValue(other.getPermTypeValue()); } if (other.getKey() != com.google.protobuf.ByteString.EMPTY) { setKey(other.getKey()); } if (other.getRangeEnd() != com.google.protobuf.ByteString.EMPTY) { setRangeEnd(other.getRangeEnd()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { authpb.Auth.Permission parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (authpb.Auth.Permission) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int permType_ = 0; /** * .authpb.Permission.Type permType = 1; */ public int getPermTypeValue() { return permType_; } /** * .authpb.Permission.Type permType = 1; */ public Builder setPermTypeValue(int value) { permType_ = value; onChanged(); return this; } /** * .authpb.Permission.Type permType = 1; */ public authpb.Auth.Permission.Type getPermType() { authpb.Auth.Permission.Type result = authpb.Auth.Permission.Type.valueOf(permType_); return result == null ? authpb.Auth.Permission.Type.UNRECOGNIZED : result; } /** * .authpb.Permission.Type permType = 1; */ public Builder setPermType(authpb.Auth.Permission.Type value) { if (value == null) { throw new NullPointerException(); } permType_ = value.getNumber(); onChanged(); return this; } /** * .authpb.Permission.Type permType = 1; */ public Builder clearPermType() { permType_ = 0; onChanged(); return this; } private com.google.protobuf.ByteString key_ = com.google.protobuf.ByteString.EMPTY; /** * bytes key = 2; */ public com.google.protobuf.ByteString getKey() { return key_; } /** * bytes key = 2; */ public Builder setKey(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); return this; } /** * bytes key = 2; */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); onChanged(); return this; } private com.google.protobuf.ByteString rangeEnd_ = com.google.protobuf.ByteString.EMPTY; /** * bytes range_end = 3; */ public com.google.protobuf.ByteString getRangeEnd() { return rangeEnd_; } /** * bytes range_end = 3; */ public Builder setRangeEnd(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } rangeEnd_ = value; onChanged(); return this; } /** * bytes range_end = 3; */ public Builder clearRangeEnd() { rangeEnd_ = getDefaultInstance().getRangeEnd(); onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authpb.Permission) } // @@protoc_insertion_point(class_scope:authpb.Permission) private static final authpb.Auth.Permission DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new authpb.Auth.Permission(); } public static authpb.Auth.Permission getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Permission parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Permission(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public authpb.Auth.Permission getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface RoleOrBuilder extends // @@protoc_insertion_point(interface_extends:authpb.Role) com.google.protobuf.MessageOrBuilder { /** * bytes name = 1; */ com.google.protobuf.ByteString getName(); /** * repeated .authpb.Permission keyPermission = 2; */ java.util.List getKeyPermissionList(); /** * repeated .authpb.Permission keyPermission = 2; */ authpb.Auth.Permission getKeyPermission(int index); /** * repeated .authpb.Permission keyPermission = 2; */ int getKeyPermissionCount(); /** * repeated .authpb.Permission keyPermission = 2; */ java.util.List getKeyPermissionOrBuilderList(); /** * repeated .authpb.Permission keyPermission = 2; */ authpb.Auth.PermissionOrBuilder getKeyPermissionOrBuilder( int index); } /** *
   * Role is a single entry in the bucket authRoles
   * 
* * Protobuf type {@code authpb.Role} */ public static final class Role extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:authpb.Role) RoleOrBuilder { private static final long serialVersionUID = 0L; // Use Role.newBuilder() to construct. private Role(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Role() { name_ = com.google.protobuf.ByteString.EMPTY; keyPermission_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Role( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { name_ = input.readBytes(); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { keyPermission_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } keyPermission_.add( input.readMessage(authpb.Auth.Permission.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).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { keyPermission_ = java.util.Collections.unmodifiableList(keyPermission_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return authpb.Auth.internal_static_authpb_Role_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return authpb.Auth.internal_static_authpb_Role_fieldAccessorTable .ensureFieldAccessorsInitialized( authpb.Auth.Role.class, authpb.Auth.Role.Builder.class); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private com.google.protobuf.ByteString name_; /** * bytes name = 1; */ public com.google.protobuf.ByteString getName() { return name_; } public static final int KEYPERMISSION_FIELD_NUMBER = 2; private java.util.List keyPermission_; /** * repeated .authpb.Permission keyPermission = 2; */ public java.util.List getKeyPermissionList() { return keyPermission_; } /** * repeated .authpb.Permission keyPermission = 2; */ public java.util.List getKeyPermissionOrBuilderList() { return keyPermission_; } /** * repeated .authpb.Permission keyPermission = 2; */ public int getKeyPermissionCount() { return keyPermission_.size(); } /** * repeated .authpb.Permission keyPermission = 2; */ public authpb.Auth.Permission getKeyPermission(int index) { return keyPermission_.get(index); } /** * repeated .authpb.Permission keyPermission = 2; */ public authpb.Auth.PermissionOrBuilder getKeyPermissionOrBuilder( int index) { return keyPermission_.get(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!name_.isEmpty()) { output.writeBytes(1, name_); } for (int i = 0; i < keyPermission_.size(); i++) { output.writeMessage(2, keyPermission_.get(i)); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!name_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, name_); } for (int i = 0; i < keyPermission_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, keyPermission_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof authpb.Auth.Role)) { return super.equals(obj); } authpb.Auth.Role other = (authpb.Auth.Role) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getKeyPermissionList() .equals(other.getKeyPermissionList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); if (getKeyPermissionCount() > 0) { hash = (37 * hash) + KEYPERMISSION_FIELD_NUMBER; hash = (53 * hash) + getKeyPermissionList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static authpb.Auth.Role parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.Role parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.Role parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.Role parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.Role parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static authpb.Auth.Role parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static authpb.Auth.Role parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static authpb.Auth.Role parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static authpb.Auth.Role parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static authpb.Auth.Role parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static authpb.Auth.Role parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static authpb.Auth.Role parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(authpb.Auth.Role prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Role is a single entry in the bucket authRoles
     * 
* * Protobuf type {@code authpb.Role} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:authpb.Role) authpb.Auth.RoleOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return authpb.Auth.internal_static_authpb_Role_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return authpb.Auth.internal_static_authpb_Role_fieldAccessorTable .ensureFieldAccessorsInitialized( authpb.Auth.Role.class, authpb.Auth.Role.Builder.class); } // Construct using authpb.Auth.Role.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getKeyPermissionFieldBuilder(); } } public Builder clear() { super.clear(); name_ = com.google.protobuf.ByteString.EMPTY; if (keyPermissionBuilder_ == null) { keyPermission_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { keyPermissionBuilder_.clear(); } return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return authpb.Auth.internal_static_authpb_Role_descriptor; } public authpb.Auth.Role getDefaultInstanceForType() { return authpb.Auth.Role.getDefaultInstance(); } public authpb.Auth.Role build() { authpb.Auth.Role result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public authpb.Auth.Role buildPartial() { authpb.Auth.Role result = new authpb.Auth.Role(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; if (keyPermissionBuilder_ == null) { if (((bitField0_ & 0x00000002) == 0x00000002)) { keyPermission_ = java.util.Collections.unmodifiableList(keyPermission_); bitField0_ = (bitField0_ & ~0x00000002); } result.keyPermission_ = keyPermission_; } else { result.keyPermission_ = keyPermissionBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof authpb.Auth.Role) { return mergeFrom((authpb.Auth.Role)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(authpb.Auth.Role other) { if (other == authpb.Auth.Role.getDefaultInstance()) return this; if (other.getName() != com.google.protobuf.ByteString.EMPTY) { setName(other.getName()); } if (keyPermissionBuilder_ == null) { if (!other.keyPermission_.isEmpty()) { if (keyPermission_.isEmpty()) { keyPermission_ = other.keyPermission_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureKeyPermissionIsMutable(); keyPermission_.addAll(other.keyPermission_); } onChanged(); } } else { if (!other.keyPermission_.isEmpty()) { if (keyPermissionBuilder_.isEmpty()) { keyPermissionBuilder_.dispose(); keyPermissionBuilder_ = null; keyPermission_ = other.keyPermission_; bitField0_ = (bitField0_ & ~0x00000002); keyPermissionBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKeyPermissionFieldBuilder() : null; } else { keyPermissionBuilder_.addAllMessages(other.keyPermission_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { authpb.Auth.Role parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (authpb.Auth.Role) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.ByteString name_ = com.google.protobuf.ByteString.EMPTY; /** * bytes name = 1; */ public com.google.protobuf.ByteString getName() { return name_; } /** * bytes name = 1; */ public Builder setName(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** * bytes name = 1; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } private java.util.List keyPermission_ = java.util.Collections.emptyList(); private void ensureKeyPermissionIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { keyPermission_ = new java.util.ArrayList(keyPermission_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< authpb.Auth.Permission, authpb.Auth.Permission.Builder, authpb.Auth.PermissionOrBuilder> keyPermissionBuilder_; /** * repeated .authpb.Permission keyPermission = 2; */ public java.util.List getKeyPermissionList() { if (keyPermissionBuilder_ == null) { return java.util.Collections.unmodifiableList(keyPermission_); } else { return keyPermissionBuilder_.getMessageList(); } } /** * repeated .authpb.Permission keyPermission = 2; */ public int getKeyPermissionCount() { if (keyPermissionBuilder_ == null) { return keyPermission_.size(); } else { return keyPermissionBuilder_.getCount(); } } /** * repeated .authpb.Permission keyPermission = 2; */ public authpb.Auth.Permission getKeyPermission(int index) { if (keyPermissionBuilder_ == null) { return keyPermission_.get(index); } else { return keyPermissionBuilder_.getMessage(index); } } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder setKeyPermission( int index, authpb.Auth.Permission value) { if (keyPermissionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyPermissionIsMutable(); keyPermission_.set(index, value); onChanged(); } else { keyPermissionBuilder_.setMessage(index, value); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder setKeyPermission( int index, authpb.Auth.Permission.Builder builderForValue) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.set(index, builderForValue.build()); onChanged(); } else { keyPermissionBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addKeyPermission(authpb.Auth.Permission value) { if (keyPermissionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyPermissionIsMutable(); keyPermission_.add(value); onChanged(); } else { keyPermissionBuilder_.addMessage(value); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addKeyPermission( int index, authpb.Auth.Permission value) { if (keyPermissionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureKeyPermissionIsMutable(); keyPermission_.add(index, value); onChanged(); } else { keyPermissionBuilder_.addMessage(index, value); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addKeyPermission( authpb.Auth.Permission.Builder builderForValue) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.add(builderForValue.build()); onChanged(); } else { keyPermissionBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addKeyPermission( int index, authpb.Auth.Permission.Builder builderForValue) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.add(index, builderForValue.build()); onChanged(); } else { keyPermissionBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder addAllKeyPermission( java.lang.Iterable values) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, keyPermission_); onChanged(); } else { keyPermissionBuilder_.addAllMessages(values); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder clearKeyPermission() { if (keyPermissionBuilder_ == null) { keyPermission_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { keyPermissionBuilder_.clear(); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public Builder removeKeyPermission(int index) { if (keyPermissionBuilder_ == null) { ensureKeyPermissionIsMutable(); keyPermission_.remove(index); onChanged(); } else { keyPermissionBuilder_.remove(index); } return this; } /** * repeated .authpb.Permission keyPermission = 2; */ public authpb.Auth.Permission.Builder getKeyPermissionBuilder( int index) { return getKeyPermissionFieldBuilder().getBuilder(index); } /** * repeated .authpb.Permission keyPermission = 2; */ public authpb.Auth.PermissionOrBuilder getKeyPermissionOrBuilder( int index) { if (keyPermissionBuilder_ == null) { return keyPermission_.get(index); } else { return keyPermissionBuilder_.getMessageOrBuilder(index); } } /** * repeated .authpb.Permission keyPermission = 2; */ public java.util.List getKeyPermissionOrBuilderList() { if (keyPermissionBuilder_ != null) { return keyPermissionBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(keyPermission_); } } /** * repeated .authpb.Permission keyPermission = 2; */ public authpb.Auth.Permission.Builder addKeyPermissionBuilder() { return getKeyPermissionFieldBuilder().addBuilder( authpb.Auth.Permission.getDefaultInstance()); } /** * repeated .authpb.Permission keyPermission = 2; */ public authpb.Auth.Permission.Builder addKeyPermissionBuilder( int index) { return getKeyPermissionFieldBuilder().addBuilder( index, authpb.Auth.Permission.getDefaultInstance()); } /** * repeated .authpb.Permission keyPermission = 2; */ public java.util.List getKeyPermissionBuilderList() { return getKeyPermissionFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< authpb.Auth.Permission, authpb.Auth.Permission.Builder, authpb.Auth.PermissionOrBuilder> getKeyPermissionFieldBuilder() { if (keyPermissionBuilder_ == null) { keyPermissionBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< authpb.Auth.Permission, authpb.Auth.Permission.Builder, authpb.Auth.PermissionOrBuilder>( keyPermission_, ((bitField0_ & 0x00000002) == 0x00000002), getParentForChildren(), isClean()); keyPermission_ = null; } return keyPermissionBuilder_; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:authpb.Role) } // @@protoc_insertion_point(class_scope:authpb.Role) private static final authpb.Auth.Role DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new authpb.Auth.Role(); } public static authpb.Auth.Role getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Role parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Role(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public authpb.Auth.Role getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_authpb_User_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authpb_User_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authpb_Permission_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authpb_Permission_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_authpb_Role_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_authpb_Role_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\033etcd/auth/authpb/auth.proto\022\006authpb\"5\n" + "\004User\022\014\n\004name\030\001 \001(\014\022\020\n\010password\030\002 \001(\014\022\r\n" + "\005roles\030\003 \003(\t\"\203\001\n\nPermission\022)\n\010permType\030" + "\001 \001(\0162\027.authpb.Permission.Type\022\013\n\003key\030\002 " + "\001(\014\022\021\n\trange_end\030\003 \001(\014\"*\n\004Type\022\010\n\004READ\020\000" + "\022\t\n\005WRITE\020\001\022\r\n\tREADWRITE\020\002\"?\n\004Role\022\014\n\004na" + "me\030\001 \001(\014\022)\n\rkeyPermission\030\002 \003(\0132\022.authpb" + ".Permissionb\006proto3" }; 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_authpb_User_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_authpb_User_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authpb_User_descriptor, new java.lang.String[] { "Name", "Password", "Roles", }); internal_static_authpb_Permission_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_authpb_Permission_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authpb_Permission_descriptor, new java.lang.String[] { "PermType", "Key", "RangeEnd", }); internal_static_authpb_Role_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_authpb_Role_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_authpb_Role_descriptor, new java.lang.String[] { "Name", "KeyPermission", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy