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

com.hedera.hashgraph.sdk.proto.FractionalFee Maven / Gradle / Ivy

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

package com.hedera.hashgraph.sdk.proto;

/**
 * 
 **
 * A fraction of the transferred units of a token to assess as a fee. The amount assessed will never
 * be less than the given minimum_amount, and never greater than the given maximum_amount.  The
 * denomination is always units of the token to which this fractional fee is attached.
 * 
* * Protobuf type {@code proto.FractionalFee} */ public final class FractionalFee extends com.google.protobuf.GeneratedMessageLite< FractionalFee, FractionalFee.Builder> implements // @@protoc_insertion_point(message_implements:proto.FractionalFee) FractionalFeeOrBuilder { private FractionalFee() { } public static final int FRACTIONAL_AMOUNT_FIELD_NUMBER = 1; private com.hedera.hashgraph.sdk.proto.Fraction fractionalAmount_; /** *
   **
   * The fraction of the transferred units to assess as a fee
   * 
* * .proto.Fraction fractional_amount = 1; */ @java.lang.Override public boolean hasFractionalAmount() { return fractionalAmount_ != null; } /** *
   **
   * The fraction of the transferred units to assess as a fee
   * 
* * .proto.Fraction fractional_amount = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.Fraction getFractionalAmount() { return fractionalAmount_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : fractionalAmount_; } /** *
   **
   * The fraction of the transferred units to assess as a fee
   * 
* * .proto.Fraction fractional_amount = 1; */ private void setFractionalAmount(com.hedera.hashgraph.sdk.proto.Fraction value) { value.getClass(); fractionalAmount_ = value; } /** *
   **
   * The fraction of the transferred units to assess as a fee
   * 
* * .proto.Fraction fractional_amount = 1; */ @java.lang.SuppressWarnings({"ReferenceEquality"}) private void mergeFractionalAmount(com.hedera.hashgraph.sdk.proto.Fraction value) { value.getClass(); if (fractionalAmount_ != null && fractionalAmount_ != com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance()) { fractionalAmount_ = com.hedera.hashgraph.sdk.proto.Fraction.newBuilder(fractionalAmount_).mergeFrom(value).buildPartial(); } else { fractionalAmount_ = value; } } /** *
   **
   * The fraction of the transferred units to assess as a fee
   * 
* * .proto.Fraction fractional_amount = 1; */ private void clearFractionalAmount() { fractionalAmount_ = null; } public static final int MINIMUM_AMOUNT_FIELD_NUMBER = 2; private long minimumAmount_; /** *
   **
   * The minimum amount to assess
   * 
* * int64 minimum_amount = 2; * @return The minimumAmount. */ @java.lang.Override public long getMinimumAmount() { return minimumAmount_; } /** *
   **
   * The minimum amount to assess
   * 
* * int64 minimum_amount = 2; * @param value The minimumAmount to set. */ private void setMinimumAmount(long value) { minimumAmount_ = value; } /** *
   **
   * The minimum amount to assess
   * 
* * int64 minimum_amount = 2; */ private void clearMinimumAmount() { minimumAmount_ = 0L; } public static final int MAXIMUM_AMOUNT_FIELD_NUMBER = 3; private long maximumAmount_; /** *
   **
   * The maximum amount to assess (zero implies no maximum)
   * 
* * int64 maximum_amount = 3; * @return The maximumAmount. */ @java.lang.Override public long getMaximumAmount() { return maximumAmount_; } /** *
   **
   * The maximum amount to assess (zero implies no maximum)
   * 
* * int64 maximum_amount = 3; * @param value The maximumAmount to set. */ private void setMaximumAmount(long value) { maximumAmount_ = value; } /** *
   **
   * The maximum amount to assess (zero implies no maximum)
   * 
* * int64 maximum_amount = 3; */ private void clearMaximumAmount() { maximumAmount_ = 0L; } public static final int NET_OF_TRANSFERS_FIELD_NUMBER = 4; private boolean netOfTransfers_; /** *
   **
   * If true, assesses the fee to the sender, so the receiver gets the full amount from the token
   * transfer list, and the sender is charged an additional fee; if false, the receiver does NOT get
   * the full amount, but only what is left over after paying the fractional fee
   * 
* * bool net_of_transfers = 4; * @return The netOfTransfers. */ @java.lang.Override public boolean getNetOfTransfers() { return netOfTransfers_; } /** *
   **
   * If true, assesses the fee to the sender, so the receiver gets the full amount from the token
   * transfer list, and the sender is charged an additional fee; if false, the receiver does NOT get
   * the full amount, but only what is left over after paying the fractional fee
   * 
* * bool net_of_transfers = 4; * @param value The netOfTransfers to set. */ private void setNetOfTransfers(boolean value) { netOfTransfers_ = value; } /** *
   **
   * If true, assesses the fee to the sender, so the receiver gets the full amount from the token
   * transfer list, and the sender is charged an additional fee; if false, the receiver does NOT get
   * the full amount, but only what is left over after paying the fractional fee
   * 
* * bool net_of_transfers = 4; */ private void clearNetOfTransfers() { netOfTransfers_ = false; } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, data, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input); } public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageLite.parseFrom( DEFAULT_INSTANCE, input, extensionRegistry); } public static Builder newBuilder() { return (Builder) DEFAULT_INSTANCE.createBuilder(); } public static Builder newBuilder(com.hedera.hashgraph.sdk.proto.FractionalFee prototype) { return (Builder) DEFAULT_INSTANCE.createBuilder(prototype); } /** *
   **
   * A fraction of the transferred units of a token to assess as a fee. The amount assessed will never
   * be less than the given minimum_amount, and never greater than the given maximum_amount.  The
   * denomination is always units of the token to which this fractional fee is attached.
   * 
* * Protobuf type {@code proto.FractionalFee} */ public static final class Builder extends com.google.protobuf.GeneratedMessageLite.Builder< com.hedera.hashgraph.sdk.proto.FractionalFee, Builder> implements // @@protoc_insertion_point(builder_implements:proto.FractionalFee) com.hedera.hashgraph.sdk.proto.FractionalFeeOrBuilder { // Construct using com.hedera.hashgraph.sdk.proto.FractionalFee.newBuilder() private Builder() { super(DEFAULT_INSTANCE); } /** *
     **
     * The fraction of the transferred units to assess as a fee
     * 
