com.hedera.hashgraph.sdk.proto.FractionalFee Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-full Show documentation
Show all versions of sdk-full Show documentation
Hedera™ Hashgraph SDK for Java
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: custom_fees.proto
// Protobuf Java Version: 3.25.3
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.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.FractionalFee)
FractionalFeeOrBuilder {
private static final long serialVersionUID = 0L;
// Use FractionalFee.newBuilder() to construct.
private FractionalFee(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FractionalFee() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FractionalFee();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_FractionalFee_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_FractionalFee_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.FractionalFee.class, com.hedera.hashgraph.sdk.proto.FractionalFee.Builder.class);
}
private int bitField0_;
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;
* @return Whether the fractionalAmount field is set.
*/
@java.lang.Override
public boolean hasFractionalAmount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The fraction of the transferred units to assess as a fee
*
*
* .proto.Fraction fractional_amount = 1;
* @return The fractionalAmount.
*/
@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;
*/
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FractionOrBuilder getFractionalAmountOrBuilder() {
return fractionalAmount_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : fractionalAmount_;
}
public static final int MINIMUM_AMOUNT_FIELD_NUMBER = 2;
private long minimumAmount_ = 0L;
/**
*
**
* The minimum amount to assess
*
*
* int64 minimum_amount = 2;
* @return The minimumAmount.
*/
@java.lang.Override
public long getMinimumAmount() {
return minimumAmount_;
}
public static final int MAXIMUM_AMOUNT_FIELD_NUMBER = 3;
private long maximumAmount_ = 0L;
/**
*
**
* The maximum amount to assess (zero implies no maximum)
*
*
* int64 maximum_amount = 3;
* @return The maximumAmount.
*/
@java.lang.Override
public long getMaximumAmount() {
return maximumAmount_;
}
public static final int NET_OF_TRANSFERS_FIELD_NUMBER = 4;
private boolean netOfTransfers_ = false;
/**
*
**
* 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_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getFractionalAmount());
}
if (minimumAmount_ != 0L) {
output.writeInt64(2, minimumAmount_);
}
if (maximumAmount_ != 0L) {
output.writeInt64(3, maximumAmount_);
}
if (netOfTransfers_ != false) {
output.writeBool(4, netOfTransfers_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getFractionalAmount());
}
if (minimumAmount_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, minimumAmount_);
}
if (maximumAmount_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, maximumAmount_);
}
if (netOfTransfers_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, netOfTransfers_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.hedera.hashgraph.sdk.proto.FractionalFee)) {
return super.equals(obj);
}
com.hedera.hashgraph.sdk.proto.FractionalFee other = (com.hedera.hashgraph.sdk.proto.FractionalFee) obj;
if (hasFractionalAmount() != other.hasFractionalAmount()) return false;
if (hasFractionalAmount()) {
if (!getFractionalAmount()
.equals(other.getFractionalAmount())) return false;
}
if (getMinimumAmount()
!= other.getMinimumAmount()) return false;
if (getMaximumAmount()
!= other.getMaximumAmount()) return false;
if (getNetOfTransfers()
!= other.getNetOfTransfers()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasFractionalAmount()) {
hash = (37 * hash) + FRACTIONAL_AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + getFractionalAmount().hashCode();
}
hash = (37 * hash) + MINIMUM_AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinimumAmount());
hash = (37 * hash) + MAXIMUM_AMOUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaximumAmount());
hash = (37 * hash) + NET_OF_TRANSFERS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getNetOfTransfers());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(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 PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.FractionalFee parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, 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.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.hedera.hashgraph.sdk.proto.FractionalFee parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hedera.hashgraph.sdk.proto.FractionalFee 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.hedera.hashgraph.sdk.proto.FractionalFee parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, 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.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.hedera.hashgraph.sdk.proto.FractionalFee 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 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.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.FractionalFee)
com.hedera.hashgraph.sdk.proto.FractionalFeeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_FractionalFee_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_FractionalFee_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hedera.hashgraph.sdk.proto.FractionalFee.class, com.hedera.hashgraph.sdk.proto.FractionalFee.Builder.class);
}
// Construct using com.hedera.hashgraph.sdk.proto.FractionalFee.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFractionalAmountFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
fractionalAmount_ = null;
if (fractionalAmountBuilder_ != null) {
fractionalAmountBuilder_.dispose();
fractionalAmountBuilder_ = null;
}
minimumAmount_ = 0L;
maximumAmount_ = 0L;
netOfTransfers_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_FractionalFee_descriptor;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FractionalFee getDefaultInstanceForType() {
return com.hedera.hashgraph.sdk.proto.FractionalFee.getDefaultInstance();
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FractionalFee build() {
com.hedera.hashgraph.sdk.proto.FractionalFee result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FractionalFee buildPartial() {
com.hedera.hashgraph.sdk.proto.FractionalFee result = new com.hedera.hashgraph.sdk.proto.FractionalFee(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.hedera.hashgraph.sdk.proto.FractionalFee result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fractionalAmount_ = fractionalAmountBuilder_ == null
? fractionalAmount_
: fractionalAmountBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.minimumAmount_ = minimumAmount_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.maximumAmount_ = maximumAmount_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.netOfTransfers_ = netOfTransfers_;
}
result.bitField0_ |= to_bitField0_;
}
@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.hedera.hashgraph.sdk.proto.FractionalFee) {
return mergeFrom((com.hedera.hashgraph.sdk.proto.FractionalFee)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.FractionalFee other) {
if (other == com.hedera.hashgraph.sdk.proto.FractionalFee.getDefaultInstance()) return this;
if (other.hasFractionalAmount()) {
mergeFractionalAmount(other.getFractionalAmount());
}
if (other.getMinimumAmount() != 0L) {
setMinimumAmount(other.getMinimumAmount());
}
if (other.getMaximumAmount() != 0L) {
setMaximumAmount(other.getMaximumAmount());
}
if (other.getNetOfTransfers() != false) {
setNetOfTransfers(other.getNetOfTransfers());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getFractionalAmountFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
minimumAmount_ = input.readInt64();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
maximumAmount_ = input.readInt64();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32: {
netOfTransfers_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.hedera.hashgraph.sdk.proto.Fraction fractionalAmount_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder> fractionalAmountBuilder_;
/**
*
**
* The fraction of the transferred units to assess as a fee
*
*
* .proto.Fraction fractional_amount = 1;
* @return Whether the fractionalAmount field is set.
*/
public boolean hasFractionalAmount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
**
* The fraction of the transferred units to assess as a fee
*
*
* .proto.Fraction fractional_amount = 1;
* @return The fractionalAmount.
*/
public com.hedera.hashgraph.sdk.proto.Fraction getFractionalAmount() {
if (fractionalAmountBuilder_ == null) {
return fractionalAmount_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : fractionalAmount_;
} else {
return fractionalAmountBuilder_.getMessage();
}
}
/**
*
**
* 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) {
if (fractionalAmountBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fractionalAmount_ = value;
} else {
fractionalAmountBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
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) {
if (fractionalAmountBuilder_ == null) {
fractionalAmount_ = builderForValue.build();
} else {
fractionalAmountBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
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) {
if (fractionalAmountBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
fractionalAmount_ != null &&
fractionalAmount_ != com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance()) {
getFractionalAmountBuilder().mergeFrom(value);
} else {
fractionalAmount_ = value;
}
} else {
fractionalAmountBuilder_.mergeFrom(value);
}
if (fractionalAmount_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
**
* The fraction of the transferred units to assess as a fee
*
*
* .proto.Fraction fractional_amount = 1;
*/
public Builder clearFractionalAmount() {
bitField0_ = (bitField0_ & ~0x00000001);
fractionalAmount_ = null;
if (fractionalAmountBuilder_ != null) {
fractionalAmountBuilder_.dispose();
fractionalAmountBuilder_ = null;
}
onChanged();
return this;
}
/**
*
**
* The fraction of the transferred units to assess as a fee
*
*
* .proto.Fraction fractional_amount = 1;
*/
public com.hedera.hashgraph.sdk.proto.Fraction.Builder getFractionalAmountBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getFractionalAmountFieldBuilder().getBuilder();
}
/**
*
**
* The fraction of the transferred units to assess as a fee
*
*
* .proto.Fraction fractional_amount = 1;
*/
public com.hedera.hashgraph.sdk.proto.FractionOrBuilder getFractionalAmountOrBuilder() {
if (fractionalAmountBuilder_ != null) {
return fractionalAmountBuilder_.getMessageOrBuilder();
} else {
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 com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder>
getFractionalAmountFieldBuilder() {
if (fractionalAmountBuilder_ == null) {
fractionalAmountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder>(
getFractionalAmount(),
getParentForChildren(),
isClean());
fractionalAmount_ = null;
}
return fractionalAmountBuilder_;
}
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.
* @return This builder for chaining.
*/
public Builder setMinimumAmount(long value) {
minimumAmount_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
**
* The minimum amount to assess
*
*
* int64 minimum_amount = 2;
* @return This builder for chaining.
*/
public Builder clearMinimumAmount() {
bitField0_ = (bitField0_ & ~0x00000002);
minimumAmount_ = 0L;
onChanged();
return this;
}
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.
* @return This builder for chaining.
*/
public Builder setMaximumAmount(long value) {
maximumAmount_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
**
* The maximum amount to assess (zero implies no maximum)
*
*
* int64 maximum_amount = 3;
* @return This builder for chaining.
*/
public Builder clearMaximumAmount() {
bitField0_ = (bitField0_ & ~0x00000004);
maximumAmount_ = 0L;
onChanged();
return this;
}
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.
* @return This builder for chaining.
*/
public Builder setNetOfTransfers(boolean value) {
netOfTransfers_ = value;
bitField0_ |= 0x00000008;
onChanged();
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() {
bitField0_ = (bitField0_ & ~0x00000008);
netOfTransfers_ = 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.FractionalFee)
}
// @@protoc_insertion_point(class_scope:proto.FractionalFee)
private static final com.hedera.hashgraph.sdk.proto.FractionalFee DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.FractionalFee();
}
public static com.hedera.hashgraph.sdk.proto.FractionalFee getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FractionalFee parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.hedera.hashgraph.sdk.proto.FractionalFee getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}