io.milvus.grpc.PrincipalEntity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of milvus-sdk-java Show documentation
Show all versions of milvus-sdk-java Show documentation
Java SDK for Milvus, a distributed high-performance vector search engine.
update grpc to 1.42.1
update protobuf to 3.19.1
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: milvus.proto
package io.milvus.grpc;
/**
* Protobuf type {@code milvus.proto.milvus.PrincipalEntity}
*/
public final class PrincipalEntity extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:milvus.proto.milvus.PrincipalEntity)
PrincipalEntityOrBuilder {
private static final long serialVersionUID = 0L;
// Use PrincipalEntity.newBuilder() to construct.
private PrincipalEntity(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PrincipalEntity() {
principalType_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PrincipalEntity();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PrincipalEntity(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
principalType_ = s;
break;
}
case 18: {
io.milvus.grpc.UserEntity.Builder subBuilder = null;
if (principalCase_ == 2) {
subBuilder = ((io.milvus.grpc.UserEntity) principal_).toBuilder();
}
principal_ =
input.readMessage(io.milvus.grpc.UserEntity.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.milvus.grpc.UserEntity) principal_);
principal_ = subBuilder.buildPartial();
}
principalCase_ = 2;
break;
}
case 26: {
io.milvus.grpc.RoleEntity.Builder subBuilder = null;
if (principalCase_ == 3) {
subBuilder = ((io.milvus.grpc.RoleEntity) principal_).toBuilder();
}
principal_ =
input.readMessage(io.milvus.grpc.RoleEntity.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((io.milvus.grpc.RoleEntity) principal_);
principal_ = subBuilder.buildPartial();
}
principalCase_ = 3;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
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 io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_PrincipalEntity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_PrincipalEntity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.milvus.grpc.PrincipalEntity.class, io.milvus.grpc.PrincipalEntity.Builder.class);
}
private int principalCase_ = 0;
private java.lang.Object principal_;
public enum PrincipalCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
USER(2),
ROLE(3),
PRINCIPAL_NOT_SET(0);
private final int value;
private PrincipalCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PrincipalCase valueOf(int value) {
return forNumber(value);
}
public static PrincipalCase forNumber(int value) {
switch (value) {
case 2: return USER;
case 3: return ROLE;
case 0: return PRINCIPAL_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public PrincipalCase
getPrincipalCase() {
return PrincipalCase.forNumber(
principalCase_);
}
public static final int PRINCIPAL_TYPE_FIELD_NUMBER = 1;
private volatile java.lang.Object principalType_;
/**
*
* principal type, including user, role
*
*
* string principal_type = 1;
* @return The principalType.
*/
@java.lang.Override
public java.lang.String getPrincipalType() {
java.lang.Object ref = principalType_;
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();
principalType_ = s;
return s;
}
}
/**
*
* principal type, including user, role
*
*
* string principal_type = 1;
* @return The bytes for principalType.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPrincipalTypeBytes() {
java.lang.Object ref = principalType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
principalType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_FIELD_NUMBER = 2;
/**
* .milvus.proto.milvus.UserEntity user = 2;
* @return Whether the user field is set.
*/
@java.lang.Override
public boolean hasUser() {
return principalCase_ == 2;
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
* @return The user.
*/
@java.lang.Override
public io.milvus.grpc.UserEntity getUser() {
if (principalCase_ == 2) {
return (io.milvus.grpc.UserEntity) principal_;
}
return io.milvus.grpc.UserEntity.getDefaultInstance();
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
*/
@java.lang.Override
public io.milvus.grpc.UserEntityOrBuilder getUserOrBuilder() {
if (principalCase_ == 2) {
return (io.milvus.grpc.UserEntity) principal_;
}
return io.milvus.grpc.UserEntity.getDefaultInstance();
}
public static final int ROLE_FIELD_NUMBER = 3;
/**
* .milvus.proto.milvus.RoleEntity role = 3;
* @return Whether the role field is set.
*/
@java.lang.Override
public boolean hasRole() {
return principalCase_ == 3;
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
* @return The role.
*/
@java.lang.Override
public io.milvus.grpc.RoleEntity getRole() {
if (principalCase_ == 3) {
return (io.milvus.grpc.RoleEntity) principal_;
}
return io.milvus.grpc.RoleEntity.getDefaultInstance();
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
*/
@java.lang.Override
public io.milvus.grpc.RoleEntityOrBuilder getRoleOrBuilder() {
if (principalCase_ == 3) {
return (io.milvus.grpc.RoleEntity) principal_;
}
return io.milvus.grpc.RoleEntity.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalType_);
}
if (principalCase_ == 2) {
output.writeMessage(2, (io.milvus.grpc.UserEntity) principal_);
}
if (principalCase_ == 3) {
output.writeMessage(3, (io.milvus.grpc.RoleEntity) principal_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalType_);
}
if (principalCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (io.milvus.grpc.UserEntity) principal_);
}
if (principalCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (io.milvus.grpc.RoleEntity) principal_);
}
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 io.milvus.grpc.PrincipalEntity)) {
return super.equals(obj);
}
io.milvus.grpc.PrincipalEntity other = (io.milvus.grpc.PrincipalEntity) obj;
if (!getPrincipalType()
.equals(other.getPrincipalType())) return false;
if (!getPrincipalCase().equals(other.getPrincipalCase())) return false;
switch (principalCase_) {
case 2:
if (!getUser()
.equals(other.getUser())) return false;
break;
case 3:
if (!getRole()
.equals(other.getRole())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PRINCIPAL_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getPrincipalType().hashCode();
switch (principalCase_) {
case 2:
hash = (37 * hash) + USER_FIELD_NUMBER;
hash = (53 * hash) + getUser().hashCode();
break;
case 3:
hash = (37 * hash) + ROLE_FIELD_NUMBER;
hash = (53 * hash) + getRole().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.milvus.grpc.PrincipalEntity parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.PrincipalEntity parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.milvus.grpc.PrincipalEntity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.PrincipalEntity parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.milvus.grpc.PrincipalEntity parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.PrincipalEntity parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.milvus.grpc.PrincipalEntity parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.milvus.grpc.PrincipalEntity 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 io.milvus.grpc.PrincipalEntity parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.milvus.grpc.PrincipalEntity 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 io.milvus.grpc.PrincipalEntity parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.milvus.grpc.PrincipalEntity parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.milvus.grpc.PrincipalEntity prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
* Protobuf type {@code milvus.proto.milvus.PrincipalEntity}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:milvus.proto.milvus.PrincipalEntity)
io.milvus.grpc.PrincipalEntityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_PrincipalEntity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_PrincipalEntity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.milvus.grpc.PrincipalEntity.class, io.milvus.grpc.PrincipalEntity.Builder.class);
}
// Construct using io.milvus.grpc.PrincipalEntity.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
principalType_ = "";
principalCase_ = 0;
principal_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.milvus.grpc.MilvusProto.internal_static_milvus_proto_milvus_PrincipalEntity_descriptor;
}
@java.lang.Override
public io.milvus.grpc.PrincipalEntity getDefaultInstanceForType() {
return io.milvus.grpc.PrincipalEntity.getDefaultInstance();
}
@java.lang.Override
public io.milvus.grpc.PrincipalEntity build() {
io.milvus.grpc.PrincipalEntity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.milvus.grpc.PrincipalEntity buildPartial() {
io.milvus.grpc.PrincipalEntity result = new io.milvus.grpc.PrincipalEntity(this);
result.principalType_ = principalType_;
if (principalCase_ == 2) {
if (userBuilder_ == null) {
result.principal_ = principal_;
} else {
result.principal_ = userBuilder_.build();
}
}
if (principalCase_ == 3) {
if (roleBuilder_ == null) {
result.principal_ = principal_;
} else {
result.principal_ = roleBuilder_.build();
}
}
result.principalCase_ = principalCase_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.milvus.grpc.PrincipalEntity) {
return mergeFrom((io.milvus.grpc.PrincipalEntity)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.milvus.grpc.PrincipalEntity other) {
if (other == io.milvus.grpc.PrincipalEntity.getDefaultInstance()) return this;
if (!other.getPrincipalType().isEmpty()) {
principalType_ = other.principalType_;
onChanged();
}
switch (other.getPrincipalCase()) {
case USER: {
mergeUser(other.getUser());
break;
}
case ROLE: {
mergeRole(other.getRole());
break;
}
case PRINCIPAL_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
io.milvus.grpc.PrincipalEntity parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.milvus.grpc.PrincipalEntity) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int principalCase_ = 0;
private java.lang.Object principal_;
public PrincipalCase
getPrincipalCase() {
return PrincipalCase.forNumber(
principalCase_);
}
public Builder clearPrincipal() {
principalCase_ = 0;
principal_ = null;
onChanged();
return this;
}
private java.lang.Object principalType_ = "";
/**
*
* principal type, including user, role
*
*
* string principal_type = 1;
* @return The principalType.
*/
public java.lang.String getPrincipalType() {
java.lang.Object ref = principalType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
principalType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* principal type, including user, role
*
*
* string principal_type = 1;
* @return The bytes for principalType.
*/
public com.google.protobuf.ByteString
getPrincipalTypeBytes() {
java.lang.Object ref = principalType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
principalType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* principal type, including user, role
*
*
* string principal_type = 1;
* @param value The principalType to set.
* @return This builder for chaining.
*/
public Builder setPrincipalType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
principalType_ = value;
onChanged();
return this;
}
/**
*
* principal type, including user, role
*
*
* string principal_type = 1;
* @return This builder for chaining.
*/
public Builder clearPrincipalType() {
principalType_ = getDefaultInstance().getPrincipalType();
onChanged();
return this;
}
/**
*
* principal type, including user, role
*
*
* string principal_type = 1;
* @param value The bytes for principalType to set.
* @return This builder for chaining.
*/
public Builder setPrincipalTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
principalType_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.UserEntity, io.milvus.grpc.UserEntity.Builder, io.milvus.grpc.UserEntityOrBuilder> userBuilder_;
/**
* .milvus.proto.milvus.UserEntity user = 2;
* @return Whether the user field is set.
*/
@java.lang.Override
public boolean hasUser() {
return principalCase_ == 2;
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
* @return The user.
*/
@java.lang.Override
public io.milvus.grpc.UserEntity getUser() {
if (userBuilder_ == null) {
if (principalCase_ == 2) {
return (io.milvus.grpc.UserEntity) principal_;
}
return io.milvus.grpc.UserEntity.getDefaultInstance();
} else {
if (principalCase_ == 2) {
return userBuilder_.getMessage();
}
return io.milvus.grpc.UserEntity.getDefaultInstance();
}
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
*/
public Builder setUser(io.milvus.grpc.UserEntity value) {
if (userBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
principal_ = value;
onChanged();
} else {
userBuilder_.setMessage(value);
}
principalCase_ = 2;
return this;
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
*/
public Builder setUser(
io.milvus.grpc.UserEntity.Builder builderForValue) {
if (userBuilder_ == null) {
principal_ = builderForValue.build();
onChanged();
} else {
userBuilder_.setMessage(builderForValue.build());
}
principalCase_ = 2;
return this;
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
*/
public Builder mergeUser(io.milvus.grpc.UserEntity value) {
if (userBuilder_ == null) {
if (principalCase_ == 2 &&
principal_ != io.milvus.grpc.UserEntity.getDefaultInstance()) {
principal_ = io.milvus.grpc.UserEntity.newBuilder((io.milvus.grpc.UserEntity) principal_)
.mergeFrom(value).buildPartial();
} else {
principal_ = value;
}
onChanged();
} else {
if (principalCase_ == 2) {
userBuilder_.mergeFrom(value);
}
userBuilder_.setMessage(value);
}
principalCase_ = 2;
return this;
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
*/
public Builder clearUser() {
if (userBuilder_ == null) {
if (principalCase_ == 2) {
principalCase_ = 0;
principal_ = null;
onChanged();
}
} else {
if (principalCase_ == 2) {
principalCase_ = 0;
principal_ = null;
}
userBuilder_.clear();
}
return this;
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
*/
public io.milvus.grpc.UserEntity.Builder getUserBuilder() {
return getUserFieldBuilder().getBuilder();
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
*/
@java.lang.Override
public io.milvus.grpc.UserEntityOrBuilder getUserOrBuilder() {
if ((principalCase_ == 2) && (userBuilder_ != null)) {
return userBuilder_.getMessageOrBuilder();
} else {
if (principalCase_ == 2) {
return (io.milvus.grpc.UserEntity) principal_;
}
return io.milvus.grpc.UserEntity.getDefaultInstance();
}
}
/**
* .milvus.proto.milvus.UserEntity user = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.UserEntity, io.milvus.grpc.UserEntity.Builder, io.milvus.grpc.UserEntityOrBuilder>
getUserFieldBuilder() {
if (userBuilder_ == null) {
if (!(principalCase_ == 2)) {
principal_ = io.milvus.grpc.UserEntity.getDefaultInstance();
}
userBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.UserEntity, io.milvus.grpc.UserEntity.Builder, io.milvus.grpc.UserEntityOrBuilder>(
(io.milvus.grpc.UserEntity) principal_,
getParentForChildren(),
isClean());
principal_ = null;
}
principalCase_ = 2;
onChanged();;
return userBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.RoleEntity, io.milvus.grpc.RoleEntity.Builder, io.milvus.grpc.RoleEntityOrBuilder> roleBuilder_;
/**
* .milvus.proto.milvus.RoleEntity role = 3;
* @return Whether the role field is set.
*/
@java.lang.Override
public boolean hasRole() {
return principalCase_ == 3;
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
* @return The role.
*/
@java.lang.Override
public io.milvus.grpc.RoleEntity getRole() {
if (roleBuilder_ == null) {
if (principalCase_ == 3) {
return (io.milvus.grpc.RoleEntity) principal_;
}
return io.milvus.grpc.RoleEntity.getDefaultInstance();
} else {
if (principalCase_ == 3) {
return roleBuilder_.getMessage();
}
return io.milvus.grpc.RoleEntity.getDefaultInstance();
}
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
*/
public Builder setRole(io.milvus.grpc.RoleEntity value) {
if (roleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
principal_ = value;
onChanged();
} else {
roleBuilder_.setMessage(value);
}
principalCase_ = 3;
return this;
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
*/
public Builder setRole(
io.milvus.grpc.RoleEntity.Builder builderForValue) {
if (roleBuilder_ == null) {
principal_ = builderForValue.build();
onChanged();
} else {
roleBuilder_.setMessage(builderForValue.build());
}
principalCase_ = 3;
return this;
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
*/
public Builder mergeRole(io.milvus.grpc.RoleEntity value) {
if (roleBuilder_ == null) {
if (principalCase_ == 3 &&
principal_ != io.milvus.grpc.RoleEntity.getDefaultInstance()) {
principal_ = io.milvus.grpc.RoleEntity.newBuilder((io.milvus.grpc.RoleEntity) principal_)
.mergeFrom(value).buildPartial();
} else {
principal_ = value;
}
onChanged();
} else {
if (principalCase_ == 3) {
roleBuilder_.mergeFrom(value);
}
roleBuilder_.setMessage(value);
}
principalCase_ = 3;
return this;
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
*/
public Builder clearRole() {
if (roleBuilder_ == null) {
if (principalCase_ == 3) {
principalCase_ = 0;
principal_ = null;
onChanged();
}
} else {
if (principalCase_ == 3) {
principalCase_ = 0;
principal_ = null;
}
roleBuilder_.clear();
}
return this;
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
*/
public io.milvus.grpc.RoleEntity.Builder getRoleBuilder() {
return getRoleFieldBuilder().getBuilder();
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
*/
@java.lang.Override
public io.milvus.grpc.RoleEntityOrBuilder getRoleOrBuilder() {
if ((principalCase_ == 3) && (roleBuilder_ != null)) {
return roleBuilder_.getMessageOrBuilder();
} else {
if (principalCase_ == 3) {
return (io.milvus.grpc.RoleEntity) principal_;
}
return io.milvus.grpc.RoleEntity.getDefaultInstance();
}
}
/**
* .milvus.proto.milvus.RoleEntity role = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.RoleEntity, io.milvus.grpc.RoleEntity.Builder, io.milvus.grpc.RoleEntityOrBuilder>
getRoleFieldBuilder() {
if (roleBuilder_ == null) {
if (!(principalCase_ == 3)) {
principal_ = io.milvus.grpc.RoleEntity.getDefaultInstance();
}
roleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.milvus.grpc.RoleEntity, io.milvus.grpc.RoleEntity.Builder, io.milvus.grpc.RoleEntityOrBuilder>(
(io.milvus.grpc.RoleEntity) principal_,
getParentForChildren(),
isClean());
principal_ = null;
}
principalCase_ = 3;
onChanged();;
return roleBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:milvus.proto.milvus.PrincipalEntity)
}
// @@protoc_insertion_point(class_scope:milvus.proto.milvus.PrincipalEntity)
private static final io.milvus.grpc.PrincipalEntity DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.milvus.grpc.PrincipalEntity();
}
public static io.milvus.grpc.PrincipalEntity getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PrincipalEntity parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PrincipalEntity(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.milvus.grpc.PrincipalEntity getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}