io.milvus.grpc.PrivilegeExt 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: common.proto
package io.milvus.grpc;
/**
* Protobuf type {@code milvus.proto.common.PrivilegeExt}
*/
public final class PrivilegeExt extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:milvus.proto.common.PrivilegeExt)
PrivilegeExtOrBuilder {
private static final long serialVersionUID = 0L;
// Use PrivilegeExt.newBuilder() to construct.
private PrivilegeExt(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PrivilegeExt() {
resourceType_ = 0;
resourcePrivilege_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PrivilegeExt();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PrivilegeExt(
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 8: {
int rawValue = input.readEnum();
resourceType_ = rawValue;
break;
}
case 16: {
int rawValue = input.readEnum();
resourcePrivilege_ = rawValue;
break;
}
case 24: {
resourceNameIndex_ = input.readInt32();
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.CommonProto.internal_static_milvus_proto_common_PrivilegeExt_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_PrivilegeExt_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.milvus.grpc.PrivilegeExt.class, io.milvus.grpc.PrivilegeExt.Builder.class);
}
public static final int RESOURCE_TYPE_FIELD_NUMBER = 1;
private int resourceType_;
/**
* .milvus.proto.common.ResourceType resource_type = 1;
* @return The enum numeric value on the wire for resourceType.
*/
@java.lang.Override public int getResourceTypeValue() {
return resourceType_;
}
/**
* .milvus.proto.common.ResourceType resource_type = 1;
* @return The resourceType.
*/
@java.lang.Override public io.milvus.grpc.ResourceType getResourceType() {
@SuppressWarnings("deprecation")
io.milvus.grpc.ResourceType result = io.milvus.grpc.ResourceType.valueOf(resourceType_);
return result == null ? io.milvus.grpc.ResourceType.UNRECOGNIZED : result;
}
public static final int RESOURCE_PRIVILEGE_FIELD_NUMBER = 2;
private int resourcePrivilege_;
/**
* .milvus.proto.common.ResourcePrivilege resource_privilege = 2;
* @return The enum numeric value on the wire for resourcePrivilege.
*/
@java.lang.Override public int getResourcePrivilegeValue() {
return resourcePrivilege_;
}
/**
* .milvus.proto.common.ResourcePrivilege resource_privilege = 2;
* @return The resourcePrivilege.
*/
@java.lang.Override public io.milvus.grpc.ResourcePrivilege getResourcePrivilege() {
@SuppressWarnings("deprecation")
io.milvus.grpc.ResourcePrivilege result = io.milvus.grpc.ResourcePrivilege.valueOf(resourcePrivilege_);
return result == null ? io.milvus.grpc.ResourcePrivilege.UNRECOGNIZED : result;
}
public static final int RESOURCE_NAME_INDEX_FIELD_NUMBER = 3;
private int resourceNameIndex_;
/**
* int32 resource_name_index = 3;
* @return The resourceNameIndex.
*/
@java.lang.Override
public int getResourceNameIndex() {
return resourceNameIndex_;
}
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 (resourceType_ != io.milvus.grpc.ResourceType.Collection.getNumber()) {
output.writeEnum(1, resourceType_);
}
if (resourcePrivilege_ != io.milvus.grpc.ResourcePrivilege.PrivilegeAll.getNumber()) {
output.writeEnum(2, resourcePrivilege_);
}
if (resourceNameIndex_ != 0) {
output.writeInt32(3, resourceNameIndex_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (resourceType_ != io.milvus.grpc.ResourceType.Collection.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, resourceType_);
}
if (resourcePrivilege_ != io.milvus.grpc.ResourcePrivilege.PrivilegeAll.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, resourcePrivilege_);
}
if (resourceNameIndex_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, resourceNameIndex_);
}
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.PrivilegeExt)) {
return super.equals(obj);
}
io.milvus.grpc.PrivilegeExt other = (io.milvus.grpc.PrivilegeExt) obj;
if (resourceType_ != other.resourceType_) return false;
if (resourcePrivilege_ != other.resourcePrivilege_) return false;
if (getResourceNameIndex()
!= other.getResourceNameIndex()) return false;
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) + RESOURCE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + resourceType_;
hash = (37 * hash) + RESOURCE_PRIVILEGE_FIELD_NUMBER;
hash = (53 * hash) + resourcePrivilege_;
hash = (37 * hash) + RESOURCE_NAME_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getResourceNameIndex();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.milvus.grpc.PrivilegeExt parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.PrivilegeExt 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.PrivilegeExt parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.PrivilegeExt 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.PrivilegeExt parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.milvus.grpc.PrivilegeExt parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.milvus.grpc.PrivilegeExt parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.milvus.grpc.PrivilegeExt 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.PrivilegeExt parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.milvus.grpc.PrivilegeExt 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.PrivilegeExt parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.milvus.grpc.PrivilegeExt 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.PrivilegeExt 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.common.PrivilegeExt}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:milvus.proto.common.PrivilegeExt)
io.milvus.grpc.PrivilegeExtOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_PrivilegeExt_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_PrivilegeExt_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.milvus.grpc.PrivilegeExt.class, io.milvus.grpc.PrivilegeExt.Builder.class);
}
// Construct using io.milvus.grpc.PrivilegeExt.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();
resourceType_ = 0;
resourcePrivilege_ = 0;
resourceNameIndex_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.milvus.grpc.CommonProto.internal_static_milvus_proto_common_PrivilegeExt_descriptor;
}
@java.lang.Override
public io.milvus.grpc.PrivilegeExt getDefaultInstanceForType() {
return io.milvus.grpc.PrivilegeExt.getDefaultInstance();
}
@java.lang.Override
public io.milvus.grpc.PrivilegeExt build() {
io.milvus.grpc.PrivilegeExt result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.milvus.grpc.PrivilegeExt buildPartial() {
io.milvus.grpc.PrivilegeExt result = new io.milvus.grpc.PrivilegeExt(this);
result.resourceType_ = resourceType_;
result.resourcePrivilege_ = resourcePrivilege_;
result.resourceNameIndex_ = resourceNameIndex_;
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.PrivilegeExt) {
return mergeFrom((io.milvus.grpc.PrivilegeExt)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.milvus.grpc.PrivilegeExt other) {
if (other == io.milvus.grpc.PrivilegeExt.getDefaultInstance()) return this;
if (other.resourceType_ != 0) {
setResourceTypeValue(other.getResourceTypeValue());
}
if (other.resourcePrivilege_ != 0) {
setResourcePrivilegeValue(other.getResourcePrivilegeValue());
}
if (other.getResourceNameIndex() != 0) {
setResourceNameIndex(other.getResourceNameIndex());
}
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.PrivilegeExt parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.milvus.grpc.PrivilegeExt) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int resourceType_ = 0;
/**
* .milvus.proto.common.ResourceType resource_type = 1;
* @return The enum numeric value on the wire for resourceType.
*/
@java.lang.Override public int getResourceTypeValue() {
return resourceType_;
}
/**
* .milvus.proto.common.ResourceType resource_type = 1;
* @param value The enum numeric value on the wire for resourceType to set.
* @return This builder for chaining.
*/
public Builder setResourceTypeValue(int value) {
resourceType_ = value;
onChanged();
return this;
}
/**
* .milvus.proto.common.ResourceType resource_type = 1;
* @return The resourceType.
*/
@java.lang.Override
public io.milvus.grpc.ResourceType getResourceType() {
@SuppressWarnings("deprecation")
io.milvus.grpc.ResourceType result = io.milvus.grpc.ResourceType.valueOf(resourceType_);
return result == null ? io.milvus.grpc.ResourceType.UNRECOGNIZED : result;
}
/**
* .milvus.proto.common.ResourceType resource_type = 1;
* @param value The resourceType to set.
* @return This builder for chaining.
*/
public Builder setResourceType(io.milvus.grpc.ResourceType value) {
if (value == null) {
throw new NullPointerException();
}
resourceType_ = value.getNumber();
onChanged();
return this;
}
/**
* .milvus.proto.common.ResourceType resource_type = 1;
* @return This builder for chaining.
*/
public Builder clearResourceType() {
resourceType_ = 0;
onChanged();
return this;
}
private int resourcePrivilege_ = 0;
/**
* .milvus.proto.common.ResourcePrivilege resource_privilege = 2;
* @return The enum numeric value on the wire for resourcePrivilege.
*/
@java.lang.Override public int getResourcePrivilegeValue() {
return resourcePrivilege_;
}
/**
* .milvus.proto.common.ResourcePrivilege resource_privilege = 2;
* @param value The enum numeric value on the wire for resourcePrivilege to set.
* @return This builder for chaining.
*/
public Builder setResourcePrivilegeValue(int value) {
resourcePrivilege_ = value;
onChanged();
return this;
}
/**
* .milvus.proto.common.ResourcePrivilege resource_privilege = 2;
* @return The resourcePrivilege.
*/
@java.lang.Override
public io.milvus.grpc.ResourcePrivilege getResourcePrivilege() {
@SuppressWarnings("deprecation")
io.milvus.grpc.ResourcePrivilege result = io.milvus.grpc.ResourcePrivilege.valueOf(resourcePrivilege_);
return result == null ? io.milvus.grpc.ResourcePrivilege.UNRECOGNIZED : result;
}
/**
* .milvus.proto.common.ResourcePrivilege resource_privilege = 2;
* @param value The resourcePrivilege to set.
* @return This builder for chaining.
*/
public Builder setResourcePrivilege(io.milvus.grpc.ResourcePrivilege value) {
if (value == null) {
throw new NullPointerException();
}
resourcePrivilege_ = value.getNumber();
onChanged();
return this;
}
/**
* .milvus.proto.common.ResourcePrivilege resource_privilege = 2;
* @return This builder for chaining.
*/
public Builder clearResourcePrivilege() {
resourcePrivilege_ = 0;
onChanged();
return this;
}
private int resourceNameIndex_ ;
/**
* int32 resource_name_index = 3;
* @return The resourceNameIndex.
*/
@java.lang.Override
public int getResourceNameIndex() {
return resourceNameIndex_;
}
/**
* int32 resource_name_index = 3;
* @param value The resourceNameIndex to set.
* @return This builder for chaining.
*/
public Builder setResourceNameIndex(int value) {
resourceNameIndex_ = value;
onChanged();
return this;
}
/**
* int32 resource_name_index = 3;
* @return This builder for chaining.
*/
public Builder clearResourceNameIndex() {
resourceNameIndex_ = 0;
onChanged();
return this;
}
@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.common.PrivilegeExt)
}
// @@protoc_insertion_point(class_scope:milvus.proto.common.PrivilegeExt)
private static final io.milvus.grpc.PrivilegeExt DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.milvus.grpc.PrivilegeExt();
}
public static io.milvus.grpc.PrivilegeExt getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PrivilegeExt parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PrivilegeExt(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.PrivilegeExt getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}