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

cosmos.staking.v1beta1.Authz Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: cosmos/staking/v1beta1/authz.proto

package cosmos.staking.v1beta1;

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

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * 
   * AuthorizationType defines the type of staking module authorization type
   * Since: cosmos-sdk 0.43
   * 
* * Protobuf enum {@code cosmos.staking.v1beta1.AuthorizationType} */ public enum AuthorizationType implements com.google.protobuf.ProtocolMessageEnum { /** *
     * AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type
     * 
* * AUTHORIZATION_TYPE_UNSPECIFIED = 0; */ AUTHORIZATION_TYPE_UNSPECIFIED(0), /** *
     * AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate
     * 
* * AUTHORIZATION_TYPE_DELEGATE = 1; */ AUTHORIZATION_TYPE_DELEGATE(1), /** *
     * AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate
     * 
* * AUTHORIZATION_TYPE_UNDELEGATE = 2; */ AUTHORIZATION_TYPE_UNDELEGATE(2), /** *
     * AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate
     * 
* * AUTHORIZATION_TYPE_REDELEGATE = 3; */ AUTHORIZATION_TYPE_REDELEGATE(3), UNRECOGNIZED(-1), ; /** *
     * AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type
     * 
* * AUTHORIZATION_TYPE_UNSPECIFIED = 0; */ public static final int AUTHORIZATION_TYPE_UNSPECIFIED_VALUE = 0; /** *
     * AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate
     * 
* * AUTHORIZATION_TYPE_DELEGATE = 1; */ public static final int AUTHORIZATION_TYPE_DELEGATE_VALUE = 1; /** *
     * AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate
     * 
* * AUTHORIZATION_TYPE_UNDELEGATE = 2; */ public static final int AUTHORIZATION_TYPE_UNDELEGATE_VALUE = 2; /** *
     * AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate
     * 
* * AUTHORIZATION_TYPE_REDELEGATE = 3; */ public static final int AUTHORIZATION_TYPE_REDELEGATE_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static AuthorizationType valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static AuthorizationType forNumber(int value) { switch (value) { case 0: return AUTHORIZATION_TYPE_UNSPECIFIED; case 1: return AUTHORIZATION_TYPE_DELEGATE; case 2: return AUTHORIZATION_TYPE_UNDELEGATE; case 3: return AUTHORIZATION_TYPE_REDELEGATE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< AuthorizationType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public AuthorizationType findValueByNumber(int number) { return AuthorizationType.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return cosmos.staking.v1beta1.Authz.getDescriptor().getEnumTypes().get(0); } private static final AuthorizationType[] VALUES = values(); public static AuthorizationType valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private AuthorizationType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:cosmos.staking.v1beta1.AuthorizationType) } public interface StakeAuthorizationOrBuilder extends // @@protoc_insertion_point(interface_extends:cosmos.staking.v1beta1.StakeAuthorization) com.google.protobuf.MessageOrBuilder { /** *
     * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
     * empty, there is no spend limit and any amount of coins can be delegated.
     * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; * @return Whether the maxTokens field is set. */ boolean hasMaxTokens(); /** *
     * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
     * empty, there is no spend limit and any amount of coins can be delegated.
     * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; * @return The maxTokens. */ cosmos.base.v1beta1.CoinOuterClass.Coin getMaxTokens(); /** *
     * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
     * empty, there is no spend limit and any amount of coins can be delegated.
     * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getMaxTokensOrBuilder(); /** *
     * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
     * account.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; * @return Whether the allowList field is set. */ boolean hasAllowList(); /** *
     * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
     * account.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; * @return The allowList. */ cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getAllowList(); /** *
     * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
     * account.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder getAllowListOrBuilder(); /** *
     * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; * @return Whether the denyList field is set. */ boolean hasDenyList(); /** *
     * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; * @return The denyList. */ cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getDenyList(); /** *
     * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder getDenyListOrBuilder(); /** *
     * authorization_type defines one of AuthorizationType.
     * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @return The enum numeric value on the wire for authorizationType. */ int getAuthorizationTypeValue(); /** *
     * authorization_type defines one of AuthorizationType.
     * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @return The authorizationType. */ cosmos.staking.v1beta1.Authz.AuthorizationType getAuthorizationType(); public cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsCase getValidatorsCase(); } /** *
   * StakeAuthorization defines authorization for delegate/undelegate/redelegate.
   * Since: cosmos-sdk 0.43
   * 
* * Protobuf type {@code cosmos.staking.v1beta1.StakeAuthorization} */ public static final class StakeAuthorization extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:cosmos.staking.v1beta1.StakeAuthorization) StakeAuthorizationOrBuilder { private static final long serialVersionUID = 0L; // Use StakeAuthorization.newBuilder() to construct. private StakeAuthorization(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StakeAuthorization() { authorizationType_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new StakeAuthorization(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private StakeAuthorization( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { cosmos.base.v1beta1.CoinOuterClass.Coin.Builder subBuilder = null; if (maxTokens_ != null) { subBuilder = maxTokens_.toBuilder(); } maxTokens_ = input.readMessage(cosmos.base.v1beta1.CoinOuterClass.Coin.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(maxTokens_); maxTokens_ = subBuilder.buildPartial(); } break; } case 18: { cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder subBuilder = null; if (validatorsCase_ == 2) { subBuilder = ((cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_).toBuilder(); } validators_ = input.readMessage(cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_); validators_ = subBuilder.buildPartial(); } validatorsCase_ = 2; break; } case 26: { cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder subBuilder = null; if (validatorsCase_ == 3) { subBuilder = ((cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_).toBuilder(); } validators_ = input.readMessage(cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_); validators_ = subBuilder.buildPartial(); } validatorsCase_ = 3; break; } case 32: { int rawValue = input.readEnum(); authorizationType_ = rawValue; 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 cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_fieldAccessorTable .ensureFieldAccessorsInitialized( cosmos.staking.v1beta1.Authz.StakeAuthorization.class, cosmos.staking.v1beta1.Authz.StakeAuthorization.Builder.class); } public interface ValidatorsOrBuilder extends // @@protoc_insertion_point(interface_extends:cosmos.staking.v1beta1.StakeAuthorization.Validators) com.google.protobuf.MessageOrBuilder { /** * repeated string address = 1; * @return A list containing the address. */ java.util.List getAddressList(); /** * repeated string address = 1; * @return The count of address. */ int getAddressCount(); /** * repeated string address = 1; * @param index The index of the element to return. * @return The address at the given index. */ java.lang.String getAddress(int index); /** * repeated string address = 1; * @param index The index of the value to return. * @return The bytes of the address at the given index. */ com.google.protobuf.ByteString getAddressBytes(int index); } /** *
     * Validators defines list of validator addresses.
     * 
* * Protobuf type {@code cosmos.staking.v1beta1.StakeAuthorization.Validators} */ public static final class Validators extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:cosmos.staking.v1beta1.StakeAuthorization.Validators) ValidatorsOrBuilder { private static final long serialVersionUID = 0L; // Use Validators.newBuilder() to construct. private Validators(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Validators() { address_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Validators(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Validators( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.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: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { address_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } address_.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)) { address_ = address_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_fieldAccessorTable .ensureFieldAccessorsInitialized( cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.class, cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder.class); } public static final int ADDRESS_FIELD_NUMBER = 1; private com.google.protobuf.LazyStringList address_; /** * repeated string address = 1; * @return A list containing the address. */ public com.google.protobuf.ProtocolStringList getAddressList() { return address_; } /** * repeated string address = 1; * @return The count of address. */ public int getAddressCount() { return address_.size(); } /** * repeated string address = 1; * @param index The index of the element to return. * @return The address at the given index. */ public java.lang.String getAddress(int index) { return address_.get(index); } /** * repeated string address = 1; * @param index The index of the value to return. * @return The bytes of the address at the given index. */ public com.google.protobuf.ByteString getAddressBytes(int index) { return address_.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 { for (int i = 0; i < address_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, address_.getRaw(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < address_.size(); i++) { dataSize += computeStringSizeNoTag(address_.getRaw(i)); } size += dataSize; size += 1 * getAddressList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators)) { return super.equals(obj); } cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators other = (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) obj; if (!getAddressList() .equals(other.getAddressList())) 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(); if (getAddressCount() > 0) { hash = (37 * hash) + ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getAddressList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators 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 cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators 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 cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators 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(cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators 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; } /** *
       * Validators defines list of validator addresses.
       * 
* * Protobuf type {@code cosmos.staking.v1beta1.StakeAuthorization.Validators} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cosmos.staking.v1beta1.StakeAuthorization.Validators) cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_fieldAccessorTable .ensureFieldAccessorsInitialized( cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.class, cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder.class); } // Construct using cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.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(); address_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_descriptor; } @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getDefaultInstanceForType() { return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators build() { cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators buildPartial() { cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators result = new cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { address_ = address_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.address_ = address_; 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 cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) { return mergeFrom((cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators other) { if (other == cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance()) return this; if (!other.address_.isEmpty()) { if (address_.isEmpty()) { address_ = other.address_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureAddressIsMutable(); address_.addAll(other.address_); } onChanged(); } 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 { cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.LazyStringList address_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureAddressIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { address_ = new com.google.protobuf.LazyStringArrayList(address_); bitField0_ |= 0x00000001; } } /** * repeated string address = 1; * @return A list containing the address. */ public com.google.protobuf.ProtocolStringList getAddressList() { return address_.getUnmodifiableView(); } /** * repeated string address = 1; * @return The count of address. */ public int getAddressCount() { return address_.size(); } /** * repeated string address = 1; * @param index The index of the element to return. * @return The address at the given index. */ public java.lang.String getAddress(int index) { return address_.get(index); } /** * repeated string address = 1; * @param index The index of the value to return. * @return The bytes of the address at the given index. */ public com.google.protobuf.ByteString getAddressBytes(int index) { return address_.getByteString(index); } /** * repeated string address = 1; * @param index The index to set the value at. * @param value The address to set. * @return This builder for chaining. */ public Builder setAddress( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAddressIsMutable(); address_.set(index, value); onChanged(); return this; } /** * repeated string address = 1; * @param value The address to add. * @return This builder for chaining. */ public Builder addAddress( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAddressIsMutable(); address_.add(value); onChanged(); return this; } /** * repeated string address = 1; * @param values The address to add. * @return This builder for chaining. */ public Builder addAllAddress( java.lang.Iterable values) { ensureAddressIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, address_); onChanged(); return this; } /** * repeated string address = 1; * @return This builder for chaining. */ public Builder clearAddress() { address_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * repeated string address = 1; * @param value The bytes of the address to add. * @return This builder for chaining. */ public Builder addAddressBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureAddressIsMutable(); address_.add(value); 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:cosmos.staking.v1beta1.StakeAuthorization.Validators) } // @@protoc_insertion_point(class_scope:cosmos.staking.v1beta1.StakeAuthorization.Validators) private static final cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators(); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Validators parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Validators(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 cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int validatorsCase_ = 0; private java.lang.Object validators_; public enum ValidatorsCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { ALLOW_LIST(2), DENY_LIST(3), VALIDATORS_NOT_SET(0); private final int value; private ValidatorsCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ValidatorsCase valueOf(int value) { return forNumber(value); } public static ValidatorsCase forNumber(int value) { switch (value) { case 2: return ALLOW_LIST; case 3: return DENY_LIST; case 0: return VALIDATORS_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ValidatorsCase getValidatorsCase() { return ValidatorsCase.forNumber( validatorsCase_); } public static final int MAX_TOKENS_FIELD_NUMBER = 1; private cosmos.base.v1beta1.CoinOuterClass.Coin maxTokens_; /** *
     * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
     * empty, there is no spend limit and any amount of coins can be delegated.
     * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; * @return Whether the maxTokens field is set. */ @java.lang.Override public boolean hasMaxTokens() { return maxTokens_ != null; } /** *
     * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
     * empty, there is no spend limit and any amount of coins can be delegated.
     * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; * @return The maxTokens. */ @java.lang.Override public cosmos.base.v1beta1.CoinOuterClass.Coin getMaxTokens() { return maxTokens_ == null ? cosmos.base.v1beta1.CoinOuterClass.Coin.getDefaultInstance() : maxTokens_; } /** *
     * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
     * empty, there is no spend limit and any amount of coins can be delegated.
     * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ @java.lang.Override public cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getMaxTokensOrBuilder() { return getMaxTokens(); } public static final int ALLOW_LIST_FIELD_NUMBER = 2; /** *
     * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
     * account.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; * @return Whether the allowList field is set. */ @java.lang.Override public boolean hasAllowList() { return validatorsCase_ == 2; } /** *
     * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
     * account.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; * @return The allowList. */ @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getAllowList() { if (validatorsCase_ == 2) { return (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_; } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } /** *
     * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
     * account.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder getAllowListOrBuilder() { if (validatorsCase_ == 2) { return (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_; } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } public static final int DENY_LIST_FIELD_NUMBER = 3; /** *
     * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; * @return Whether the denyList field is set. */ @java.lang.Override public boolean hasDenyList() { return validatorsCase_ == 3; } /** *
     * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; * @return The denyList. */ @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getDenyList() { if (validatorsCase_ == 3) { return (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_; } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } /** *
     * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
     * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder getDenyListOrBuilder() { if (validatorsCase_ == 3) { return (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_; } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } public static final int AUTHORIZATION_TYPE_FIELD_NUMBER = 4; private int authorizationType_; /** *
     * authorization_type defines one of AuthorizationType.
     * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @return The enum numeric value on the wire for authorizationType. */ @java.lang.Override public int getAuthorizationTypeValue() { return authorizationType_; } /** *
     * authorization_type defines one of AuthorizationType.
     * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @return The authorizationType. */ @java.lang.Override public cosmos.staking.v1beta1.Authz.AuthorizationType getAuthorizationType() { @SuppressWarnings("deprecation") cosmos.staking.v1beta1.Authz.AuthorizationType result = cosmos.staking.v1beta1.Authz.AuthorizationType.valueOf(authorizationType_); return result == null ? cosmos.staking.v1beta1.Authz.AuthorizationType.UNRECOGNIZED : result; } 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 (maxTokens_ != null) { output.writeMessage(1, getMaxTokens()); } if (validatorsCase_ == 2) { output.writeMessage(2, (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_); } if (validatorsCase_ == 3) { output.writeMessage(3, (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_); } if (authorizationType_ != cosmos.staking.v1beta1.Authz.AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(4, authorizationType_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (maxTokens_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getMaxTokens()); } if (validatorsCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_); } if (validatorsCase_ == 3) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_); } if (authorizationType_ != cosmos.staking.v1beta1.Authz.AuthorizationType.AUTHORIZATION_TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, authorizationType_); } 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 cosmos.staking.v1beta1.Authz.StakeAuthorization)) { return super.equals(obj); } cosmos.staking.v1beta1.Authz.StakeAuthorization other = (cosmos.staking.v1beta1.Authz.StakeAuthorization) obj; if (hasMaxTokens() != other.hasMaxTokens()) return false; if (hasMaxTokens()) { if (!getMaxTokens() .equals(other.getMaxTokens())) return false; } if (authorizationType_ != other.authorizationType_) return false; if (!getValidatorsCase().equals(other.getValidatorsCase())) return false; switch (validatorsCase_) { case 2: if (!getAllowList() .equals(other.getAllowList())) return false; break; case 3: if (!getDenyList() .equals(other.getDenyList())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasMaxTokens()) { hash = (37 * hash) + MAX_TOKENS_FIELD_NUMBER; hash = (53 * hash) + getMaxTokens().hashCode(); } hash = (37 * hash) + AUTHORIZATION_TYPE_FIELD_NUMBER; hash = (53 * hash) + authorizationType_; switch (validatorsCase_) { case 2: hash = (37 * hash) + ALLOW_LIST_FIELD_NUMBER; hash = (53 * hash) + getAllowList().hashCode(); break; case 3: hash = (37 * hash) + DENY_LIST_FIELD_NUMBER; hash = (53 * hash) + getDenyList().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static cosmos.staking.v1beta1.Authz.StakeAuthorization parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization 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 cosmos.staking.v1beta1.Authz.StakeAuthorization parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization 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 cosmos.staking.v1beta1.Authz.StakeAuthorization parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization 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(cosmos.staking.v1beta1.Authz.StakeAuthorization 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; } /** *
     * StakeAuthorization defines authorization for delegate/undelegate/redelegate.
     * Since: cosmos-sdk 0.43
     * 
* * Protobuf type {@code cosmos.staking.v1beta1.StakeAuthorization} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:cosmos.staking.v1beta1.StakeAuthorization) cosmos.staking.v1beta1.Authz.StakeAuthorizationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_fieldAccessorTable .ensureFieldAccessorsInitialized( cosmos.staking.v1beta1.Authz.StakeAuthorization.class, cosmos.staking.v1beta1.Authz.StakeAuthorization.Builder.class); } // Construct using cosmos.staking.v1beta1.Authz.StakeAuthorization.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(); if (maxTokensBuilder_ == null) { maxTokens_ = null; } else { maxTokens_ = null; maxTokensBuilder_ = null; } authorizationType_ = 0; validatorsCase_ = 0; validators_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return cosmos.staking.v1beta1.Authz.internal_static_cosmos_staking_v1beta1_StakeAuthorization_descriptor; } @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization getDefaultInstanceForType() { return cosmos.staking.v1beta1.Authz.StakeAuthorization.getDefaultInstance(); } @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization build() { cosmos.staking.v1beta1.Authz.StakeAuthorization result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization buildPartial() { cosmos.staking.v1beta1.Authz.StakeAuthorization result = new cosmos.staking.v1beta1.Authz.StakeAuthorization(this); if (maxTokensBuilder_ == null) { result.maxTokens_ = maxTokens_; } else { result.maxTokens_ = maxTokensBuilder_.build(); } if (validatorsCase_ == 2) { if (allowListBuilder_ == null) { result.validators_ = validators_; } else { result.validators_ = allowListBuilder_.build(); } } if (validatorsCase_ == 3) { if (denyListBuilder_ == null) { result.validators_ = validators_; } else { result.validators_ = denyListBuilder_.build(); } } result.authorizationType_ = authorizationType_; result.validatorsCase_ = validatorsCase_; 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 cosmos.staking.v1beta1.Authz.StakeAuthorization) { return mergeFrom((cosmos.staking.v1beta1.Authz.StakeAuthorization)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(cosmos.staking.v1beta1.Authz.StakeAuthorization other) { if (other == cosmos.staking.v1beta1.Authz.StakeAuthorization.getDefaultInstance()) return this; if (other.hasMaxTokens()) { mergeMaxTokens(other.getMaxTokens()); } if (other.authorizationType_ != 0) { setAuthorizationTypeValue(other.getAuthorizationTypeValue()); } switch (other.getValidatorsCase()) { case ALLOW_LIST: { mergeAllowList(other.getAllowList()); break; } case DENY_LIST: { mergeDenyList(other.getDenyList()); break; } case VALIDATORS_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { cosmos.staking.v1beta1.Authz.StakeAuthorization parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (cosmos.staking.v1beta1.Authz.StakeAuthorization) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int validatorsCase_ = 0; private java.lang.Object validators_; public ValidatorsCase getValidatorsCase() { return ValidatorsCase.forNumber( validatorsCase_); } public Builder clearValidators() { validatorsCase_ = 0; validators_ = null; onChanged(); return this; } private cosmos.base.v1beta1.CoinOuterClass.Coin maxTokens_; private com.google.protobuf.SingleFieldBuilderV3< cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder> maxTokensBuilder_; /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; * @return Whether the maxTokens field is set. */ public boolean hasMaxTokens() { return maxTokensBuilder_ != null || maxTokens_ != null; } /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; * @return The maxTokens. */ public cosmos.base.v1beta1.CoinOuterClass.Coin getMaxTokens() { if (maxTokensBuilder_ == null) { return maxTokens_ == null ? cosmos.base.v1beta1.CoinOuterClass.Coin.getDefaultInstance() : maxTokens_; } else { return maxTokensBuilder_.getMessage(); } } /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ public Builder setMaxTokens(cosmos.base.v1beta1.CoinOuterClass.Coin value) { if (maxTokensBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maxTokens_ = value; onChanged(); } else { maxTokensBuilder_.setMessage(value); } return this; } /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ public Builder setMaxTokens( cosmos.base.v1beta1.CoinOuterClass.Coin.Builder builderForValue) { if (maxTokensBuilder_ == null) { maxTokens_ = builderForValue.build(); onChanged(); } else { maxTokensBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ public Builder mergeMaxTokens(cosmos.base.v1beta1.CoinOuterClass.Coin value) { if (maxTokensBuilder_ == null) { if (maxTokens_ != null) { maxTokens_ = cosmos.base.v1beta1.CoinOuterClass.Coin.newBuilder(maxTokens_).mergeFrom(value).buildPartial(); } else { maxTokens_ = value; } onChanged(); } else { maxTokensBuilder_.mergeFrom(value); } return this; } /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ public Builder clearMaxTokens() { if (maxTokensBuilder_ == null) { maxTokens_ = null; onChanged(); } else { maxTokens_ = null; maxTokensBuilder_ = null; } return this; } /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ public cosmos.base.v1beta1.CoinOuterClass.Coin.Builder getMaxTokensBuilder() { onChanged(); return getMaxTokensFieldBuilder().getBuilder(); } /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ public cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder getMaxTokensOrBuilder() { if (maxTokensBuilder_ != null) { return maxTokensBuilder_.getMessageOrBuilder(); } else { return maxTokens_ == null ? cosmos.base.v1beta1.CoinOuterClass.Coin.getDefaultInstance() : maxTokens_; } } /** *
       * max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is
       * empty, there is no spend limit and any amount of coins can be delegated.
       * 
* * .cosmos.base.v1beta1.Coin max_tokens = 1 [(.gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; */ private com.google.protobuf.SingleFieldBuilderV3< cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder> getMaxTokensFieldBuilder() { if (maxTokensBuilder_ == null) { maxTokensBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< cosmos.base.v1beta1.CoinOuterClass.Coin, cosmos.base.v1beta1.CoinOuterClass.Coin.Builder, cosmos.base.v1beta1.CoinOuterClass.CoinOrBuilder>( getMaxTokens(), getParentForChildren(), isClean()); maxTokens_ = null; } return maxTokensBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators, cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder, cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder> allowListBuilder_; /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; * @return Whether the allowList field is set. */ @java.lang.Override public boolean hasAllowList() { return validatorsCase_ == 2; } /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; * @return The allowList. */ @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getAllowList() { if (allowListBuilder_ == null) { if (validatorsCase_ == 2) { return (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_; } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } else { if (validatorsCase_ == 2) { return allowListBuilder_.getMessage(); } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } } /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ public Builder setAllowList(cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators value) { if (allowListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } validators_ = value; onChanged(); } else { allowListBuilder_.setMessage(value); } validatorsCase_ = 2; return this; } /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ public Builder setAllowList( cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder builderForValue) { if (allowListBuilder_ == null) { validators_ = builderForValue.build(); onChanged(); } else { allowListBuilder_.setMessage(builderForValue.build()); } validatorsCase_ = 2; return this; } /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ public Builder mergeAllowList(cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators value) { if (allowListBuilder_ == null) { if (validatorsCase_ == 2 && validators_ != cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance()) { validators_ = cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.newBuilder((cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_) .mergeFrom(value).buildPartial(); } else { validators_ = value; } onChanged(); } else { if (validatorsCase_ == 2) { allowListBuilder_.mergeFrom(value); } allowListBuilder_.setMessage(value); } validatorsCase_ = 2; return this; } /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ public Builder clearAllowList() { if (allowListBuilder_ == null) { if (validatorsCase_ == 2) { validatorsCase_ = 0; validators_ = null; onChanged(); } } else { if (validatorsCase_ == 2) { validatorsCase_ = 0; validators_ = null; } allowListBuilder_.clear(); } return this; } /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder getAllowListBuilder() { return getAllowListFieldBuilder().getBuilder(); } /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder getAllowListOrBuilder() { if ((validatorsCase_ == 2) && (allowListBuilder_ != null)) { return allowListBuilder_.getMessageOrBuilder(); } else { if (validatorsCase_ == 2) { return (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_; } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } } /** *
       * allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's
       * account.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators allow_list = 2; */ private com.google.protobuf.SingleFieldBuilderV3< cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators, cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder, cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder> getAllowListFieldBuilder() { if (allowListBuilder_ == null) { if (!(validatorsCase_ == 2)) { validators_ = cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } allowListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators, cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder, cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder>( (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_, getParentForChildren(), isClean()); validators_ = null; } validatorsCase_ = 2; onChanged();; return allowListBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators, cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder, cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder> denyListBuilder_; /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; * @return Whether the denyList field is set. */ @java.lang.Override public boolean hasDenyList() { return validatorsCase_ == 3; } /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; * @return The denyList. */ @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators getDenyList() { if (denyListBuilder_ == null) { if (validatorsCase_ == 3) { return (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_; } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } else { if (validatorsCase_ == 3) { return denyListBuilder_.getMessage(); } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } } /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ public Builder setDenyList(cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators value) { if (denyListBuilder_ == null) { if (value == null) { throw new NullPointerException(); } validators_ = value; onChanged(); } else { denyListBuilder_.setMessage(value); } validatorsCase_ = 3; return this; } /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ public Builder setDenyList( cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder builderForValue) { if (denyListBuilder_ == null) { validators_ = builderForValue.build(); onChanged(); } else { denyListBuilder_.setMessage(builderForValue.build()); } validatorsCase_ = 3; return this; } /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ public Builder mergeDenyList(cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators value) { if (denyListBuilder_ == null) { if (validatorsCase_ == 3 && validators_ != cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance()) { validators_ = cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.newBuilder((cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_) .mergeFrom(value).buildPartial(); } else { validators_ = value; } onChanged(); } else { if (validatorsCase_ == 3) { denyListBuilder_.mergeFrom(value); } denyListBuilder_.setMessage(value); } validatorsCase_ = 3; return this; } /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ public Builder clearDenyList() { if (denyListBuilder_ == null) { if (validatorsCase_ == 3) { validatorsCase_ = 0; validators_ = null; onChanged(); } } else { if (validatorsCase_ == 3) { validatorsCase_ = 0; validators_ = null; } denyListBuilder_.clear(); } return this; } /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ public cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder getDenyListBuilder() { return getDenyListFieldBuilder().getBuilder(); } /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ @java.lang.Override public cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder getDenyListOrBuilder() { if ((validatorsCase_ == 3) && (denyListBuilder_ != null)) { return denyListBuilder_.getMessageOrBuilder(); } else { if (validatorsCase_ == 3) { return (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_; } return cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } } /** *
       * deny_list specifies list of validator addresses to whom grantee can not delegate tokens.
       * 
* * .cosmos.staking.v1beta1.StakeAuthorization.Validators deny_list = 3; */ private com.google.protobuf.SingleFieldBuilderV3< cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators, cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder, cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder> getDenyListFieldBuilder() { if (denyListBuilder_ == null) { if (!(validatorsCase_ == 3)) { validators_ = cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.getDefaultInstance(); } denyListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators, cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators.Builder, cosmos.staking.v1beta1.Authz.StakeAuthorization.ValidatorsOrBuilder>( (cosmos.staking.v1beta1.Authz.StakeAuthorization.Validators) validators_, getParentForChildren(), isClean()); validators_ = null; } validatorsCase_ = 3; onChanged();; return denyListBuilder_; } private int authorizationType_ = 0; /** *
       * authorization_type defines one of AuthorizationType.
       * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @return The enum numeric value on the wire for authorizationType. */ @java.lang.Override public int getAuthorizationTypeValue() { return authorizationType_; } /** *
       * authorization_type defines one of AuthorizationType.
       * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @param value The enum numeric value on the wire for authorizationType to set. * @return This builder for chaining. */ public Builder setAuthorizationTypeValue(int value) { authorizationType_ = value; onChanged(); return this; } /** *
       * authorization_type defines one of AuthorizationType.
       * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @return The authorizationType. */ @java.lang.Override public cosmos.staking.v1beta1.Authz.AuthorizationType getAuthorizationType() { @SuppressWarnings("deprecation") cosmos.staking.v1beta1.Authz.AuthorizationType result = cosmos.staking.v1beta1.Authz.AuthorizationType.valueOf(authorizationType_); return result == null ? cosmos.staking.v1beta1.Authz.AuthorizationType.UNRECOGNIZED : result; } /** *
       * authorization_type defines one of AuthorizationType.
       * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @param value The authorizationType to set. * @return This builder for chaining. */ public Builder setAuthorizationType(cosmos.staking.v1beta1.Authz.AuthorizationType value) { if (value == null) { throw new NullPointerException(); } authorizationType_ = value.getNumber(); onChanged(); return this; } /** *
       * authorization_type defines one of AuthorizationType.
       * 
* * .cosmos.staking.v1beta1.AuthorizationType authorization_type = 4; * @return This builder for chaining. */ public Builder clearAuthorizationType() { authorizationType_ = 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:cosmos.staking.v1beta1.StakeAuthorization) } // @@protoc_insertion_point(class_scope:cosmos.staking.v1beta1.StakeAuthorization) private static final cosmos.staking.v1beta1.Authz.StakeAuthorization DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new cosmos.staking.v1beta1.Authz.StakeAuthorization(); } public static cosmos.staking.v1beta1.Authz.StakeAuthorization getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StakeAuthorization parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new StakeAuthorization(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 cosmos.staking.v1beta1.Authz.StakeAuthorization getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_cosmos_staking_v1beta1_StakeAuthorization_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_cosmos_staking_v1beta1_StakeAuthorization_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\"cosmos/staking/v1beta1/authz.proto\022\026co" + "smos.staking.v1beta1\032\024gogoproto/gogo.pro" + "to\032\031cosmos_proto/cosmos.proto\032\036cosmos/ba" + "se/v1beta1/coin.proto\"\220\003\n\022StakeAuthoriza" + "tion\022Z\n\nmax_tokens\030\001 \001(\0132\031.cosmos.base.v" + "1beta1.CoinB+\252\337\037\'github.com/cosmos/cosmo" + "s-sdk/types.Coin\022K\n\nallow_list\030\002 \001(\01325.c" + "osmos.staking.v1beta1.StakeAuthorization" + ".ValidatorsH\000\022J\n\tdeny_list\030\003 \001(\01325.cosmo" + "s.staking.v1beta1.StakeAuthorization.Val" + "idatorsH\000\022E\n\022authorization_type\030\004 \001(\0162)." + "cosmos.staking.v1beta1.AuthorizationType" + "\032\035\n\nValidators\022\017\n\007address\030\001 \003(\t:\021\322\264-\rAut" + "horizationB\014\n\nvalidators*\236\001\n\021Authorizati" + "onType\022\"\n\036AUTHORIZATION_TYPE_UNSPECIFIED" + "\020\000\022\037\n\033AUTHORIZATION_TYPE_DELEGATE\020\001\022!\n\035A" + "UTHORIZATION_TYPE_UNDELEGATE\020\002\022!\n\035AUTHOR" + "IZATION_TYPE_REDELEGATE\020\003B.Z,github.com/" + "cosmos/cosmos-sdk/x/staking/typesb\006proto" + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.GoGoProtos.getDescriptor(), cosmos_proto.Cosmos.getDescriptor(), cosmos.base.v1beta1.CoinOuterClass.getDescriptor(), }); internal_static_cosmos_staking_v1beta1_StakeAuthorization_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_cosmos_staking_v1beta1_StakeAuthorization_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cosmos_staking_v1beta1_StakeAuthorization_descriptor, new java.lang.String[] { "MaxTokens", "AllowList", "DenyList", "AuthorizationType", "Validators", }); internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_descriptor = internal_static_cosmos_staking_v1beta1_StakeAuthorization_descriptor.getNestedTypes().get(0); internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_cosmos_staking_v1beta1_StakeAuthorization_Validators_descriptor, new java.lang.String[] { "Address", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(cosmos_proto.Cosmos.implementsInterface); registry.add(com.google.protobuf.GoGoProtos.castrepeated); com.google.protobuf.Descriptors.FileDescriptor .internalUpdateFileDescriptor(descriptor, registry); com.google.protobuf.GoGoProtos.getDescriptor(); cosmos_proto.Cosmos.getDescriptor(); cosmos.base.v1beta1.CoinOuterClass.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy