com.hederahashgraph.api.proto.java.RoyaltyFee 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 fee to assess during a CryptoTransfer that changes ownership of an NFT. Defines the fraction of
* the fungible value exchanged for an NFT that the ledger should collect as a royalty. ("Fungible
* value" includes both ℏ and units of fungible HTS tokens.) When the NFT sender does not receive
* any fungible value, the ledger will assess the fallback fee, if present, to the new NFT owner.
* Royalty fees can only be added to tokens of type type NON_FUNGIBLE_UNIQUE.
* **IMPORTANT:** Users must understand that native royalty fees are _strictly_ a convenience feature,
* and that the network cannot enforce inescapable royalties on the exchange of a non-fractional NFT.
* For example, if the counterparties agree to split their value transfer and NFT exchange into separate
* transactions, the network cannot possibly intervene. (And note the counterparties could use a smart
* contract to make this split transaction atomic if they do not trust each other.)
*
* Counterparties that _do_ wish to respect creator royalties should follow the pattern the network
* recognizes: The NFT sender and receiver should both sign a single `CryptoTransfer` that credits
* the sender with all the fungible value the receiver is exchanging for the NFT.
*
* Similarly, a marketplace using an approved spender account for an escrow transaction should credit
* the account selling the NFT in the same `CryptoTransfer` that deducts fungible value from the buying
* account.
*
* There is an [open HIP discussion](https://github.com/hashgraph/hedera-improvement-proposal/discussions/578)
* that proposes to broaden the class of transactions for which the network automatically collects
* royalties. If this interests or concerns you, please add your voice to that discussion.
*
*
* Protobuf type {@code proto.RoyaltyFee}
*/
public final class RoyaltyFee extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:proto.RoyaltyFee)
RoyaltyFeeOrBuilder {
private static final long serialVersionUID = 0L;
// Use RoyaltyFee.newBuilder() to construct.
private RoyaltyFee(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RoyaltyFee() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RoyaltyFee();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RoyaltyFee(
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.Fraction.Builder subBuilder = null;
if (exchangeValueFraction_ != null) {
subBuilder = exchangeValueFraction_.toBuilder();
}
exchangeValueFraction_ = input.readMessage(com.hederahashgraph.api.proto.java.Fraction.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(exchangeValueFraction_);
exchangeValueFraction_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.hederahashgraph.api.proto.java.FixedFee.Builder subBuilder = null;
if (fallbackFee_ != null) {
subBuilder = fallbackFee_.toBuilder();
}
fallbackFee_ = input.readMessage(com.hederahashgraph.api.proto.java.FixedFee.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fallbackFee_);
fallbackFee_ = subBuilder.buildPartial();
}
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_RoyaltyFee_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_RoyaltyFee_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.RoyaltyFee.class, com.hederahashgraph.api.proto.java.RoyaltyFee.Builder.class);
}
public static final int EXCHANGE_VALUE_FRACTION_FIELD_NUMBER = 1;
private com.hederahashgraph.api.proto.java.Fraction exchangeValueFraction_;
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
* @return Whether the exchangeValueFraction field is set.
*/
@java.lang.Override
public boolean hasExchangeValueFraction() {
return exchangeValueFraction_ != null;
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
* @return The exchangeValueFraction.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.Fraction getExchangeValueFraction() {
return exchangeValueFraction_ == null ? com.hederahashgraph.api.proto.java.Fraction.getDefaultInstance() : exchangeValueFraction_;
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.FractionOrBuilder getExchangeValueFractionOrBuilder() {
return getExchangeValueFraction();
}
public static final int FALLBACK_FEE_FIELD_NUMBER = 2;
private com.hederahashgraph.api.proto.java.FixedFee fallbackFee_;
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
* @return Whether the fallbackFee field is set.
*/
@java.lang.Override
public boolean hasFallbackFee() {
return fallbackFee_ != null;
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
* @return The fallbackFee.
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.FixedFee getFallbackFee() {
return fallbackFee_ == null ? com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance() : fallbackFee_;
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
*/
@java.lang.Override
public com.hederahashgraph.api.proto.java.FixedFeeOrBuilder getFallbackFeeOrBuilder() {
return getFallbackFee();
}
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 (exchangeValueFraction_ != null) {
output.writeMessage(1, getExchangeValueFraction());
}
if (fallbackFee_ != null) {
output.writeMessage(2, getFallbackFee());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (exchangeValueFraction_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getExchangeValueFraction());
}
if (fallbackFee_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getFallbackFee());
}
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.RoyaltyFee)) {
return super.equals(obj);
}
com.hederahashgraph.api.proto.java.RoyaltyFee other = (com.hederahashgraph.api.proto.java.RoyaltyFee) obj;
if (hasExchangeValueFraction() != other.hasExchangeValueFraction()) return false;
if (hasExchangeValueFraction()) {
if (!getExchangeValueFraction()
.equals(other.getExchangeValueFraction())) return false;
}
if (hasFallbackFee() != other.hasFallbackFee()) return false;
if (hasFallbackFee()) {
if (!getFallbackFee()
.equals(other.getFallbackFee())) 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 (hasExchangeValueFraction()) {
hash = (37 * hash) + EXCHANGE_VALUE_FRACTION_FIELD_NUMBER;
hash = (53 * hash) + getExchangeValueFraction().hashCode();
}
if (hasFallbackFee()) {
hash = (37 * hash) + FALLBACK_FEE_FIELD_NUMBER;
hash = (53 * hash) + getFallbackFee().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.hederahashgraph.api.proto.java.RoyaltyFee parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.RoyaltyFee 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.RoyaltyFee parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.RoyaltyFee 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.RoyaltyFee parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.hederahashgraph.api.proto.java.RoyaltyFee 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.RoyaltyFee parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.RoyaltyFee 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.RoyaltyFee parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.hederahashgraph.api.proto.java.RoyaltyFee 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.RoyaltyFee 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.RoyaltyFee 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.RoyaltyFee 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 fee to assess during a CryptoTransfer that changes ownership of an NFT. Defines the fraction of
* the fungible value exchanged for an NFT that the ledger should collect as a royalty. ("Fungible
* value" includes both ℏ and units of fungible HTS tokens.) When the NFT sender does not receive
* any fungible value, the ledger will assess the fallback fee, if present, to the new NFT owner.
* Royalty fees can only be added to tokens of type type NON_FUNGIBLE_UNIQUE.
* **IMPORTANT:** Users must understand that native royalty fees are _strictly_ a convenience feature,
* and that the network cannot enforce inescapable royalties on the exchange of a non-fractional NFT.
* For example, if the counterparties agree to split their value transfer and NFT exchange into separate
* transactions, the network cannot possibly intervene. (And note the counterparties could use a smart
* contract to make this split transaction atomic if they do not trust each other.)
*
* Counterparties that _do_ wish to respect creator royalties should follow the pattern the network
* recognizes: The NFT sender and receiver should both sign a single `CryptoTransfer` that credits
* the sender with all the fungible value the receiver is exchanging for the NFT.
*
* Similarly, a marketplace using an approved spender account for an escrow transaction should credit
* the account selling the NFT in the same `CryptoTransfer` that deducts fungible value from the buying
* account.
*
* There is an [open HIP discussion](https://github.com/hashgraph/hedera-improvement-proposal/discussions/578)
* that proposes to broaden the class of transactions for which the network automatically collects
* royalties. If this interests or concerns you, please add your voice to that discussion.
*
*
* Protobuf type {@code proto.RoyaltyFee}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:proto.RoyaltyFee)
com.hederahashgraph.api.proto.java.RoyaltyFeeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_RoyaltyFee_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_RoyaltyFee_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.hederahashgraph.api.proto.java.RoyaltyFee.class, com.hederahashgraph.api.proto.java.RoyaltyFee.Builder.class);
}
// Construct using com.hederahashgraph.api.proto.java.RoyaltyFee.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 (exchangeValueFractionBuilder_ == null) {
exchangeValueFraction_ = null;
} else {
exchangeValueFraction_ = null;
exchangeValueFractionBuilder_ = null;
}
if (fallbackFeeBuilder_ == null) {
fallbackFee_ = null;
} else {
fallbackFee_ = null;
fallbackFeeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.hederahashgraph.api.proto.java.CustomFees.internal_static_proto_RoyaltyFee_descriptor;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.RoyaltyFee getDefaultInstanceForType() {
return com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance();
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.RoyaltyFee build() {
com.hederahashgraph.api.proto.java.RoyaltyFee result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.hederahashgraph.api.proto.java.RoyaltyFee buildPartial() {
com.hederahashgraph.api.proto.java.RoyaltyFee result = new com.hederahashgraph.api.proto.java.RoyaltyFee(this);
if (exchangeValueFractionBuilder_ == null) {
result.exchangeValueFraction_ = exchangeValueFraction_;
} else {
result.exchangeValueFraction_ = exchangeValueFractionBuilder_.build();
}
if (fallbackFeeBuilder_ == null) {
result.fallbackFee_ = fallbackFee_;
} else {
result.fallbackFee_ = fallbackFeeBuilder_.build();
}
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.RoyaltyFee) {
return mergeFrom((com.hederahashgraph.api.proto.java.RoyaltyFee)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.hederahashgraph.api.proto.java.RoyaltyFee other) {
if (other == com.hederahashgraph.api.proto.java.RoyaltyFee.getDefaultInstance()) return this;
if (other.hasExchangeValueFraction()) {
mergeExchangeValueFraction(other.getExchangeValueFraction());
}
if (other.hasFallbackFee()) {
mergeFallbackFee(other.getFallbackFee());
}
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.RoyaltyFee parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.hederahashgraph.api.proto.java.RoyaltyFee) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.hederahashgraph.api.proto.java.Fraction exchangeValueFraction_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.Fraction, com.hederahashgraph.api.proto.java.Fraction.Builder, com.hederahashgraph.api.proto.java.FractionOrBuilder> exchangeValueFractionBuilder_;
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
* @return Whether the exchangeValueFraction field is set.
*/
public boolean hasExchangeValueFraction() {
return exchangeValueFractionBuilder_ != null || exchangeValueFraction_ != null;
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
* @return The exchangeValueFraction.
*/
public com.hederahashgraph.api.proto.java.Fraction getExchangeValueFraction() {
if (exchangeValueFractionBuilder_ == null) {
return exchangeValueFraction_ == null ? com.hederahashgraph.api.proto.java.Fraction.getDefaultInstance() : exchangeValueFraction_;
} else {
return exchangeValueFractionBuilder_.getMessage();
}
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
*/
public Builder setExchangeValueFraction(com.hederahashgraph.api.proto.java.Fraction value) {
if (exchangeValueFractionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exchangeValueFraction_ = value;
onChanged();
} else {
exchangeValueFractionBuilder_.setMessage(value);
}
return this;
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
*/
public Builder setExchangeValueFraction(
com.hederahashgraph.api.proto.java.Fraction.Builder builderForValue) {
if (exchangeValueFractionBuilder_ == null) {
exchangeValueFraction_ = builderForValue.build();
onChanged();
} else {
exchangeValueFractionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
*/
public Builder mergeExchangeValueFraction(com.hederahashgraph.api.proto.java.Fraction value) {
if (exchangeValueFractionBuilder_ == null) {
if (exchangeValueFraction_ != null) {
exchangeValueFraction_ =
com.hederahashgraph.api.proto.java.Fraction.newBuilder(exchangeValueFraction_).mergeFrom(value).buildPartial();
} else {
exchangeValueFraction_ = value;
}
onChanged();
} else {
exchangeValueFractionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
*/
public Builder clearExchangeValueFraction() {
if (exchangeValueFractionBuilder_ == null) {
exchangeValueFraction_ = null;
onChanged();
} else {
exchangeValueFraction_ = null;
exchangeValueFractionBuilder_ = null;
}
return this;
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
*/
public com.hederahashgraph.api.proto.java.Fraction.Builder getExchangeValueFractionBuilder() {
onChanged();
return getExchangeValueFractionFieldBuilder().getBuilder();
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
*/
public com.hederahashgraph.api.proto.java.FractionOrBuilder getExchangeValueFractionOrBuilder() {
if (exchangeValueFractionBuilder_ != null) {
return exchangeValueFractionBuilder_.getMessageOrBuilder();
} else {
return exchangeValueFraction_ == null ?
com.hederahashgraph.api.proto.java.Fraction.getDefaultInstance() : exchangeValueFraction_;
}
}
/**
*
**
* The fraction of fungible value exchanged for an NFT to collect as royalty
*
*
* .proto.Fraction exchange_value_fraction = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.Fraction, com.hederahashgraph.api.proto.java.Fraction.Builder, com.hederahashgraph.api.proto.java.FractionOrBuilder>
getExchangeValueFractionFieldBuilder() {
if (exchangeValueFractionBuilder_ == null) {
exchangeValueFractionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.Fraction, com.hederahashgraph.api.proto.java.Fraction.Builder, com.hederahashgraph.api.proto.java.FractionOrBuilder>(
getExchangeValueFraction(),
getParentForChildren(),
isClean());
exchangeValueFraction_ = null;
}
return exchangeValueFractionBuilder_;
}
private com.hederahashgraph.api.proto.java.FixedFee fallbackFee_;
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FixedFee, com.hederahashgraph.api.proto.java.FixedFee.Builder, com.hederahashgraph.api.proto.java.FixedFeeOrBuilder> fallbackFeeBuilder_;
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
* @return Whether the fallbackFee field is set.
*/
public boolean hasFallbackFee() {
return fallbackFeeBuilder_ != null || fallbackFee_ != null;
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
* @return The fallbackFee.
*/
public com.hederahashgraph.api.proto.java.FixedFee getFallbackFee() {
if (fallbackFeeBuilder_ == null) {
return fallbackFee_ == null ? com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance() : fallbackFee_;
} else {
return fallbackFeeBuilder_.getMessage();
}
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
*/
public Builder setFallbackFee(com.hederahashgraph.api.proto.java.FixedFee value) {
if (fallbackFeeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fallbackFee_ = value;
onChanged();
} else {
fallbackFeeBuilder_.setMessage(value);
}
return this;
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
*/
public Builder setFallbackFee(
com.hederahashgraph.api.proto.java.FixedFee.Builder builderForValue) {
if (fallbackFeeBuilder_ == null) {
fallbackFee_ = builderForValue.build();
onChanged();
} else {
fallbackFeeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
*/
public Builder mergeFallbackFee(com.hederahashgraph.api.proto.java.FixedFee value) {
if (fallbackFeeBuilder_ == null) {
if (fallbackFee_ != null) {
fallbackFee_ =
com.hederahashgraph.api.proto.java.FixedFee.newBuilder(fallbackFee_).mergeFrom(value).buildPartial();
} else {
fallbackFee_ = value;
}
onChanged();
} else {
fallbackFeeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
*/
public Builder clearFallbackFee() {
if (fallbackFeeBuilder_ == null) {
fallbackFee_ = null;
onChanged();
} else {
fallbackFee_ = null;
fallbackFeeBuilder_ = null;
}
return this;
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
*/
public com.hederahashgraph.api.proto.java.FixedFee.Builder getFallbackFeeBuilder() {
onChanged();
return getFallbackFeeFieldBuilder().getBuilder();
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
*/
public com.hederahashgraph.api.proto.java.FixedFeeOrBuilder getFallbackFeeOrBuilder() {
if (fallbackFeeBuilder_ != null) {
return fallbackFeeBuilder_.getMessageOrBuilder();
} else {
return fallbackFee_ == null ?
com.hederahashgraph.api.proto.java.FixedFee.getDefaultInstance() : fallbackFee_;
}
}
/**
*
**
* If present, the fixed fee to assess to the NFT receiver when no fungible value is exchanged
* with the sender
*
*
* .proto.FixedFee fallback_fee = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FixedFee, com.hederahashgraph.api.proto.java.FixedFee.Builder, com.hederahashgraph.api.proto.java.FixedFeeOrBuilder>
getFallbackFeeFieldBuilder() {
if (fallbackFeeBuilder_ == null) {
fallbackFeeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.hederahashgraph.api.proto.java.FixedFee, com.hederahashgraph.api.proto.java.FixedFee.Builder, com.hederahashgraph.api.proto.java.FixedFeeOrBuilder>(
getFallbackFee(),
getParentForChildren(),
isClean());
fallbackFee_ = null;
}
return fallbackFeeBuilder_;
}
@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.RoyaltyFee)
}
// @@protoc_insertion_point(class_scope:proto.RoyaltyFee)
private static final com.hederahashgraph.api.proto.java.RoyaltyFee DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.hederahashgraph.api.proto.java.RoyaltyFee();
}
public static com.hederahashgraph.api.proto.java.RoyaltyFee getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RoyaltyFee parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RoyaltyFee(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.RoyaltyFee getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}