* * .proto.Fraction fractional_amount = 1; */ @java.lang.Override public boolean hasFractionalAmount() { return instance.hasFractionalAmount(); } /** *
     **
     * The fraction of the transferred units to assess as a fee
     * 
* * .proto.Fraction fractional_amount = 1; */ @java.lang.Override public com.hedera.hashgraph.sdk.proto.Fraction getFractionalAmount() { return instance.getFractionalAmount(); } /** *
     **
     * The fraction of the transferred units to assess as a fee
     * 
* * .proto.Fraction fractional_amount = 1; */ public Builder setFractionalAmount(com.hedera.hashgraph.sdk.proto.Fraction value) { copyOnWrite(); instance.setFractionalAmount(value); return this; } /** *
     **
     * The fraction of the transferred units to assess as a fee
     * 
* * .proto.Fraction fractional_amount = 1; */ public Builder setFractionalAmount( com.hedera.hashgraph.sdk.proto.Fraction.Builder builderForValue) { copyOnWrite(); instance.setFractionalAmount(builderForValue.build()); return this; } /** *
     **
     * The fraction of the transferred units to assess as a fee
     * 
* * .proto.Fraction fractional_amount = 1; */ public Builder mergeFractionalAmount(com.hedera.hashgraph.sdk.proto.Fraction value) { copyOnWrite(); instance.mergeFractionalAmount(value); return this; } /** *
     **
     * The fraction of the transferred units to assess as a fee
     * 
* * .proto.Fraction fractional_amount = 1; */ public Builder clearFractionalAmount() { copyOnWrite(); instance.clearFractionalAmount(); return this; } /** *
     **
     * The minimum amount to assess
     * 
* * int64 minimum_amount = 2; * @return The minimumAmount. */ @java.lang.Override public long getMinimumAmount() { return instance.getMinimumAmount(); } /** *
     **
     * The minimum amount to assess
     * 
* * int64 minimum_amount = 2; * @param value The minimumAmount to set. * @return This builder for chaining. */ public Builder setMinimumAmount(long value) { copyOnWrite(); instance.setMinimumAmount(value); return this; } /** *
     **
     * The minimum amount to assess
     * 
* * int64 minimum_amount = 2; * @return This builder for chaining. */ public Builder clearMinimumAmount() { copyOnWrite(); instance.clearMinimumAmount(); return this; } /** *
     **
     * The maximum amount to assess (zero implies no maximum)
     * 
* * int64 maximum_amount = 3; * @return The maximumAmount. */ @java.lang.Override public long getMaximumAmount() { return instance.getMaximumAmount(); } /** *
     **
     * The maximum amount to assess (zero implies no maximum)
     * 
* * int64 maximum_amount = 3; * @param value The maximumAmount to set. * @return This builder for chaining. */ public Builder setMaximumAmount(long value) { copyOnWrite(); instance.setMaximumAmount(value); return this; } /** *
     **
     * The maximum amount to assess (zero implies no maximum)
     * 
* * int64 maximum_amount = 3; * @return This builder for chaining. */ public Builder clearMaximumAmount() { copyOnWrite(); instance.clearMaximumAmount(); return this; } /** *
     **
     * If true, assesses the fee to the sender, so the receiver gets the full amount from the token
     * transfer list, and the sender is charged an additional fee; if false, the receiver does NOT get
     * the full amount, but only what is left over after paying the fractional fee
     * 
* * bool net_of_transfers = 4; * @return The netOfTransfers. */ @java.lang.Override public boolean getNetOfTransfers() { return instance.getNetOfTransfers(); } /** *
     **
     * If true, assesses the fee to the sender, so the receiver gets the full amount from the token
     * transfer list, and the sender is charged an additional fee; if false, the receiver does NOT get
     * the full amount, but only what is left over after paying the fractional fee
     * 
* * bool net_of_transfers = 4; * @param value The netOfTransfers to set. * @return This builder for chaining. */ public Builder setNetOfTransfers(boolean value) { copyOnWrite(); instance.setNetOfTransfers(value); return this; } /** *
     **
     * If true, assesses the fee to the sender, so the receiver gets the full amount from the token
     * transfer list, and the sender is charged an additional fee; if false, the receiver does NOT get
     * the full amount, but only what is left over after paying the fractional fee
     * 
* * bool net_of_transfers = 4; * @return This builder for chaining. */ public Builder clearNetOfTransfers() { copyOnWrite(); instance.clearNetOfTransfers(); return this; } // @@protoc_insertion_point(builder_scope:proto.FractionalFee) } @java.lang.Override @java.lang.SuppressWarnings({"unchecked", "fallthrough"}) protected final java.lang.Object dynamicMethod( com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, java.lang.Object arg0, java.lang.Object arg1) { switch (method) { case NEW_MUTABLE_INSTANCE: { return new com.hedera.hashgraph.sdk.proto.FractionalFee(); } case NEW_BUILDER: { return new Builder(); } case BUILD_MESSAGE_INFO: { java.lang.Object[] objects = new java.lang.Object[] { "fractionalAmount_", "minimumAmount_", "maximumAmount_", "netOfTransfers_", }; java.lang.String info = "\u0000\u0004\u0000\u0000\u0001\u0004\u0004\u0000\u0000\u0000\u0001\t\u0002\u0002" + "\u0003\u0002\u0004\u0007"; return newMessageInfo(DEFAULT_INSTANCE, info, objects); } // fall through case GET_DEFAULT_INSTANCE: { return DEFAULT_INSTANCE; } case GET_PARSER: { com.google.protobuf.Parser parser = PARSER; if (parser == null) { synchronized (com.hedera.hashgraph.sdk.proto.FractionalFee.class) { parser = PARSER; if (parser == null) { parser = new DefaultInstanceBasedParser( DEFAULT_INSTANCE); PARSER = parser; } } } return parser; } case GET_MEMOIZED_IS_INITIALIZED: { return (byte) 1; } case SET_MEMOIZED_IS_INITIALIZED: { return null; } } throw new UnsupportedOperationException(); } // @@protoc_insertion_point(class_scope:proto.FractionalFee) private static final com.hedera.hashgraph.sdk.proto.FractionalFee DEFAULT_INSTANCE; static { FractionalFee defaultInstance = new FractionalFee(); // New instances are implicitly immutable so no need to make // immutable. DEFAULT_INSTANCE = defaultInstance; com.google.protobuf.GeneratedMessageLite.registerDefaultInstance( FractionalFee.class, defaultInstance); } public static com.hedera.hashgraph.sdk.proto.FractionalFee getDefaultInstance() { return DEFAULT_INSTANCE; } private static volatile com.google.protobuf.Parser PARSER; public static com.google.protobuf.Parser parser() { return DEFAULT_INSTANCE.getParserForType(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy