io.github.xezzon.geom.auth.JwtClaim Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: authentication.proto
// Protobuf Java Version: 3.25.1
package io.github.xezzon.geom.auth;
/**
*
* JWT claim
*
*
* Protobuf type {@code io.github.xezzon.geom.auth.JwtClaim}
*/
public final class JwtClaim extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.github.xezzon.geom.auth.JwtClaim)
JwtClaimOrBuilder {
private static final long serialVersionUID = 0L;
// Use JwtClaim.newBuilder() to construct.
private JwtClaim(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private JwtClaim() {
subject_ = "";
preferredUsername_ = "";
nickname_ = "";
roles_ =
com.google.protobuf.LazyStringArrayList.emptyList();
entitlements_ =
com.google.protobuf.LazyStringArrayList.emptyList();
groups_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new JwtClaim();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.github.xezzon.geom.auth.AuthenticationProto.internal_static_io_github_xezzon_geom_auth_JwtClaim_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.github.xezzon.geom.auth.AuthenticationProto.internal_static_io_github_xezzon_geom_auth_JwtClaim_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.github.xezzon.geom.auth.JwtClaim.class, io.github.xezzon.geom.auth.JwtClaim.Builder.class);
}
public static final int SUBJECT_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object subject_ = "";
/**
*
* 用户ID
*
*
* string subject = 1;
* @return The subject.
*/
@java.lang.Override
public java.lang.String getSubject() {
java.lang.Object ref = subject_;
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();
subject_ = s;
return s;
}
}
/**
*
* 用户ID
*
*
* string subject = 1;
* @return The bytes for subject.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSubjectBytes() {
java.lang.Object ref = subject_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subject_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PREFERRED_USERNAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object preferredUsername_ = "";
/**
*
* 用户名
*
*
* string preferred_username = 2;
* @return The preferredUsername.
*/
@java.lang.Override
public java.lang.String getPreferredUsername() {
java.lang.Object ref = preferredUsername_;
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();
preferredUsername_ = s;
return s;
}
}
/**
*
* 用户名
*
*
* string preferred_username = 2;
* @return The bytes for preferredUsername.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPreferredUsernameBytes() {
java.lang.Object ref = preferredUsername_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
preferredUsername_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NICKNAME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object nickname_ = "";
/**
*
* 昵称
*
*
* string nickname = 3;
* @return The nickname.
*/
@java.lang.Override
public java.lang.String getNickname() {
java.lang.Object ref = nickname_;
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();
nickname_ = s;
return s;
}
}
/**
*
* 昵称
*
*
* string nickname = 3;
* @return The bytes for nickname.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNicknameBytes() {
java.lang.Object ref = nickname_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
nickname_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROLES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList roles_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* 角色
*
*
* repeated string roles = 4;
* @return A list containing the roles.
*/
public com.google.protobuf.ProtocolStringList
getRolesList() {
return roles_;
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @return The count of roles.
*/
public int getRolesCount() {
return roles_.size();
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @param index The index of the element to return.
* @return The roles at the given index.
*/
public java.lang.String getRoles(int index) {
return roles_.get(index);
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @param index The index of the value to return.
* @return The bytes of the roles at the given index.
*/
public com.google.protobuf.ByteString
getRolesBytes(int index) {
return roles_.getByteString(index);
}
public static final int ENTITLEMENTS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList entitlements_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @return A list containing the entitlements.
*/
public com.google.protobuf.ProtocolStringList
getEntitlementsList() {
return entitlements_;
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @return The count of entitlements.
*/
public int getEntitlementsCount() {
return entitlements_.size();
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @param index The index of the element to return.
* @return The entitlements at the given index.
*/
public java.lang.String getEntitlements(int index) {
return entitlements_.get(index);
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @param index The index of the value to return.
* @return The bytes of the entitlements at the given index.
*/
public com.google.protobuf.ByteString
getEntitlementsBytes(int index) {
return entitlements_.getByteString(index);
}
public static final int GROUPS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList groups_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @return A list containing the groups.
*/
public com.google.protobuf.ProtocolStringList
getGroupsList() {
return groups_;
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @return The count of groups.
*/
public int getGroupsCount() {
return groups_.size();
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @param index The index of the element to return.
* @return The groups at the given index.
*/
public java.lang.String getGroups(int index) {
return groups_.get(index);
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @param index The index of the value to return.
* @return The bytes of the groups at the given index.
*/
public com.google.protobuf.ByteString
getGroupsBytes(int index) {
return groups_.getByteString(index);
}
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(subject_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subject_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preferredUsername_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, preferredUsername_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nickname_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nickname_);
}
for (int i = 0; i < roles_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, roles_.getRaw(i));
}
for (int i = 0; i < entitlements_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, entitlements_.getRaw(i));
}
for (int i = 0; i < groups_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, groups_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subject_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preferredUsername_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, preferredUsername_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nickname_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nickname_);
}
{
int dataSize = 0;
for (int i = 0; i < roles_.size(); i++) {
dataSize += computeStringSizeNoTag(roles_.getRaw(i));
}
size += dataSize;
size += 1 * getRolesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < entitlements_.size(); i++) {
dataSize += computeStringSizeNoTag(entitlements_.getRaw(i));
}
size += dataSize;
size += 1 * getEntitlementsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < groups_.size(); i++) {
dataSize += computeStringSizeNoTag(groups_.getRaw(i));
}
size += dataSize;
size += 1 * getGroupsList().size();
}
size += getUnknownFields().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.github.xezzon.geom.auth.JwtClaim)) {
return super.equals(obj);
}
io.github.xezzon.geom.auth.JwtClaim other = (io.github.xezzon.geom.auth.JwtClaim) obj;
if (!getSubject()
.equals(other.getSubject())) return false;
if (!getPreferredUsername()
.equals(other.getPreferredUsername())) return false;
if (!getNickname()
.equals(other.getNickname())) return false;
if (!getRolesList()
.equals(other.getRolesList())) return false;
if (!getEntitlementsList()
.equals(other.getEntitlementsList())) return false;
if (!getGroupsList()
.equals(other.getGroupsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) 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) + SUBJECT_FIELD_NUMBER;
hash = (53 * hash) + getSubject().hashCode();
hash = (37 * hash) + PREFERRED_USERNAME_FIELD_NUMBER;
hash = (53 * hash) + getPreferredUsername().hashCode();
hash = (37 * hash) + NICKNAME_FIELD_NUMBER;
hash = (53 * hash) + getNickname().hashCode();
if (getRolesCount() > 0) {
hash = (37 * hash) + ROLES_FIELD_NUMBER;
hash = (53 * hash) + getRolesList().hashCode();
}
if (getEntitlementsCount() > 0) {
hash = (37 * hash) + ENTITLEMENTS_FIELD_NUMBER;
hash = (53 * hash) + getEntitlementsList().hashCode();
}
if (getGroupsCount() > 0) {
hash = (37 * hash) + GROUPS_FIELD_NUMBER;
hash = (53 * hash) + getGroupsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.github.xezzon.geom.auth.JwtClaim parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.github.xezzon.geom.auth.JwtClaim parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.github.xezzon.geom.auth.JwtClaim parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.github.xezzon.geom.auth.JwtClaim parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.github.xezzon.geom.auth.JwtClaim parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.github.xezzon.geom.auth.JwtClaim parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.github.xezzon.geom.auth.JwtClaim parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.github.xezzon.geom.auth.JwtClaim 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.github.xezzon.geom.auth.JwtClaim parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.github.xezzon.geom.auth.JwtClaim 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.github.xezzon.geom.auth.JwtClaim parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.github.xezzon.geom.auth.JwtClaim 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.github.xezzon.geom.auth.JwtClaim 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;
}
/**
*
* JWT claim
*
*
* Protobuf type {@code io.github.xezzon.geom.auth.JwtClaim}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.github.xezzon.geom.auth.JwtClaim)
io.github.xezzon.geom.auth.JwtClaimOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.github.xezzon.geom.auth.AuthenticationProto.internal_static_io_github_xezzon_geom_auth_JwtClaim_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.github.xezzon.geom.auth.AuthenticationProto.internal_static_io_github_xezzon_geom_auth_JwtClaim_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.github.xezzon.geom.auth.JwtClaim.class, io.github.xezzon.geom.auth.JwtClaim.Builder.class);
}
// Construct using io.github.xezzon.geom.auth.JwtClaim.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
subject_ = "";
preferredUsername_ = "";
nickname_ = "";
roles_ =
com.google.protobuf.LazyStringArrayList.emptyList();
entitlements_ =
com.google.protobuf.LazyStringArrayList.emptyList();
groups_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.github.xezzon.geom.auth.AuthenticationProto.internal_static_io_github_xezzon_geom_auth_JwtClaim_descriptor;
}
@java.lang.Override
public io.github.xezzon.geom.auth.JwtClaim getDefaultInstanceForType() {
return io.github.xezzon.geom.auth.JwtClaim.getDefaultInstance();
}
@java.lang.Override
public io.github.xezzon.geom.auth.JwtClaim build() {
io.github.xezzon.geom.auth.JwtClaim result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.github.xezzon.geom.auth.JwtClaim buildPartial() {
io.github.xezzon.geom.auth.JwtClaim result = new io.github.xezzon.geom.auth.JwtClaim(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.github.xezzon.geom.auth.JwtClaim result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.subject_ = subject_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.preferredUsername_ = preferredUsername_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.nickname_ = nickname_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
roles_.makeImmutable();
result.roles_ = roles_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
entitlements_.makeImmutable();
result.entitlements_ = entitlements_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
groups_.makeImmutable();
result.groups_ = groups_;
}
}
@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.github.xezzon.geom.auth.JwtClaim) {
return mergeFrom((io.github.xezzon.geom.auth.JwtClaim)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.github.xezzon.geom.auth.JwtClaim other) {
if (other == io.github.xezzon.geom.auth.JwtClaim.getDefaultInstance()) return this;
if (!other.getSubject().isEmpty()) {
subject_ = other.subject_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getPreferredUsername().isEmpty()) {
preferredUsername_ = other.preferredUsername_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getNickname().isEmpty()) {
nickname_ = other.nickname_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.roles_.isEmpty()) {
if (roles_.isEmpty()) {
roles_ = other.roles_;
bitField0_ |= 0x00000008;
} else {
ensureRolesIsMutable();
roles_.addAll(other.roles_);
}
onChanged();
}
if (!other.entitlements_.isEmpty()) {
if (entitlements_.isEmpty()) {
entitlements_ = other.entitlements_;
bitField0_ |= 0x00000010;
} else {
ensureEntitlementsIsMutable();
entitlements_.addAll(other.entitlements_);
}
onChanged();
}
if (!other.groups_.isEmpty()) {
if (groups_.isEmpty()) {
groups_ = other.groups_;
bitField0_ |= 0x00000020;
} else {
ensureGroupsIsMutable();
groups_.addAll(other.groups_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
subject_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
preferredUsername_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
nickname_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
java.lang.String s = input.readStringRequireUtf8();
ensureRolesIsMutable();
roles_.add(s);
break;
} // case 34
case 42: {
java.lang.String s = input.readStringRequireUtf8();
ensureEntitlementsIsMutable();
entitlements_.add(s);
break;
} // case 42
case 50: {
java.lang.String s = input.readStringRequireUtf8();
ensureGroupsIsMutable();
groups_.add(s);
break;
} // case 50
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object subject_ = "";
/**
*
* 用户ID
*
*
* string subject = 1;
* @return The subject.
*/
public java.lang.String getSubject() {
java.lang.Object ref = subject_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
subject_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 用户ID
*
*
* string subject = 1;
* @return The bytes for subject.
*/
public com.google.protobuf.ByteString
getSubjectBytes() {
java.lang.Object ref = subject_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subject_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 用户ID
*
*
* string subject = 1;
* @param value The subject to set.
* @return This builder for chaining.
*/
public Builder setSubject(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
subject_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* 用户ID
*
*
* string subject = 1;
* @return This builder for chaining.
*/
public Builder clearSubject() {
subject_ = getDefaultInstance().getSubject();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* 用户ID
*
*
* string subject = 1;
* @param value The bytes for subject to set.
* @return This builder for chaining.
*/
public Builder setSubjectBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
subject_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object preferredUsername_ = "";
/**
*
* 用户名
*
*
* string preferred_username = 2;
* @return The preferredUsername.
*/
public java.lang.String getPreferredUsername() {
java.lang.Object ref = preferredUsername_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
preferredUsername_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 用户名
*
*
* string preferred_username = 2;
* @return The bytes for preferredUsername.
*/
public com.google.protobuf.ByteString
getPreferredUsernameBytes() {
java.lang.Object ref = preferredUsername_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
preferredUsername_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 用户名
*
*
* string preferred_username = 2;
* @param value The preferredUsername to set.
* @return This builder for chaining.
*/
public Builder setPreferredUsername(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
preferredUsername_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* 用户名
*
*
* string preferred_username = 2;
* @return This builder for chaining.
*/
public Builder clearPreferredUsername() {
preferredUsername_ = getDefaultInstance().getPreferredUsername();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* 用户名
*
*
* string preferred_username = 2;
* @param value The bytes for preferredUsername to set.
* @return This builder for chaining.
*/
public Builder setPreferredUsernameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
preferredUsername_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object nickname_ = "";
/**
*
* 昵称
*
*
* string nickname = 3;
* @return The nickname.
*/
public java.lang.String getNickname() {
java.lang.Object ref = nickname_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
nickname_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 昵称
*
*
* string nickname = 3;
* @return The bytes for nickname.
*/
public com.google.protobuf.ByteString
getNicknameBytes() {
java.lang.Object ref = nickname_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
nickname_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 昵称
*
*
* string nickname = 3;
* @param value The nickname to set.
* @return This builder for chaining.
*/
public Builder setNickname(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
nickname_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* 昵称
*
*
* string nickname = 3;
* @return This builder for chaining.
*/
public Builder clearNickname() {
nickname_ = getDefaultInstance().getNickname();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* 昵称
*
*
* string nickname = 3;
* @param value The bytes for nickname to set.
* @return This builder for chaining.
*/
public Builder setNicknameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
nickname_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList roles_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureRolesIsMutable() {
if (!roles_.isModifiable()) {
roles_ = new com.google.protobuf.LazyStringArrayList(roles_);
}
bitField0_ |= 0x00000008;
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @return A list containing the roles.
*/
public com.google.protobuf.ProtocolStringList
getRolesList() {
roles_.makeImmutable();
return roles_;
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @return The count of roles.
*/
public int getRolesCount() {
return roles_.size();
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @param index The index of the element to return.
* @return The roles at the given index.
*/
public java.lang.String getRoles(int index) {
return roles_.get(index);
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @param index The index of the value to return.
* @return The bytes of the roles at the given index.
*/
public com.google.protobuf.ByteString
getRolesBytes(int index) {
return roles_.getByteString(index);
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @param index The index to set the value at.
* @param value The roles to set.
* @return This builder for chaining.
*/
public Builder setRoles(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRolesIsMutable();
roles_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @param value The roles to add.
* @return This builder for chaining.
*/
public Builder addRoles(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRolesIsMutable();
roles_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @param values The roles to add.
* @return This builder for chaining.
*/
public Builder addAllRoles(
java.lang.Iterable values) {
ensureRolesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, roles_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @return This builder for chaining.
*/
public Builder clearRoles() {
roles_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);;
onChanged();
return this;
}
/**
*
* 角色
*
*
* repeated string roles = 4;
* @param value The bytes of the roles to add.
* @return This builder for chaining.
*/
public Builder addRolesBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureRolesIsMutable();
roles_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList entitlements_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureEntitlementsIsMutable() {
if (!entitlements_.isModifiable()) {
entitlements_ = new com.google.protobuf.LazyStringArrayList(entitlements_);
}
bitField0_ |= 0x00000010;
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @return A list containing the entitlements.
*/
public com.google.protobuf.ProtocolStringList
getEntitlementsList() {
entitlements_.makeImmutable();
return entitlements_;
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @return The count of entitlements.
*/
public int getEntitlementsCount() {
return entitlements_.size();
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @param index The index of the element to return.
* @return The entitlements at the given index.
*/
public java.lang.String getEntitlements(int index) {
return entitlements_.get(index);
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @param index The index of the value to return.
* @return The bytes of the entitlements at the given index.
*/
public com.google.protobuf.ByteString
getEntitlementsBytes(int index) {
return entitlements_.getByteString(index);
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @param index The index to set the value at.
* @param value The entitlements to set.
* @return This builder for chaining.
*/
public Builder setEntitlements(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureEntitlementsIsMutable();
entitlements_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @param value The entitlements to add.
* @return This builder for chaining.
*/
public Builder addEntitlements(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureEntitlementsIsMutable();
entitlements_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @param values The entitlements to add.
* @return This builder for chaining.
*/
public Builder addAllEntitlements(
java.lang.Iterable values) {
ensureEntitlementsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, entitlements_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @return This builder for chaining.
*/
public Builder clearEntitlements() {
entitlements_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);;
onChanged();
return this;
}
/**
*
* 权限
*
*
* repeated string entitlements = 5;
* @param value The bytes of the entitlements to add.
* @return This builder for chaining.
*/
public Builder addEntitlementsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureEntitlementsIsMutable();
entitlements_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList groups_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureGroupsIsMutable() {
if (!groups_.isModifiable()) {
groups_ = new com.google.protobuf.LazyStringArrayList(groups_);
}
bitField0_ |= 0x00000020;
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @return A list containing the groups.
*/
public com.google.protobuf.ProtocolStringList
getGroupsList() {
groups_.makeImmutable();
return groups_;
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @return The count of groups.
*/
public int getGroupsCount() {
return groups_.size();
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @param index The index of the element to return.
* @return The groups at the given index.
*/
public java.lang.String getGroups(int index) {
return groups_.get(index);
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @param index The index of the value to return.
* @return The bytes of the groups at the given index.
*/
public com.google.protobuf.ByteString
getGroupsBytes(int index) {
return groups_.getByteString(index);
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @param index The index to set the value at.
* @param value The groups to set.
* @return This builder for chaining.
*/
public Builder setGroups(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureGroupsIsMutable();
groups_.set(index, value);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @param value The groups to add.
* @return This builder for chaining.
*/
public Builder addGroups(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureGroupsIsMutable();
groups_.add(value);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @param values The groups to add.
* @return This builder for chaining.
*/
public Builder addAllGroups(
java.lang.Iterable values) {
ensureGroupsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, groups_);
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @return This builder for chaining.
*/
public Builder clearGroups() {
groups_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);;
onChanged();
return this;
}
/**
*
* 用户组
*
*
* repeated string groups = 6;
* @param value The bytes of the groups to add.
* @return This builder for chaining.
*/
public Builder addGroupsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureGroupsIsMutable();
groups_.add(value);
bitField0_ |= 0x00000020;
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:io.github.xezzon.geom.auth.JwtClaim)
}
// @@protoc_insertion_point(class_scope:io.github.xezzon.geom.auth.JwtClaim)
private static final io.github.xezzon.geom.auth.JwtClaim DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.github.xezzon.geom.auth.JwtClaim();
}
public static io.github.xezzon.geom.auth.JwtClaim getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public JwtClaim parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.github.xezzon.geom.auth.JwtClaim getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy