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

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

The newest version!
// 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 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(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_RoyaltyFee_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_RoyaltyFee_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.RoyaltyFee.class, com.hedera.hashgraph.sdk.proto.RoyaltyFee.Builder.class); } private int bitField0_; public static final int EXCHANGE_VALUE_FRACTION_FIELD_NUMBER = 1; private com.hedera.hashgraph.sdk.proto.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 ((bitField0_ & 0x00000001) != 0); } /** *
   **
   * 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.hedera.hashgraph.sdk.proto.Fraction getExchangeValueFraction() { return exchangeValueFraction_ == null ? com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.FractionOrBuilder getExchangeValueFractionOrBuilder() { return exchangeValueFraction_ == null ? com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance() : exchangeValueFraction_; } public static final int FALLBACK_FEE_FIELD_NUMBER = 2; private com.hedera.hashgraph.sdk.proto.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 ((bitField0_ & 0x00000002) != 0); } /** *
   **
   * 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.hedera.hashgraph.sdk.proto.FixedFee getFallbackFee() { return fallbackFee_ == null ? com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.FixedFeeOrBuilder getFallbackFeeOrBuilder() { return fallbackFee_ == null ? com.hedera.hashgraph.sdk.proto.FixedFee.getDefaultInstance() : fallbackFee_; } 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, getExchangeValueFraction()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getFallbackFee()); } 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, getExchangeValueFraction()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getFallbackFee()); } 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.RoyaltyFee)) { return super.equals(obj); } com.hedera.hashgraph.sdk.proto.RoyaltyFee other = (com.hedera.hashgraph.sdk.proto.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 (!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 (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) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.hedera.hashgraph.sdk.proto.RoyaltyFee parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.RoyaltyFee 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.RoyaltyFee parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RoyaltyFee parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.hedera.hashgraph.sdk.proto.RoyaltyFee 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.RoyaltyFee parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RoyaltyFee parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RoyaltyFee 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.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.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RoyaltyFeeOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_RoyaltyFee_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_RoyaltyFee_fieldAccessorTable .ensureFieldAccessorsInitialized( com.hedera.hashgraph.sdk.proto.RoyaltyFee.class, com.hedera.hashgraph.sdk.proto.RoyaltyFee.Builder.class); } // Construct using com.hedera.hashgraph.sdk.proto.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) { getExchangeValueFractionFieldBuilder(); getFallbackFeeFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; exchangeValueFraction_ = null; if (exchangeValueFractionBuilder_ != null) { exchangeValueFractionBuilder_.dispose(); exchangeValueFractionBuilder_ = null; } fallbackFee_ = null; if (fallbackFeeBuilder_ != null) { fallbackFeeBuilder_.dispose(); fallbackFeeBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.hedera.hashgraph.sdk.proto.CustomFees.internal_static_proto_RoyaltyFee_descriptor; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.RoyaltyFee getDefaultInstanceForType() { return com.hedera.hashgraph.sdk.proto.RoyaltyFee.getDefaultInstance(); } @java.lang.Override public com.hedera.hashgraph.sdk.proto.RoyaltyFee build() { com.hedera.hashgraph.sdk.proto.RoyaltyFee result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.hedera.hashgraph.sdk.proto.RoyaltyFee buildPartial() { com.hedera.hashgraph.sdk.proto.RoyaltyFee result = new com.hedera.hashgraph.sdk.proto.RoyaltyFee(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.hedera.hashgraph.sdk.proto.RoyaltyFee result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.exchangeValueFraction_ = exchangeValueFractionBuilder_ == null ? exchangeValueFraction_ : exchangeValueFractionBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { result.fallbackFee_ = fallbackFeeBuilder_ == null ? fallbackFee_ : fallbackFeeBuilder_.build(); to_bitField0_ |= 0x00000002; } 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.RoyaltyFee) { return mergeFrom((com.hedera.hashgraph.sdk.proto.RoyaltyFee)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.hedera.hashgraph.sdk.proto.RoyaltyFee other) { if (other == com.hedera.hashgraph.sdk.proto.RoyaltyFee.getDefaultInstance()) return this; if (other.hasExchangeValueFraction()) { mergeExchangeValueFraction(other.getExchangeValueFraction()); } if (other.hasFallbackFee()) { mergeFallbackFee(other.getFallbackFee()); } 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( getExchangeValueFractionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { input.readMessage( getFallbackFeeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 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 exchangeValueFraction_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.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 ((bitField0_ & 0x00000001) != 0); } /** *
     **
     * The fraction of fungible value exchanged for an NFT to collect as royalty
     * 
* * .proto.Fraction exchange_value_fraction = 1; * @return The exchangeValueFraction. */ public com.hedera.hashgraph.sdk.proto.Fraction getExchangeValueFraction() { if (exchangeValueFractionBuilder_ == null) { return exchangeValueFraction_ == null ? com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.Fraction value) { if (exchangeValueFractionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } exchangeValueFraction_ = value; } else { exchangeValueFractionBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); 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.hedera.hashgraph.sdk.proto.Fraction.Builder builderForValue) { if (exchangeValueFractionBuilder_ == null) { exchangeValueFraction_ = builderForValue.build(); } else { exchangeValueFractionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); 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.hedera.hashgraph.sdk.proto.Fraction value) { if (exchangeValueFractionBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && exchangeValueFraction_ != null && exchangeValueFraction_ != com.hedera.hashgraph.sdk.proto.Fraction.getDefaultInstance()) { getExchangeValueFractionBuilder().mergeFrom(value); } else { exchangeValueFraction_ = value; } } else { exchangeValueFractionBuilder_.mergeFrom(value); } if (exchangeValueFraction_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** *
     **
     * The fraction of fungible value exchanged for an NFT to collect as royalty
     * 
* * .proto.Fraction exchange_value_fraction = 1; */ public Builder clearExchangeValueFraction() { bitField0_ = (bitField0_ & ~0x00000001); exchangeValueFraction_ = null; if (exchangeValueFractionBuilder_ != null) { exchangeValueFractionBuilder_.dispose(); exchangeValueFractionBuilder_ = null; } onChanged(); return this; } /** *
     **
     * The fraction of fungible value exchanged for an NFT to collect as royalty
     * 
* * .proto.Fraction exchange_value_fraction = 1; */ public com.hedera.hashgraph.sdk.proto.Fraction.Builder getExchangeValueFractionBuilder() { bitField0_ |= 0x00000001; 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.hedera.hashgraph.sdk.proto.FractionOrBuilder getExchangeValueFractionOrBuilder() { if (exchangeValueFractionBuilder_ != null) { return exchangeValueFractionBuilder_.getMessageOrBuilder(); } else { return exchangeValueFraction_ == null ? com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder> getExchangeValueFractionFieldBuilder() { if (exchangeValueFractionBuilder_ == null) { exchangeValueFractionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.Fraction, com.hedera.hashgraph.sdk.proto.Fraction.Builder, com.hedera.hashgraph.sdk.proto.FractionOrBuilder>( getExchangeValueFraction(), getParentForChildren(), isClean()); exchangeValueFraction_ = null; } return exchangeValueFractionBuilder_; } private com.hedera.hashgraph.sdk.proto.FixedFee fallbackFee_; private com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.FixedFee, com.hedera.hashgraph.sdk.proto.FixedFee.Builder, com.hedera.hashgraph.sdk.proto.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 ((bitField0_ & 0x00000002) != 0); } /** *
     **
     * 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.hedera.hashgraph.sdk.proto.FixedFee getFallbackFee() { if (fallbackFeeBuilder_ == null) { return fallbackFee_ == null ? com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.FixedFee value) { if (fallbackFeeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fallbackFee_ = value; } else { fallbackFeeBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); 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.hedera.hashgraph.sdk.proto.FixedFee.Builder builderForValue) { if (fallbackFeeBuilder_ == null) { fallbackFee_ = builderForValue.build(); } else { fallbackFeeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); 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.hedera.hashgraph.sdk.proto.FixedFee value) { if (fallbackFeeBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && fallbackFee_ != null && fallbackFee_ != com.hedera.hashgraph.sdk.proto.FixedFee.getDefaultInstance()) { getFallbackFeeBuilder().mergeFrom(value); } else { fallbackFee_ = value; } } else { fallbackFeeBuilder_.mergeFrom(value); } if (fallbackFee_ != null) { bitField0_ |= 0x00000002; onChanged(); } 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() { bitField0_ = (bitField0_ & ~0x00000002); fallbackFee_ = null; if (fallbackFeeBuilder_ != null) { fallbackFeeBuilder_.dispose(); fallbackFeeBuilder_ = null; } onChanged(); 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.hedera.hashgraph.sdk.proto.FixedFee.Builder getFallbackFeeBuilder() { bitField0_ |= 0x00000002; 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.hedera.hashgraph.sdk.proto.FixedFeeOrBuilder getFallbackFeeOrBuilder() { if (fallbackFeeBuilder_ != null) { return fallbackFeeBuilder_.getMessageOrBuilder(); } else { return fallbackFee_ == null ? com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.FixedFee, com.hedera.hashgraph.sdk.proto.FixedFee.Builder, com.hedera.hashgraph.sdk.proto.FixedFeeOrBuilder> getFallbackFeeFieldBuilder() { if (fallbackFeeBuilder_ == null) { fallbackFeeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.hedera.hashgraph.sdk.proto.FixedFee, com.hedera.hashgraph.sdk.proto.FixedFee.Builder, com.hedera.hashgraph.sdk.proto.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.hedera.hashgraph.sdk.proto.RoyaltyFee DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.hedera.hashgraph.sdk.proto.RoyaltyFee(); } public static com.hedera.hashgraph.sdk.proto.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 { 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.RoyaltyFee getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy