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

com.hederahashgraph.api.proto.java.CustomFee Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: custom_fees.proto

package com.hederahashgraph.api.proto.java;

/**
 * 
 **
 * A transfer fee to assess during a CryptoTransfer that transfers units of the token to which the
 * fee is attached. A custom fee may be either fixed or fractional, and must specify a fee collector
 * account to receive the assessed fees. Only positive fees may be assessed.
 * 
* * Protobuf type {@code proto.CustomFee} */ public final class CustomFee extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:proto.CustomFee) CustomFeeOrBuilder { private static final long serialVersionUID = 0L; // Use CustomFee.newBuilder() to construct. private CustomFee(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private CustomFee() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new CustomFee(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private CustomFee( 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: { com.hederahashgraph.api.proto.java.FixedFee.Builder subBuilder = null; if (feeCase_ == 1) { subBuilder = ((com.hederahashgraph.api.proto.java.FixedFee) fee_).toBuilder(); } fee_ = input.readMessage(com.hederahashgraph.api.proto.java.FixedFee.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.FixedFee) fee_); fee_ = subBuilder.buildPartial(); } feeCase_ = 1; break; } case 18: { com.hederahashgraph.api.proto.java.FractionalFee.Builder subBuilder = null; if (feeCase_ == 2) { subBuilder = ((com.hederahashgraph.api.proto.java.FractionalFee) fee_).toBuilder(); } fee_ = input.readMessage(com.hederahashgraph.api.proto.java.FractionalFee.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.FractionalFee) fee_); fee_ = subBuilder.buildPartial(); } feeCase_ = 2; break; } case 26: { com.hederahashgraph.api.proto.java.AccountID.Builder subBuilder = null; if (feeCollectorAccountId_ != null) { subBuilder = feeCollectorAccountId_.toBuilder(); } feeCollectorAccountId_ = input.readMessage(com.hederahashgraph.api.proto.java.AccountID.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(feeCollectorAccountId_); feeCollectorAccountId_ = subBuilder.buildPartial(); } break; } case 34: { com.hederahashgraph.api.proto.java.RoyaltyFee.Builder subBuilder = null; if (feeCase_ == 4) { subBuilder = ((com.hederahashgraph.api.proto.java.RoyaltyFee) fee_).toBuilder(); } fee_ = input.readMessage(com.hederahashgraph.api.proto.java.RoyaltyFee.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.hederahashgraph.api.proto.java.RoyaltyFee) fee_); fee_ = subBuilder.buildPartial(); } feeCase_ = 4; break; } case 40: { allCollectorsAreExempt_ = input.readBool(); 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 com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_CustomFee_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_CustomFee_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.CustomFee.class, com.hederahashgraph.api.proto.java.CustomFee.Builder.class); } private int feeCase_ = 0; private java.lang.Object fee_; public enum FeeCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { FIXED_FEE(1), FRACTIONAL_FEE(2), ROYALTY_FEE(4), FEE_NOT_SET(0); private final int value; private FeeCase(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 FeeCase valueOf(int value) { return forNumber(value); } public static FeeCase forNumber(int value) { switch (value) { case 1: return FIXED_FEE; case 2: return FRACTIONAL_FEE; case 4: return ROYALTY_FEE; case 0: return FEE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public FeeCase getFeeCase() { return FeeCase.forNumber( feeCase_); } public static final int FIXED_FEE_FIELD_NUMBER = 1; /** *
   **
   * Fixed fee to be charged
   * 
* * .proto.FixedFee fixed_fee = 1; * @return Whether the fixedFee field is set. */ @java.lang.Override public boolean hasFixedFee() { return feeCase_ == 1; } /** *
   **
   * Fixed fee to be charged
   * 
* * .proto.FixedFee fixed_fee = 1; * @return The fixedFee. */ @java.lang.Override public com.hederahashgraph.api.proto.java.FixedFee getFixedFee() { if (feeCase_ == 1) { return (com.hederahashgraph.api.proto.java.FixedFee) fee_; } return com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance(); } /** *
   **
   * Fixed fee to be charged
   * 
* * .proto.FixedFee fixed_fee = 1; */ @java.lang.Override public com.hederahashgraph.api.proto.java.FixedFeeOrBuilder getFixedFeeOrBuilder() { if (feeCase_ == 1) { return (com.hederahashgraph.api.proto.java.FixedFee) fee_; } return com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance(); } public static final int FRACTIONAL_FEE_FIELD_NUMBER = 2; /** *
   **
   * Fractional fee to be charged
   * 
* * .proto.FractionalFee fractional_fee = 2; * @return Whether the fractionalFee field is set. */ @java.lang.Override public boolean hasFractionalFee() { return feeCase_ == 2; } /** *
   **
   * Fractional fee to be charged
   * 
* * .proto.FractionalFee fractional_fee = 2; * @return The fractionalFee. */ @java.lang.Override public com.hederahashgraph.api.proto.java.FractionalFee getFractionalFee() { if (feeCase_ == 2) { return (com.hederahashgraph.api.proto.java.FractionalFee) fee_; } return com.hederahashgraph.api.proto.java.FractionalFee.getDefaultInstance(); } /** *
   **
   * Fractional fee to be charged
   * 
* * .proto.FractionalFee fractional_fee = 2; */ @java.lang.Override public com.hederahashgraph.api.proto.java.FractionalFeeOrBuilder getFractionalFeeOrBuilder() { if (feeCase_ == 2) { return (com.hederahashgraph.api.proto.java.FractionalFee) fee_; } return com.hederahashgraph.api.proto.java.FractionalFee.getDefaultInstance(); } public static final int ROYALTY_FEE_FIELD_NUMBER = 4; /** *
   **
   * Royalty fee to be charged
   * 
* * .proto.RoyaltyFee royalty_fee = 4; * @return Whether the royaltyFee field is set. */ @java.lang.Override public boolean hasRoyaltyFee() { return feeCase_ == 4; } /** *
   **
   * Royalty fee to be charged
   * 
* * .proto.RoyaltyFee royalty_fee = 4; * @return The royaltyFee. */ @java.lang.Override public com.hederahashgraph.api.proto.java.RoyaltyFee getRoyaltyFee() { if (feeCase_ == 4) { return (com.hederahashgraph.api.proto.java.RoyaltyFee) fee_; } return com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance(); } /** *
   **
   * Royalty fee to be charged
   * 
* * .proto.RoyaltyFee royalty_fee = 4; */ @java.lang.Override public com.hederahashgraph.api.proto.java.RoyaltyFeeOrBuilder getRoyaltyFeeOrBuilder() { if (feeCase_ == 4) { return (com.hederahashgraph.api.proto.java.RoyaltyFee) fee_; } return com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance(); } public static final int FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER = 3; private com.hederahashgraph.api.proto.java.AccountID feeCollectorAccountId_; /** *
   **
   * The account to receive the custom fee
   * 
* * .proto.AccountID fee_collector_account_id = 3; * @return Whether the feeCollectorAccountId field is set. */ @java.lang.Override public boolean hasFeeCollectorAccountId() { return feeCollectorAccountId_ != null; } /** *
   **
   * The account to receive the custom fee
   * 
* * .proto.AccountID fee_collector_account_id = 3; * @return The feeCollectorAccountId. */ @java.lang.Override public com.hederahashgraph.api.proto.java.AccountID getFeeCollectorAccountId() { return feeCollectorAccountId_ == null ? com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : feeCollectorAccountId_; } /** *
   **
   * The account to receive the custom fee
   * 
* * .proto.AccountID fee_collector_account_id = 3; */ @java.lang.Override public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getFeeCollectorAccountIdOrBuilder() { return getFeeCollectorAccountId(); } public static final int ALL_COLLECTORS_ARE_EXEMPT_FIELD_NUMBER = 5; private boolean allCollectorsAreExempt_; /** *
   **
   * If true, exempts all the token's fee collection accounts from this fee.
   * (The token's treasury and the above fee_collector_account_id will always
   * be exempt. Please see <a href="https://hips.hedera.com/hip/hip-573">HIP-573</a> 
   * for details.)
   * 
* * bool all_collectors_are_exempt = 5; * @return The allCollectorsAreExempt. */ @java.lang.Override public boolean getAllCollectorsAreExempt() { return allCollectorsAreExempt_; } 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 (feeCase_ == 1) { output.writeMessage(1, (com.hederahashgraph.api.proto.java.FixedFee) fee_); } if (feeCase_ == 2) { output.writeMessage(2, (com.hederahashgraph.api.proto.java.FractionalFee) fee_); } if (feeCollectorAccountId_ != null) { output.writeMessage(3, getFeeCollectorAccountId()); } if (feeCase_ == 4) { output.writeMessage(4, (com.hederahashgraph.api.proto.java.RoyaltyFee) fee_); } if (allCollectorsAreExempt_ != false) { output.writeBool(5, allCollectorsAreExempt_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (feeCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, (com.hederahashgraph.api.proto.java.FixedFee) fee_); } if (feeCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.hederahashgraph.api.proto.java.FractionalFee) fee_); } if (feeCollectorAccountId_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getFeeCollectorAccountId()); } if (feeCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (com.hederahashgraph.api.proto.java.RoyaltyFee) fee_); } if (allCollectorsAreExempt_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, allCollectorsAreExempt_); } 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 com.hederahashgraph.api.proto.java.CustomFee)) { return super.equals(obj); } com.hederahashgraph.api.proto.java.CustomFee other = (com.hederahashgraph.api.proto.java.CustomFee) obj; if (hasFeeCollectorAccountId() != other.hasFeeCollectorAccountId()) return false; if (hasFeeCollectorAccountId()) { if (!getFeeCollectorAccountId() .equals(other.getFeeCollectorAccountId())) return false; } if (getAllCollectorsAreExempt() != other.getAllCollectorsAreExempt()) return false; if (!getFeeCase().equals(other.getFeeCase())) return false; switch (feeCase_) { case 1: if (!getFixedFee() .equals(other.getFixedFee())) return false; break; case 2: if (!getFractionalFee() .equals(other.getFractionalFee())) return false; break; case 4: if (!getRoyaltyFee() .equals(other.getRoyaltyFee())) 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 (hasFeeCollectorAccountId()) { hash = (37 * hash) + FEE_COLLECTOR_ACCOUNT_ID_FIELD_NUMBER; hash = (53 * hash) + getFeeCollectorAccountId().hashCode(); } hash = (37 * hash) + ALL_COLLECTORS_ARE_EXEMPT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getAllCollectorsAreExempt()); switch (feeCase_) { case 1: hash = (37 * hash) + FIXED_FEE_FIELD_NUMBER; hash = (53 * hash) + getFixedFee().hashCode(); break; case 2: hash = (37 * hash) + FRACTIONAL_FEE_FIELD_NUMBER; hash = (53 * hash) + getFractionalFee().hashCode(); break; case 4: hash = (37 * hash) + ROYALTY_FEE_FIELD_NUMBER; hash = (53 * hash) + getRoyaltyFee().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.hederahashgraph.api.proto.java.CustomFee parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.CustomFee parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.CustomFee parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.CustomFee parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.CustomFee parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hederahashgraph.api.proto.java.CustomFee parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.hederahashgraph.api.proto.java.CustomFee parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.CustomFee 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 com.hederahashgraph.api.proto.java.CustomFee parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.CustomFee 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 com.hederahashgraph.api.proto.java.CustomFee parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hederahashgraph.api.proto.java.CustomFee 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(com.hederahashgraph.api.proto.java.CustomFee 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; } /** *
   **
   * A transfer fee to assess during a CryptoTransfer that transfers units of the token to which the
   * fee is attached. A custom fee may be either fixed or fractional, and must specify a fee collector
   * account to receive the assessed fees. Only positive fees may be assessed.
   * 
* * Protobuf type {@code proto.CustomFee} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:proto.CustomFee) com.hederahashgraph.api.proto.java.CustomFeeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_CustomFee_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_CustomFee_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hederahashgraph.api.proto.java.CustomFee.class, com.hederahashgraph.api.proto.java.CustomFee.Builder.class); } // Construct using com.hederahashgraph.api.proto.java.CustomFee.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 (feeCollectorAccountIdBuilder_ == null) { feeCollectorAccountId_ = null; } else { feeCollectorAccountId_ = null; feeCollectorAccountIdBuilder_ = null; } allCollectorsAreExempt_ = false; feeCase_ = 0; fee_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_CustomFee_descriptor; } @java.lang.Override public com.hederahashgraph.api.proto.java.CustomFee getDefaultInstanceForType() { return com.hederahashgraph.api.proto.java.CustomFee.getDefaultInstance(); } @java.lang.Override public com.hederahashgraph.api.proto.java.CustomFee build() { com.hederahashgraph.api.proto.java.CustomFee result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hederahashgraph.api.proto.java.CustomFee buildPartial() { com.hederahashgraph.api.proto.java.CustomFee result = new com.hederahashgraph.api.proto.java.CustomFee(this); if (feeCase_ == 1) { if (fixedFeeBuilder_ == null) { result.fee_ = fee_; } else { result.fee_ = fixedFeeBuilder_.build(); } } if (feeCase_ == 2) { if (fractionalFeeBuilder_ == null) { result.fee_ = fee_; } else { result.fee_ = fractionalFeeBuilder_.build(); } } if (feeCase_ == 4) { if (royaltyFeeBuilder_ == null) { result.fee_ = fee_; } else { result.fee_ = royaltyFeeBuilder_.build(); } } if (feeCollectorAccountIdBuilder_ == null) { result.feeCollectorAccountId_ = feeCollectorAccountId_; } else { result.feeCollectorAccountId_ = feeCollectorAccountIdBuilder_.build(); } result.allCollectorsAreExempt_ = allCollectorsAreExempt_; result.feeCase_ = feeCase_; 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 com.hederahashgraph.api.proto.java.CustomFee) { return mergeFrom((com.hederahashgraph.api.proto.java.CustomFee)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hederahashgraph.api.proto.java.CustomFee other) { if (other == com.hederahashgraph.api.proto.java.CustomFee.getDefaultInstance()) return this; if (other.hasFeeCollectorAccountId()) { mergeFeeCollectorAccountId(other.getFeeCollectorAccountId()); } if (other.getAllCollectorsAreExempt() != false) { setAllCollectorsAreExempt(other.getAllCollectorsAreExempt()); } switch (other.getFeeCase()) { case FIXED_FEE: { mergeFixedFee(other.getFixedFee()); break; } case FRACTIONAL_FEE: { mergeFractionalFee(other.getFractionalFee()); break; } case ROYALTY_FEE: { mergeRoyaltyFee(other.getRoyaltyFee()); break; } case FEE_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 { com.hederahashgraph.api.proto.java.CustomFee parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.hederahashgraph.api.proto.java.CustomFee) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int feeCase_ = 0; private java.lang.Object fee_; public FeeCase getFeeCase() { return FeeCase.forNumber( feeCase_); } public Builder clearFee() { feeCase_ = 0; fee_ = null; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.FixedFee, com.hederahashgraph.api.proto.java.FixedFee.Builder, com.hederahashgraph.api.proto.java.FixedFeeOrBuilder> fixedFeeBuilder_; /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; * @return Whether the fixedFee field is set. */ @java.lang.Override public boolean hasFixedFee() { return feeCase_ == 1; } /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; * @return The fixedFee. */ @java.lang.Override public com.hederahashgraph.api.proto.java.FixedFee getFixedFee() { if (fixedFeeBuilder_ == null) { if (feeCase_ == 1) { return (com.hederahashgraph.api.proto.java.FixedFee) fee_; } return com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance(); } else { if (feeCase_ == 1) { return fixedFeeBuilder_.getMessage(); } return com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance(); } } /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; */ public Builder setFixedFee(com.hederahashgraph.api.proto.java.FixedFee value) { if (fixedFeeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fee_ = value; onChanged(); } else { fixedFeeBuilder_.setMessage(value); } feeCase_ = 1; return this; } /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; */ public Builder setFixedFee( com.hederahashgraph.api.proto.java.FixedFee.Builder builderForValue) { if (fixedFeeBuilder_ == null) { fee_ = builderForValue.build(); onChanged(); } else { fixedFeeBuilder_.setMessage(builderForValue.build()); } feeCase_ = 1; return this; } /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; */ public Builder mergeFixedFee(com.hederahashgraph.api.proto.java.FixedFee value) { if (fixedFeeBuilder_ == null) { if (feeCase_ == 1 && fee_ != com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance()) { fee_ = com.hederahashgraph.api.proto.java.FixedFee.newBuilder((com.hederahashgraph.api.proto.java.FixedFee) fee_) .mergeFrom(value).buildPartial(); } else { fee_ = value; } onChanged(); } else { if (feeCase_ == 1) { fixedFeeBuilder_.mergeFrom(value); } fixedFeeBuilder_.setMessage(value); } feeCase_ = 1; return this; } /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; */ public Builder clearFixedFee() { if (fixedFeeBuilder_ == null) { if (feeCase_ == 1) { feeCase_ = 0; fee_ = null; onChanged(); } } else { if (feeCase_ == 1) { feeCase_ = 0; fee_ = null; } fixedFeeBuilder_.clear(); } return this; } /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; */ public com.hederahashgraph.api.proto.java.FixedFee.Builder getFixedFeeBuilder() { return getFixedFeeFieldBuilder().getBuilder(); } /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; */ @java.lang.Override public com.hederahashgraph.api.proto.java.FixedFeeOrBuilder getFixedFeeOrBuilder() { if ((feeCase_ == 1) && (fixedFeeBuilder_ != null)) { return fixedFeeBuilder_.getMessageOrBuilder(); } else { if (feeCase_ == 1) { return (com.hederahashgraph.api.proto.java.FixedFee) fee_; } return com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance(); } } /** *
     **
     * Fixed fee to be charged
     * 
* * .proto.FixedFee fixed_fee = 1; */ private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.FixedFee, com.hederahashgraph.api.proto.java.FixedFee.Builder, com.hederahashgraph.api.proto.java.FixedFeeOrBuilder> getFixedFeeFieldBuilder() { if (fixedFeeBuilder_ == null) { if (!(feeCase_ == 1)) { fee_ = com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance(); } fixedFeeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.FixedFee, com.hederahashgraph.api.proto.java.FixedFee.Builder, com.hederahashgraph.api.proto.java.FixedFeeOrBuilder>( (com.hederahashgraph.api.proto.java.FixedFee) fee_, getParentForChildren(), isClean()); fee_ = null; } feeCase_ = 1; onChanged();; return fixedFeeBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.FractionalFee, com.hederahashgraph.api.proto.java.FractionalFee.Builder, com.hederahashgraph.api.proto.java.FractionalFeeOrBuilder> fractionalFeeBuilder_; /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; * @return Whether the fractionalFee field is set. */ @java.lang.Override public boolean hasFractionalFee() { return feeCase_ == 2; } /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; * @return The fractionalFee. */ @java.lang.Override public com.hederahashgraph.api.proto.java.FractionalFee getFractionalFee() { if (fractionalFeeBuilder_ == null) { if (feeCase_ == 2) { return (com.hederahashgraph.api.proto.java.FractionalFee) fee_; } return com.hederahashgraph.api.proto.java.FractionalFee.getDefaultInstance(); } else { if (feeCase_ == 2) { return fractionalFeeBuilder_.getMessage(); } return com.hederahashgraph.api.proto.java.FractionalFee.getDefaultInstance(); } } /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; */ public Builder setFractionalFee(com.hederahashgraph.api.proto.java.FractionalFee value) { if (fractionalFeeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fee_ = value; onChanged(); } else { fractionalFeeBuilder_.setMessage(value); } feeCase_ = 2; return this; } /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; */ public Builder setFractionalFee( com.hederahashgraph.api.proto.java.FractionalFee.Builder builderForValue) { if (fractionalFeeBuilder_ == null) { fee_ = builderForValue.build(); onChanged(); } else { fractionalFeeBuilder_.setMessage(builderForValue.build()); } feeCase_ = 2; return this; } /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; */ public Builder mergeFractionalFee(com.hederahashgraph.api.proto.java.FractionalFee value) { if (fractionalFeeBuilder_ == null) { if (feeCase_ == 2 && fee_ != com.hederahashgraph.api.proto.java.FractionalFee.getDefaultInstance()) { fee_ = com.hederahashgraph.api.proto.java.FractionalFee.newBuilder((com.hederahashgraph.api.proto.java.FractionalFee) fee_) .mergeFrom(value).buildPartial(); } else { fee_ = value; } onChanged(); } else { if (feeCase_ == 2) { fractionalFeeBuilder_.mergeFrom(value); } fractionalFeeBuilder_.setMessage(value); } feeCase_ = 2; return this; } /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; */ public Builder clearFractionalFee() { if (fractionalFeeBuilder_ == null) { if (feeCase_ == 2) { feeCase_ = 0; fee_ = null; onChanged(); } } else { if (feeCase_ == 2) { feeCase_ = 0; fee_ = null; } fractionalFeeBuilder_.clear(); } return this; } /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; */ public com.hederahashgraph.api.proto.java.FractionalFee.Builder getFractionalFeeBuilder() { return getFractionalFeeFieldBuilder().getBuilder(); } /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; */ @java.lang.Override public com.hederahashgraph.api.proto.java.FractionalFeeOrBuilder getFractionalFeeOrBuilder() { if ((feeCase_ == 2) && (fractionalFeeBuilder_ != null)) { return fractionalFeeBuilder_.getMessageOrBuilder(); } else { if (feeCase_ == 2) { return (com.hederahashgraph.api.proto.java.FractionalFee) fee_; } return com.hederahashgraph.api.proto.java.FractionalFee.getDefaultInstance(); } } /** *
     **
     * Fractional fee to be charged
     * 
* * .proto.FractionalFee fractional_fee = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.FractionalFee, com.hederahashgraph.api.proto.java.FractionalFee.Builder, com.hederahashgraph.api.proto.java.FractionalFeeOrBuilder> getFractionalFeeFieldBuilder() { if (fractionalFeeBuilder_ == null) { if (!(feeCase_ == 2)) { fee_ = com.hederahashgraph.api.proto.java.FractionalFee.getDefaultInstance(); } fractionalFeeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.FractionalFee, com.hederahashgraph.api.proto.java.FractionalFee.Builder, com.hederahashgraph.api.proto.java.FractionalFeeOrBuilder>( (com.hederahashgraph.api.proto.java.FractionalFee) fee_, getParentForChildren(), isClean()); fee_ = null; } feeCase_ = 2; onChanged();; return fractionalFeeBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.RoyaltyFee, com.hederahashgraph.api.proto.java.RoyaltyFee.Builder, com.hederahashgraph.api.proto.java.RoyaltyFeeOrBuilder> royaltyFeeBuilder_; /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; * @return Whether the royaltyFee field is set. */ @java.lang.Override public boolean hasRoyaltyFee() { return feeCase_ == 4; } /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; * @return The royaltyFee. */ @java.lang.Override public com.hederahashgraph.api.proto.java.RoyaltyFee getRoyaltyFee() { if (royaltyFeeBuilder_ == null) { if (feeCase_ == 4) { return (com.hederahashgraph.api.proto.java.RoyaltyFee) fee_; } return com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance(); } else { if (feeCase_ == 4) { return royaltyFeeBuilder_.getMessage(); } return com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance(); } } /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; */ public Builder setRoyaltyFee(com.hederahashgraph.api.proto.java.RoyaltyFee value) { if (royaltyFeeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fee_ = value; onChanged(); } else { royaltyFeeBuilder_.setMessage(value); } feeCase_ = 4; return this; } /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; */ public Builder setRoyaltyFee( com.hederahashgraph.api.proto.java.RoyaltyFee.Builder builderForValue) { if (royaltyFeeBuilder_ == null) { fee_ = builderForValue.build(); onChanged(); } else { royaltyFeeBuilder_.setMessage(builderForValue.build()); } feeCase_ = 4; return this; } /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; */ public Builder mergeRoyaltyFee(com.hederahashgraph.api.proto.java.RoyaltyFee value) { if (royaltyFeeBuilder_ == null) { if (feeCase_ == 4 && fee_ != com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance()) { fee_ = com.hederahashgraph.api.proto.java.RoyaltyFee.newBuilder((com.hederahashgraph.api.proto.java.RoyaltyFee) fee_) .mergeFrom(value).buildPartial(); } else { fee_ = value; } onChanged(); } else { if (feeCase_ == 4) { royaltyFeeBuilder_.mergeFrom(value); } royaltyFeeBuilder_.setMessage(value); } feeCase_ = 4; return this; } /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; */ public Builder clearRoyaltyFee() { if (royaltyFeeBuilder_ == null) { if (feeCase_ == 4) { feeCase_ = 0; fee_ = null; onChanged(); } } else { if (feeCase_ == 4) { feeCase_ = 0; fee_ = null; } royaltyFeeBuilder_.clear(); } return this; } /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; */ public com.hederahashgraph.api.proto.java.RoyaltyFee.Builder getRoyaltyFeeBuilder() { return getRoyaltyFeeFieldBuilder().getBuilder(); } /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; */ @java.lang.Override public com.hederahashgraph.api.proto.java.RoyaltyFeeOrBuilder getRoyaltyFeeOrBuilder() { if ((feeCase_ == 4) && (royaltyFeeBuilder_ != null)) { return royaltyFeeBuilder_.getMessageOrBuilder(); } else { if (feeCase_ == 4) { return (com.hederahashgraph.api.proto.java.RoyaltyFee) fee_; } return com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance(); } } /** *
     **
     * Royalty fee to be charged
     * 
* * .proto.RoyaltyFee royalty_fee = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.RoyaltyFee, com.hederahashgraph.api.proto.java.RoyaltyFee.Builder, com.hederahashgraph.api.proto.java.RoyaltyFeeOrBuilder> getRoyaltyFeeFieldBuilder() { if (royaltyFeeBuilder_ == null) { if (!(feeCase_ == 4)) { fee_ = com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance(); } royaltyFeeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.RoyaltyFee, com.hederahashgraph.api.proto.java.RoyaltyFee.Builder, com.hederahashgraph.api.proto.java.RoyaltyFeeOrBuilder>( (com.hederahashgraph.api.proto.java.RoyaltyFee) fee_, getParentForChildren(), isClean()); fee_ = null; } feeCase_ = 4; onChanged();; return royaltyFeeBuilder_; } private com.hederahashgraph.api.proto.java.AccountID feeCollectorAccountId_; private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder> feeCollectorAccountIdBuilder_; /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; * @return Whether the feeCollectorAccountId field is set. */ public boolean hasFeeCollectorAccountId() { return feeCollectorAccountIdBuilder_ != null || feeCollectorAccountId_ != null; } /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; * @return The feeCollectorAccountId. */ public com.hederahashgraph.api.proto.java.AccountID getFeeCollectorAccountId() { if (feeCollectorAccountIdBuilder_ == null) { return feeCollectorAccountId_ == null ? com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : feeCollectorAccountId_; } else { return feeCollectorAccountIdBuilder_.getMessage(); } } /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; */ public Builder setFeeCollectorAccountId(com.hederahashgraph.api.proto.java.AccountID value) { if (feeCollectorAccountIdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } feeCollectorAccountId_ = value; onChanged(); } else { feeCollectorAccountIdBuilder_.setMessage(value); } return this; } /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; */ public Builder setFeeCollectorAccountId( com.hederahashgraph.api.proto.java.AccountID.Builder builderForValue) { if (feeCollectorAccountIdBuilder_ == null) { feeCollectorAccountId_ = builderForValue.build(); onChanged(); } else { feeCollectorAccountIdBuilder_.setMessage(builderForValue.build()); } return this; } /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; */ public Builder mergeFeeCollectorAccountId(com.hederahashgraph.api.proto.java.AccountID value) { if (feeCollectorAccountIdBuilder_ == null) { if (feeCollectorAccountId_ != null) { feeCollectorAccountId_ = com.hederahashgraph.api.proto.java.AccountID.newBuilder(feeCollectorAccountId_).mergeFrom(value).buildPartial(); } else { feeCollectorAccountId_ = value; } onChanged(); } else { feeCollectorAccountIdBuilder_.mergeFrom(value); } return this; } /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; */ public Builder clearFeeCollectorAccountId() { if (feeCollectorAccountIdBuilder_ == null) { feeCollectorAccountId_ = null; onChanged(); } else { feeCollectorAccountId_ = null; feeCollectorAccountIdBuilder_ = null; } return this; } /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; */ public com.hederahashgraph.api.proto.java.AccountID.Builder getFeeCollectorAccountIdBuilder() { onChanged(); return getFeeCollectorAccountIdFieldBuilder().getBuilder(); } /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; */ public com.hederahashgraph.api.proto.java.AccountIDOrBuilder getFeeCollectorAccountIdOrBuilder() { if (feeCollectorAccountIdBuilder_ != null) { return feeCollectorAccountIdBuilder_.getMessageOrBuilder(); } else { return feeCollectorAccountId_ == null ? com.hederahashgraph.api.proto.java.AccountID.getDefaultInstance() : feeCollectorAccountId_; } } /** *
     **
     * The account to receive the custom fee
     * 
* * .proto.AccountID fee_collector_account_id = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder> getFeeCollectorAccountIdFieldBuilder() { if (feeCollectorAccountIdBuilder_ == null) { feeCollectorAccountIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hederahashgraph.api.proto.java.AccountID, com.hederahashgraph.api.proto.java.AccountID.Builder, com.hederahashgraph.api.proto.java.AccountIDOrBuilder>( getFeeCollectorAccountId(), getParentForChildren(), isClean()); feeCollectorAccountId_ = null; } return feeCollectorAccountIdBuilder_; } private boolean allCollectorsAreExempt_ ; /** *
     **
     * If true, exempts all the token's fee collection accounts from this fee.
     * (The token's treasury and the above fee_collector_account_id will always
     * be exempt. Please see <a href="https://hips.hedera.com/hip/hip-573">HIP-573</a> 
     * for details.)
     * 
* * bool all_collectors_are_exempt = 5; * @return The allCollectorsAreExempt. */ @java.lang.Override public boolean getAllCollectorsAreExempt() { return allCollectorsAreExempt_; } /** *
     **
     * If true, exempts all the token's fee collection accounts from this fee.
     * (The token's treasury and the above fee_collector_account_id will always
     * be exempt. Please see <a href="https://hips.hedera.com/hip/hip-573">HIP-573</a> 
     * for details.)
     * 
* * bool all_collectors_are_exempt = 5; * @param value The allCollectorsAreExempt to set. * @return This builder for chaining. */ public Builder setAllCollectorsAreExempt(boolean value) { allCollectorsAreExempt_ = value; onChanged(); return this; } /** *
     **
     * If true, exempts all the token's fee collection accounts from this fee.
     * (The token's treasury and the above fee_collector_account_id will always
     * be exempt. Please see <a href="https://hips.hedera.com/hip/hip-573">HIP-573</a> 
     * for details.)
     * 
* * bool all_collectors_are_exempt = 5; * @return This builder for chaining. */ public Builder clearAllCollectorsAreExempt() { allCollectorsAreExempt_ = false; 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:proto.CustomFee) } // @@protoc_insertion_point(class_scope:proto.CustomFee) private static final com.hederahashgraph.api.proto.java.CustomFee DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.CustomFee(); } public static com.hederahashgraph.api.proto.java.CustomFee getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public CustomFee parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new CustomFee(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 com.hederahashgraph.api.proto.java.CustomFee getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy