proto.perm.Genesis Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of irita-sdk Show documentation
Show all versions of irita-sdk Show documentation
Irita open alliance chain SDK (java)
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: perm/genesis.proto
package proto.perm;
public final class Genesis {
private Genesis() {}
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 GenesisStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:iritamod.perm.GenesisState)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
java.util.List
getRoleAccountsList();
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
RoleAccount getRoleAccounts(int index);
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
int getRoleAccountsCount();
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
java.util.List extends RoleAccountOrBuilder>
getRoleAccountsOrBuilderList();
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
RoleAccountOrBuilder getRoleAccountsOrBuilder(
int index);
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @return A list containing the blackList.
*/
java.util.List
getBlackListList();
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @return The count of blackList.
*/
int getBlackListCount();
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param index The index of the element to return.
* @return The blackList at the given index.
*/
String getBlackList(int index);
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param index The index of the value to return.
* @return The bytes of the blackList at the given index.
*/
com.google.protobuf.ByteString
getBlackListBytes(int index);
}
/**
*
* GenesisState defines the perm module's genesis state.
*
*
* Protobuf type {@code iritamod.perm.GenesisState}
*/
public static final class GenesisState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:iritamod.perm.GenesisState)
GenesisStateOrBuilder {
private static final long serialVersionUID = 0L;
// Use GenesisState.newBuilder() to construct.
private GenesisState(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GenesisState() {
roleAccounts_ = java.util.Collections.emptyList();
blackList_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@Override
@SuppressWarnings({"unused"})
protected Object newInstance(
UnusedPrivateParameter unused) {
return new GenesisState();
}
@Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GenesisState(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new NullPointerException();
}
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;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
roleAccounts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
roleAccounts_.add(
input.readMessage(RoleAccount.parser(), extensionRegistry));
break;
}
case 18: {
String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
blackList_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
blackList_.add(s);
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
roleAccounts_ = java.util.Collections.unmodifiableList(roleAccounts_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
blackList_ = blackList_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return Genesis.internal_static_iritamod_perm_GenesisState_descriptor;
}
@Override
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return Genesis.internal_static_iritamod_perm_GenesisState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
GenesisState.class, Builder.class);
}
public static final int ROLE_ACCOUNTS_FIELD_NUMBER = 1;
private java.util.List roleAccounts_;
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
@Override
public java.util.List getRoleAccountsList() {
return roleAccounts_;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
@Override
public java.util.List extends RoleAccountOrBuilder>
getRoleAccountsOrBuilderList() {
return roleAccounts_;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
@Override
public int getRoleAccountsCount() {
return roleAccounts_.size();
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
@Override
public RoleAccount getRoleAccounts(int index) {
return roleAccounts_.get(index);
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
@Override
public RoleAccountOrBuilder getRoleAccountsOrBuilder(
int index) {
return roleAccounts_.get(index);
}
public static final int BLACK_LIST_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList blackList_;
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @return A list containing the blackList.
*/
public com.google.protobuf.ProtocolStringList
getBlackListList() {
return blackList_;
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @return The count of blackList.
*/
public int getBlackListCount() {
return blackList_.size();
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param index The index of the element to return.
* @return The blackList at the given index.
*/
public String getBlackList(int index) {
return blackList_.get(index);
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param index The index of the value to return.
* @return The bytes of the blackList at the given index.
*/
public com.google.protobuf.ByteString
getBlackListBytes(int index) {
return blackList_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < roleAccounts_.size(); i++) {
output.writeMessage(1, roleAccounts_.get(i));
}
for (int i = 0; i < blackList_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, blackList_.getRaw(i));
}
unknownFields.writeTo(output);
}
@Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < roleAccounts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, roleAccounts_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < blackList_.size(); i++) {
dataSize += computeStringSizeNoTag(blackList_.getRaw(i));
}
size += dataSize;
size += 1 * getBlackListList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof GenesisState)) {
return super.equals(obj);
}
GenesisState other = (GenesisState) obj;
if (!getRoleAccountsList()
.equals(other.getRoleAccountsList())) return false;
if (!getBlackListList()
.equals(other.getBlackListList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getRoleAccountsCount() > 0) {
hash = (37 * hash) + ROLE_ACCOUNTS_FIELD_NUMBER;
hash = (53 * hash) + getRoleAccountsList().hashCode();
}
if (getBlackListCount() > 0) {
hash = (37 * hash) + BLACK_LIST_FIELD_NUMBER;
hash = (53 * hash) + getBlackListList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static GenesisState parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static GenesisState parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static GenesisState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static GenesisState parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static GenesisState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static GenesisState parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static GenesisState parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static GenesisState 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 GenesisState parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static GenesisState 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 GenesisState parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static GenesisState parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(GenesisState prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@Override
protected Builder newBuilderForType(
BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* GenesisState defines the perm module's genesis state.
*
*
* Protobuf type {@code iritamod.perm.GenesisState}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:iritamod.perm.GenesisState)
GenesisStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return Genesis.internal_static_iritamod_perm_GenesisState_descriptor;
}
@Override
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return Genesis.internal_static_iritamod_perm_GenesisState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
GenesisState.class, Builder.class);
}
// Construct using proto.perm.Genesis.GenesisState.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getRoleAccountsFieldBuilder();
}
}
@Override
public Builder clear() {
super.clear();
if (roleAccountsBuilder_ == null) {
roleAccounts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
roleAccountsBuilder_.clear();
}
blackList_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return Genesis.internal_static_iritamod_perm_GenesisState_descriptor;
}
@Override
public GenesisState getDefaultInstanceForType() {
return GenesisState.getDefaultInstance();
}
@Override
public GenesisState build() {
GenesisState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@Override
public GenesisState buildPartial() {
GenesisState result = new GenesisState(this);
int from_bitField0_ = bitField0_;
if (roleAccountsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
roleAccounts_ = java.util.Collections.unmodifiableList(roleAccounts_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.roleAccounts_ = roleAccounts_;
} else {
result.roleAccounts_ = roleAccountsBuilder_.build();
}
if (((bitField0_ & 0x00000002) != 0)) {
blackList_ = blackList_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.blackList_ = blackList_;
onBuilt();
return result;
}
@Override
public Builder clone() {
return super.clone();
}
@Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return super.setField(field, value);
}
@Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return super.setRepeatedField(field, index, value);
}
@Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return super.addRepeatedField(field, value);
}
@Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof GenesisState) {
return mergeFrom((GenesisState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(GenesisState other) {
if (other == GenesisState.getDefaultInstance()) return this;
if (roleAccountsBuilder_ == null) {
if (!other.roleAccounts_.isEmpty()) {
if (roleAccounts_.isEmpty()) {
roleAccounts_ = other.roleAccounts_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRoleAccountsIsMutable();
roleAccounts_.addAll(other.roleAccounts_);
}
onChanged();
}
} else {
if (!other.roleAccounts_.isEmpty()) {
if (roleAccountsBuilder_.isEmpty()) {
roleAccountsBuilder_.dispose();
roleAccountsBuilder_ = null;
roleAccounts_ = other.roleAccounts_;
bitField0_ = (bitField0_ & ~0x00000001);
roleAccountsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRoleAccountsFieldBuilder() : null;
} else {
roleAccountsBuilder_.addAllMessages(other.roleAccounts_);
}
}
}
if (!other.blackList_.isEmpty()) {
if (blackList_.isEmpty()) {
blackList_ = other.blackList_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureBlackListIsMutable();
blackList_.addAll(other.blackList_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@Override
public final boolean isInitialized() {
return true;
}
@Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
GenesisState parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (GenesisState) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List roleAccounts_ =
java.util.Collections.emptyList();
private void ensureRoleAccountsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
roleAccounts_ = new java.util.ArrayList(roleAccounts_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
RoleAccount, RoleAccount.Builder, RoleAccountOrBuilder> roleAccountsBuilder_;
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public java.util.List getRoleAccountsList() {
if (roleAccountsBuilder_ == null) {
return java.util.Collections.unmodifiableList(roleAccounts_);
} else {
return roleAccountsBuilder_.getMessageList();
}
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public int getRoleAccountsCount() {
if (roleAccountsBuilder_ == null) {
return roleAccounts_.size();
} else {
return roleAccountsBuilder_.getCount();
}
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public RoleAccount getRoleAccounts(int index) {
if (roleAccountsBuilder_ == null) {
return roleAccounts_.get(index);
} else {
return roleAccountsBuilder_.getMessage(index);
}
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder setRoleAccounts(
int index, RoleAccount value) {
if (roleAccountsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoleAccountsIsMutable();
roleAccounts_.set(index, value);
onChanged();
} else {
roleAccountsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder setRoleAccounts(
int index, RoleAccount.Builder builderForValue) {
if (roleAccountsBuilder_ == null) {
ensureRoleAccountsIsMutable();
roleAccounts_.set(index, builderForValue.build());
onChanged();
} else {
roleAccountsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder addRoleAccounts(RoleAccount value) {
if (roleAccountsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoleAccountsIsMutable();
roleAccounts_.add(value);
onChanged();
} else {
roleAccountsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder addRoleAccounts(
int index, RoleAccount value) {
if (roleAccountsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRoleAccountsIsMutable();
roleAccounts_.add(index, value);
onChanged();
} else {
roleAccountsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder addRoleAccounts(
RoleAccount.Builder builderForValue) {
if (roleAccountsBuilder_ == null) {
ensureRoleAccountsIsMutable();
roleAccounts_.add(builderForValue.build());
onChanged();
} else {
roleAccountsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder addRoleAccounts(
int index, RoleAccount.Builder builderForValue) {
if (roleAccountsBuilder_ == null) {
ensureRoleAccountsIsMutable();
roleAccounts_.add(index, builderForValue.build());
onChanged();
} else {
roleAccountsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder addAllRoleAccounts(
Iterable extends RoleAccount> values) {
if (roleAccountsBuilder_ == null) {
ensureRoleAccountsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, roleAccounts_);
onChanged();
} else {
roleAccountsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder clearRoleAccounts() {
if (roleAccountsBuilder_ == null) {
roleAccounts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
roleAccountsBuilder_.clear();
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public Builder removeRoleAccounts(int index) {
if (roleAccountsBuilder_ == null) {
ensureRoleAccountsIsMutable();
roleAccounts_.remove(index);
onChanged();
} else {
roleAccountsBuilder_.remove(index);
}
return this;
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public RoleAccount.Builder getRoleAccountsBuilder(
int index) {
return getRoleAccountsFieldBuilder().getBuilder(index);
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public RoleAccountOrBuilder getRoleAccountsOrBuilder(
int index) {
if (roleAccountsBuilder_ == null) {
return roleAccounts_.get(index); } else {
return roleAccountsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public java.util.List extends RoleAccountOrBuilder>
getRoleAccountsOrBuilderList() {
if (roleAccountsBuilder_ != null) {
return roleAccountsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(roleAccounts_);
}
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public RoleAccount.Builder addRoleAccountsBuilder() {
return getRoleAccountsFieldBuilder().addBuilder(
RoleAccount.getDefaultInstance());
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public RoleAccount.Builder addRoleAccountsBuilder(
int index) {
return getRoleAccountsFieldBuilder().addBuilder(
index, RoleAccount.getDefaultInstance());
}
/**
* repeated .iritamod.perm.RoleAccount role_accounts = 1 [(.gogoproto.nullable) = false, (.gogoproto.moretags) = "yaml:\"role_accounts\""];
*/
public java.util.List
getRoleAccountsBuilderList() {
return getRoleAccountsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
RoleAccount, RoleAccount.Builder, RoleAccountOrBuilder>
getRoleAccountsFieldBuilder() {
if (roleAccountsBuilder_ == null) {
roleAccountsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
RoleAccount, RoleAccount.Builder, RoleAccountOrBuilder>(
roleAccounts_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
roleAccounts_ = null;
}
return roleAccountsBuilder_;
}
private com.google.protobuf.LazyStringList blackList_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureBlackListIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
blackList_ = new com.google.protobuf.LazyStringArrayList(blackList_);
bitField0_ |= 0x00000002;
}
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @return A list containing the blackList.
*/
public com.google.protobuf.ProtocolStringList
getBlackListList() {
return blackList_.getUnmodifiableView();
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @return The count of blackList.
*/
public int getBlackListCount() {
return blackList_.size();
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param index The index of the element to return.
* @return The blackList at the given index.
*/
public String getBlackList(int index) {
return blackList_.get(index);
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param index The index of the value to return.
* @return The bytes of the blackList at the given index.
*/
public com.google.protobuf.ByteString
getBlackListBytes(int index) {
return blackList_.getByteString(index);
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param index The index to set the value at.
* @param value The blackList to set.
* @return This builder for chaining.
*/
public Builder setBlackList(
int index, String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBlackListIsMutable();
blackList_.set(index, value);
onChanged();
return this;
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param value The blackList to add.
* @return This builder for chaining.
*/
public Builder addBlackList(
String value) {
if (value == null) {
throw new NullPointerException();
}
ensureBlackListIsMutable();
blackList_.add(value);
onChanged();
return this;
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param values The blackList to add.
* @return This builder for chaining.
*/
public Builder addAllBlackList(
Iterable values) {
ensureBlackListIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, blackList_);
onChanged();
return this;
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @return This builder for chaining.
*/
public Builder clearBlackList() {
blackList_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* repeated string black_list = 2 [(.gogoproto.moretags) = "yaml:\"black_list\""];
* @param value The bytes of the blackList to add.
* @return This builder for chaining.
*/
public Builder addBlackListBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureBlackListIsMutable();
blackList_.add(value);
onChanged();
return this;
}
@Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:iritamod.perm.GenesisState)
}
// @@protoc_insertion_point(class_scope:iritamod.perm.GenesisState)
private static final GenesisState DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new GenesisState();
}
public static GenesisState getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@Override
public GenesisState parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new GenesisState(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@Override
public GenesisState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RoleAccountOrBuilder extends
// @@protoc_insertion_point(interface_extends:iritamod.perm.RoleAccount)
com.google.protobuf.MessageOrBuilder {
/**
* string address = 1;
* @return The address.
*/
String getAddress();
/**
* string address = 1;
* @return The bytes for address.
*/
com.google.protobuf.ByteString
getAddressBytes();
/**
* repeated .iritamod.perm.Role roles = 2;
* @return A list containing the roles.
*/
java.util.List getRolesList();
/**
* repeated .iritamod.perm.Role roles = 2;
* @return The count of roles.
*/
int getRolesCount();
/**
* repeated .iritamod.perm.Role roles = 2;
* @param index The index of the element to return.
* @return The roles at the given index.
*/
Perm.Role getRoles(int index);
/**
* repeated .iritamod.perm.Role roles = 2;
* @return A list containing the enum numeric values on the wire for roles.
*/
java.util.List
getRolesValueList();
/**
* repeated .iritamod.perm.Role roles = 2;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of roles at the given index.
*/
int getRolesValue(int index);
}
/**
*
* RoleAccount represents an account with roles.
*
*
* Protobuf type {@code iritamod.perm.RoleAccount}
*/
public static final class RoleAccount extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:iritamod.perm.RoleAccount)
RoleAccountOrBuilder {
private static final long serialVersionUID = 0L;
// Use RoleAccount.newBuilder() to construct.
private RoleAccount(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RoleAccount() {
address_ = "";
roles_ = java.util.Collections.emptyList();
}
@Override
@SuppressWarnings({"unused"})
protected Object newInstance(
UnusedPrivateParameter unused) {
return new RoleAccount();
}
@Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RoleAccount(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new NullPointerException();
}
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;
case 10: {
String s = input.readStringRequireUtf8();
address_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
roles_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
roles_.add(rawValue);
break;
}
case 18: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
roles_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
roles_.add(rawValue);
}
input.popLimit(oldLimit);
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
roles_ = java.util.Collections.unmodifiableList(roles_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return Genesis.internal_static_iritamod_perm_RoleAccount_descriptor;
}
@Override
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return Genesis.internal_static_iritamod_perm_RoleAccount_fieldAccessorTable
.ensureFieldAccessorsInitialized(
RoleAccount.class, Builder.class);
}
public static final int ADDRESS_FIELD_NUMBER = 1;
private volatile Object address_;
/**
* string address = 1;
* @return The address.
*/
@Override
public String getAddress() {
Object ref = address_;
if (ref instanceof String) {
return (String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
address_ = s;
return s;
}
}
/**
* string address = 1;
* @return The bytes for address.
*/
@Override
public com.google.protobuf.ByteString
getAddressBytes() {
Object ref = address_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROLES_FIELD_NUMBER = 2;
private java.util.List roles_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
Integer, Perm.Role> roles_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
Integer, Perm.Role>() {
public Perm.Role convert(Integer from) {
@SuppressWarnings("deprecation")
Perm.Role result = Perm.Role.valueOf(from);
return result == null ? Perm.Role.UNRECOGNIZED : result;
}
};
/**
* repeated .iritamod.perm.Role roles = 2;
* @return A list containing the roles.
*/
@Override
public java.util.List getRolesList() {
return new com.google.protobuf.Internal.ListAdapter<
Integer, Perm.Role>(roles_, roles_converter_);
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @return The count of roles.
*/
@Override
public int getRolesCount() {
return roles_.size();
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param index The index of the element to return.
* @return The roles at the given index.
*/
@Override
public Perm.Role getRoles(int index) {
return roles_converter_.convert(roles_.get(index));
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @return A list containing the enum numeric values on the wire for roles.
*/
@Override
public java.util.List
getRolesValueList() {
return roles_;
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of roles at the given index.
*/
@Override
public int getRolesValue(int index) {
return roles_.get(index);
}
private int rolesMemoizedSerializedSize;
private byte memoizedIsInitialized = -1;
@Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getAddressBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_);
}
if (getRolesList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(rolesMemoizedSerializedSize);
}
for (int i = 0; i < roles_.size(); i++) {
output.writeEnumNoTag(roles_.get(i));
}
unknownFields.writeTo(output);
}
@Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getAddressBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, address_);
}
{
int dataSize = 0;
for (int i = 0; i < roles_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(roles_.get(i));
}
size += dataSize;
if (!getRolesList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}rolesMemoizedSerializedSize = dataSize;
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@Override
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof RoleAccount)) {
return super.equals(obj);
}
RoleAccount other = (RoleAccount) obj;
if (!getAddress()
.equals(other.getAddress())) return false;
if (!roles_.equals(other.roles_)) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getAddress().hashCode();
if (getRolesCount() > 0) {
hash = (37 * hash) + ROLES_FIELD_NUMBER;
hash = (53 * hash) + roles_.hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static RoleAccount parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static RoleAccount parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static RoleAccount parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static RoleAccount parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static RoleAccount parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static RoleAccount parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static RoleAccount parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static RoleAccount 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 RoleAccount parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static RoleAccount 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 RoleAccount parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static RoleAccount parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(RoleAccount prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@Override
protected Builder newBuilderForType(
BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* RoleAccount represents an account with roles.
*
*
* Protobuf type {@code iritamod.perm.RoleAccount}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:iritamod.perm.RoleAccount)
RoleAccountOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return Genesis.internal_static_iritamod_perm_RoleAccount_descriptor;
}
@Override
protected FieldAccessorTable
internalGetFieldAccessorTable() {
return Genesis.internal_static_iritamod_perm_RoleAccount_fieldAccessorTable
.ensureFieldAccessorsInitialized(
RoleAccount.class, Builder.class);
}
// Construct using proto.perm.Genesis.RoleAccount.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@Override
public Builder clear() {
super.clear();
address_ = "";
roles_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return Genesis.internal_static_iritamod_perm_RoleAccount_descriptor;
}
@Override
public RoleAccount getDefaultInstanceForType() {
return RoleAccount.getDefaultInstance();
}
@Override
public RoleAccount build() {
RoleAccount result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@Override
public RoleAccount buildPartial() {
RoleAccount result = new RoleAccount(this);
int from_bitField0_ = bitField0_;
result.address_ = address_;
if (((bitField0_ & 0x00000001) != 0)) {
roles_ = java.util.Collections.unmodifiableList(roles_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.roles_ = roles_;
onBuilt();
return result;
}
@Override
public Builder clone() {
return super.clone();
}
@Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return super.setField(field, value);
}
@Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return super.setRepeatedField(field, index, value);
}
@Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return super.addRepeatedField(field, value);
}
@Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof RoleAccount) {
return mergeFrom((RoleAccount)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(RoleAccount other) {
if (other == RoleAccount.getDefaultInstance()) return this;
if (!other.getAddress().isEmpty()) {
address_ = other.address_;
onChanged();
}
if (!other.roles_.isEmpty()) {
if (roles_.isEmpty()) {
roles_ = other.roles_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRolesIsMutable();
roles_.addAll(other.roles_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@Override
public final boolean isInitialized() {
return true;
}
@Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
RoleAccount parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (RoleAccount) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private Object address_ = "";
/**
* string address = 1;
* @return The address.
*/
public String getAddress() {
Object ref = address_;
if (!(ref instanceof String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
String s = bs.toStringUtf8();
address_ = s;
return s;
} else {
return (String) ref;
}
}
/**
* string address = 1;
* @return The bytes for address.
*/
public com.google.protobuf.ByteString
getAddressBytes() {
Object ref = address_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string address = 1;
* @param value The address to set.
* @return This builder for chaining.
*/
public Builder setAddress(
String value) {
if (value == null) {
throw new NullPointerException();
}
address_ = value;
onChanged();
return this;
}
/**
* string address = 1;
* @return This builder for chaining.
*/
public Builder clearAddress() {
address_ = getDefaultInstance().getAddress();
onChanged();
return this;
}
/**
* string address = 1;
* @param value The bytes for address to set.
* @return This builder for chaining.
*/
public Builder setAddressBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
address_ = value;
onChanged();
return this;
}
private java.util.List roles_ =
java.util.Collections.emptyList();
private void ensureRolesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
roles_ = new java.util.ArrayList(roles_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @return A list containing the roles.
*/
public java.util.List getRolesList() {
return new com.google.protobuf.Internal.ListAdapter<
Integer, Perm.Role>(roles_, roles_converter_);
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @return The count of roles.
*/
public int getRolesCount() {
return roles_.size();
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param index The index of the element to return.
* @return The roles at the given index.
*/
public Perm.Role getRoles(int index) {
return roles_converter_.convert(roles_.get(index));
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @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, Perm.Role value) {
if (value == null) {
throw new NullPointerException();
}
ensureRolesIsMutable();
roles_.set(index, value.getNumber());
onChanged();
return this;
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param value The roles to add.
* @return This builder for chaining.
*/
public Builder addRoles(Perm.Role value) {
if (value == null) {
throw new NullPointerException();
}
ensureRolesIsMutable();
roles_.add(value.getNumber());
onChanged();
return this;
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param values The roles to add.
* @return This builder for chaining.
*/
public Builder addAllRoles(
Iterable extends Perm.Role> values) {
ensureRolesIsMutable();
for (Perm.Role value : values) {
roles_.add(value.getNumber());
}
onChanged();
return this;
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @return This builder for chaining.
*/
public Builder clearRoles() {
roles_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @return A list containing the enum numeric values on the wire for roles.
*/
public java.util.List
getRolesValueList() {
return java.util.Collections.unmodifiableList(roles_);
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of roles at the given index.
*/
public int getRolesValue(int index) {
return roles_.get(index);
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of roles at the given index.
* @return This builder for chaining.
*/
public Builder setRolesValue(
int index, int value) {
ensureRolesIsMutable();
roles_.set(index, value);
onChanged();
return this;
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param value The enum numeric value on the wire for roles to add.
* @return This builder for chaining.
*/
public Builder addRolesValue(int value) {
ensureRolesIsMutable();
roles_.add(value);
onChanged();
return this;
}
/**
* repeated .iritamod.perm.Role roles = 2;
* @param values The enum numeric values on the wire for roles to add.
* @return This builder for chaining.
*/
public Builder addAllRolesValue(
Iterable values) {
ensureRolesIsMutable();
for (int value : values) {
roles_.add(value);
}
onChanged();
return this;
}
@Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:iritamod.perm.RoleAccount)
}
// @@protoc_insertion_point(class_scope:iritamod.perm.RoleAccount)
private static final RoleAccount DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new RoleAccount();
}
public static RoleAccount getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@Override
public RoleAccount parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RoleAccount(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@Override
public RoleAccount getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_iritamod_perm_GenesisState_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_iritamod_perm_GenesisState_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_iritamod_perm_RoleAccount_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_iritamod_perm_RoleAccount_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
String[] descriptorData = {
"\n\022perm/genesis.proto\022\riritamod.perm\032\017per" +
"m/perm.proto\032\024gogoproto/gogo.proto\"\212\001\n\014G" +
"enesisState\022O\n\rrole_accounts\030\001 \003(\0132\032.iri" +
"tamod.perm.RoleAccountB\034\362\336\037\024yaml:\"role_a" +
"ccounts\"\310\336\037\000\022)\n\nblack_list\030\002 \003(\tB\025\362\336\037\021ya" +
"ml:\"black_list\"\"B\n\013RoleAccount\022\017\n\007addres" +
"s\030\001 \001(\t\022\"\n\005roles\030\002 \003(\0162\023.iritamod.perm.R" +
"oleB\014\n\nproto.permb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
Perm.getDescriptor(),
com.google.protobuf.GoGoProtos.getDescriptor(),
});
internal_static_iritamod_perm_GenesisState_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_iritamod_perm_GenesisState_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_iritamod_perm_GenesisState_descriptor,
new String[] { "RoleAccounts", "BlackList", });
internal_static_iritamod_perm_RoleAccount_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_iritamod_perm_RoleAccount_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_iritamod_perm_RoleAccount_descriptor,
new String[] { "Address", "Roles", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(com.google.protobuf.GoGoProtos.moretags);
registry.add(com.google.protobuf.GoGoProtos.nullable);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
Perm.getDescriptor();
com.google.protobuf.GoGoProtos.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}