Class ContractUpdateTransactionBody.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<ContractUpdateTransactionBody,ContractUpdateTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<ContractUpdateTransactionBody,ContractUpdateTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.ContractUpdateTransactionBody.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, ContractUpdateTransactionBodyOrBuilder, Cloneable
Enclosing class:
ContractUpdateTransactionBody

public static final class ContractUpdateTransactionBody.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<ContractUpdateTransactionBody,ContractUpdateTransactionBody.Builder> implements ContractUpdateTransactionBodyOrBuilder
 *
 Modify the current state of a smart contract.

 ### Requirements
 - The `adminKey` MUST sign all contract update transactions except one
 that only updates the `expirationTime`.
 - A transaction that modifies any field other than `expirationTime` for
 a contract without a valid `adminKey` set SHALL fail with response
 code `MODIFYING_IMMUTABLE_CONTRACT`.
 - Fields set to non-default values in this transaction SHALL be updated on
 success. Fields not set to non-default values SHALL NOT be
 updated on success.

 ### Block Stream Effects
 None
 
Protobuf type proto.ContractUpdateTransactionBody
  • Method Details

    • getMemoFieldCase

      Specified by:
      getMemoFieldCase in interface ContractUpdateTransactionBodyOrBuilder
    • clearMemoField

      public ContractUpdateTransactionBody.Builder clearMemoField()
    • getStakedIdCase

      Specified by:
      getStakedIdCase in interface ContractUpdateTransactionBodyOrBuilder
    • clearStakedId

      public ContractUpdateTransactionBody.Builder clearStakedId()
    • hasContractID

      public boolean hasContractID()
       *
       The contact ID that identifies the smart contract to be updated.<br/>
       This field MUST be set, and MUST NOT be a default ID (`0.0.0`).
       
      .proto.ContractID contractID = 1;
      Specified by:
      hasContractID in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the contractID field is set.
    • getContractID

      public ContractID getContractID()
       *
       The contact ID that identifies the smart contract to be updated.<br/>
       This field MUST be set, and MUST NOT be a default ID (`0.0.0`).
       
      .proto.ContractID contractID = 1;
      Specified by:
      getContractID in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The contractID.
    • setContractID

      public ContractUpdateTransactionBody.Builder setContractID(ContractID value)
       *
       The contact ID that identifies the smart contract to be updated.<br/>
       This field MUST be set, and MUST NOT be a default ID (`0.0.0`).
       
      .proto.ContractID contractID = 1;
    • setContractID

      public ContractUpdateTransactionBody.Builder setContractID(ContractID.Builder builderForValue)
       *
       The contact ID that identifies the smart contract to be updated.<br/>
       This field MUST be set, and MUST NOT be a default ID (`0.0.0`).
       
      .proto.ContractID contractID = 1;
    • mergeContractID

      public ContractUpdateTransactionBody.Builder mergeContractID(ContractID value)
       *
       The contact ID that identifies the smart contract to be updated.<br/>
       This field MUST be set, and MUST NOT be a default ID (`0.0.0`).
       
      .proto.ContractID contractID = 1;
    • clearContractID

      public ContractUpdateTransactionBody.Builder clearContractID()
       *
       The contact ID that identifies the smart contract to be updated.<br/>
       This field MUST be set, and MUST NOT be a default ID (`0.0.0`).
       
      .proto.ContractID contractID = 1;
    • hasExpirationTime

      public boolean hasExpirationTime()
       *
       If set, modify the time at which this contract will expire.<br/>
       An expired contract requires a rent payment to "renew" the contract.
       A transaction to update this field is how that rent payment is made.
       <p>
       This value MUST NOT be less than the current `expirationTime`
       of the contract. If this value is earlier than the current
       value, the transaction SHALL fail with response
       code `EXPIRATION_REDUCTION_NOT_ALLOWED`.
       
      .proto.Timestamp expirationTime = 2;
      Specified by:
      hasExpirationTime in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the expirationTime field is set.
    • getExpirationTime

      public Timestamp getExpirationTime()
       *
       If set, modify the time at which this contract will expire.<br/>
       An expired contract requires a rent payment to "renew" the contract.
       A transaction to update this field is how that rent payment is made.
       <p>
       This value MUST NOT be less than the current `expirationTime`
       of the contract. If this value is earlier than the current
       value, the transaction SHALL fail with response
       code `EXPIRATION_REDUCTION_NOT_ALLOWED`.
       
      .proto.Timestamp expirationTime = 2;
      Specified by:
      getExpirationTime in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The expirationTime.
    • setExpirationTime

      public ContractUpdateTransactionBody.Builder setExpirationTime(Timestamp value)
       *
       If set, modify the time at which this contract will expire.<br/>
       An expired contract requires a rent payment to "renew" the contract.
       A transaction to update this field is how that rent payment is made.
       <p>
       This value MUST NOT be less than the current `expirationTime`
       of the contract. If this value is earlier than the current
       value, the transaction SHALL fail with response
       code `EXPIRATION_REDUCTION_NOT_ALLOWED`.
       
      .proto.Timestamp expirationTime = 2;
    • setExpirationTime

      public ContractUpdateTransactionBody.Builder setExpirationTime(Timestamp.Builder builderForValue)
       *
       If set, modify the time at which this contract will expire.<br/>
       An expired contract requires a rent payment to "renew" the contract.
       A transaction to update this field is how that rent payment is made.
       <p>
       This value MUST NOT be less than the current `expirationTime`
       of the contract. If this value is earlier than the current
       value, the transaction SHALL fail with response
       code `EXPIRATION_REDUCTION_NOT_ALLOWED`.
       
      .proto.Timestamp expirationTime = 2;
    • mergeExpirationTime

      public ContractUpdateTransactionBody.Builder mergeExpirationTime(Timestamp value)
       *
       If set, modify the time at which this contract will expire.<br/>
       An expired contract requires a rent payment to "renew" the contract.
       A transaction to update this field is how that rent payment is made.
       <p>
       This value MUST NOT be less than the current `expirationTime`
       of the contract. If this value is earlier than the current
       value, the transaction SHALL fail with response
       code `EXPIRATION_REDUCTION_NOT_ALLOWED`.
       
      .proto.Timestamp expirationTime = 2;
    • clearExpirationTime

      public ContractUpdateTransactionBody.Builder clearExpirationTime()
       *
       If set, modify the time at which this contract will expire.<br/>
       An expired contract requires a rent payment to "renew" the contract.
       A transaction to update this field is how that rent payment is made.
       <p>
       This value MUST NOT be less than the current `expirationTime`
       of the contract. If this value is earlier than the current
       value, the transaction SHALL fail with response
       code `EXPIRATION_REDUCTION_NOT_ALLOWED`.
       
      .proto.Timestamp expirationTime = 2;
    • hasAdminKey

      public boolean hasAdminKey()
       *
       If set, modify the key that authorizes updates to the contract.
       <p>
       If this field is set to a valid Key, this key and the previously set key
       MUST both sign this transaction.<br/>
       If this value is an empty `KeyList`, the prior key MUST sign this
       transaction, and the smart contract SHALL be immutable after this
       transaction completes, except for expiration and renewal.<br/>
       If this value is not an empty `KeyList`, but does not contain any
       cryptographic keys, or is otherwise malformed, this transaction SHALL
       fail with response code `INVALID_ADMIN_KEY`.
       
      .proto.Key adminKey = 3;
      Specified by:
      hasAdminKey in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the adminKey field is set.
    • getAdminKey

      public Key getAdminKey()
       *
       If set, modify the key that authorizes updates to the contract.
       <p>
       If this field is set to a valid Key, this key and the previously set key
       MUST both sign this transaction.<br/>
       If this value is an empty `KeyList`, the prior key MUST sign this
       transaction, and the smart contract SHALL be immutable after this
       transaction completes, except for expiration and renewal.<br/>
       If this value is not an empty `KeyList`, but does not contain any
       cryptographic keys, or is otherwise malformed, this transaction SHALL
       fail with response code `INVALID_ADMIN_KEY`.
       
      .proto.Key adminKey = 3;
      Specified by:
      getAdminKey in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The adminKey.
    • setAdminKey

      public ContractUpdateTransactionBody.Builder setAdminKey(Key value)
       *
       If set, modify the key that authorizes updates to the contract.
       <p>
       If this field is set to a valid Key, this key and the previously set key
       MUST both sign this transaction.<br/>
       If this value is an empty `KeyList`, the prior key MUST sign this
       transaction, and the smart contract SHALL be immutable after this
       transaction completes, except for expiration and renewal.<br/>
       If this value is not an empty `KeyList`, but does not contain any
       cryptographic keys, or is otherwise malformed, this transaction SHALL
       fail with response code `INVALID_ADMIN_KEY`.
       
      .proto.Key adminKey = 3;
    • setAdminKey

      public ContractUpdateTransactionBody.Builder setAdminKey(Key.Builder builderForValue)
       *
       If set, modify the key that authorizes updates to the contract.
       <p>
       If this field is set to a valid Key, this key and the previously set key
       MUST both sign this transaction.<br/>
       If this value is an empty `KeyList`, the prior key MUST sign this
       transaction, and the smart contract SHALL be immutable after this
       transaction completes, except for expiration and renewal.<br/>
       If this value is not an empty `KeyList`, but does not contain any
       cryptographic keys, or is otherwise malformed, this transaction SHALL
       fail with response code `INVALID_ADMIN_KEY`.
       
      .proto.Key adminKey = 3;
    • mergeAdminKey

      public ContractUpdateTransactionBody.Builder mergeAdminKey(Key value)
       *
       If set, modify the key that authorizes updates to the contract.
       <p>
       If this field is set to a valid Key, this key and the previously set key
       MUST both sign this transaction.<br/>
       If this value is an empty `KeyList`, the prior key MUST sign this
       transaction, and the smart contract SHALL be immutable after this
       transaction completes, except for expiration and renewal.<br/>
       If this value is not an empty `KeyList`, but does not contain any
       cryptographic keys, or is otherwise malformed, this transaction SHALL
       fail with response code `INVALID_ADMIN_KEY`.
       
      .proto.Key adminKey = 3;
    • clearAdminKey

      public ContractUpdateTransactionBody.Builder clearAdminKey()
       *
       If set, modify the key that authorizes updates to the contract.
       <p>
       If this field is set to a valid Key, this key and the previously set key
       MUST both sign this transaction.<br/>
       If this value is an empty `KeyList`, the prior key MUST sign this
       transaction, and the smart contract SHALL be immutable after this
       transaction completes, except for expiration and renewal.<br/>
       If this value is not an empty `KeyList`, but does not contain any
       cryptographic keys, or is otherwise malformed, this transaction SHALL
       fail with response code `INVALID_ADMIN_KEY`.
       
      .proto.Key adminKey = 3;
    • hasProxyAccountID

      @Deprecated public boolean hasProxyAccountID()
      Deprecated.
       *
       Replaced with `staked_id` alternatives.
       This field is unused and SHALL NOT modify the contract state.<br/>
       The id of an account to which the contract is proxy staked
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
      Specified by:
      hasProxyAccountID in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the proxyAccountID field is set.
    • getProxyAccountID

      @Deprecated public AccountID getProxyAccountID()
      Deprecated.
       *
       Replaced with `staked_id` alternatives.
       This field is unused and SHALL NOT modify the contract state.<br/>
       The id of an account to which the contract is proxy staked
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
      Specified by:
      getProxyAccountID in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The proxyAccountID.
    • setProxyAccountID

      Deprecated.
       *
       Replaced with `staked_id` alternatives.
       This field is unused and SHALL NOT modify the contract state.<br/>
       The id of an account to which the contract is proxy staked
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
    • setProxyAccountID

      @Deprecated public ContractUpdateTransactionBody.Builder setProxyAccountID(AccountID.Builder builderForValue)
      Deprecated.
       *
       Replaced with `staked_id` alternatives.
       This field is unused and SHALL NOT modify the contract state.<br/>
       The id of an account to which the contract is proxy staked
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
    • mergeProxyAccountID

      @Deprecated public ContractUpdateTransactionBody.Builder mergeProxyAccountID(AccountID value)
      Deprecated.
       *
       Replaced with `staked_id` alternatives.
       This field is unused and SHALL NOT modify the contract state.<br/>
       The id of an account to which the contract is proxy staked
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
    • clearProxyAccountID

      @Deprecated public ContractUpdateTransactionBody.Builder clearProxyAccountID()
      Deprecated.
       *
       Replaced with `staked_id` alternatives.
       This field is unused and SHALL NOT modify the contract state.<br/>
       The id of an account to which the contract is proxy staked
       
      .proto.AccountID proxyAccountID = 6 [deprecated = true];
    • hasAutoRenewPeriod

      public boolean hasAutoRenewPeriod()
       *
       If set, modify the duration added to expiration time by each
       auto-renewal to this value.
       
      .proto.Duration autoRenewPeriod = 7;
      Specified by:
      hasAutoRenewPeriod in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the autoRenewPeriod field is set.
    • getAutoRenewPeriod

      public Duration getAutoRenewPeriod()
       *
       If set, modify the duration added to expiration time by each
       auto-renewal to this value.
       
      .proto.Duration autoRenewPeriod = 7;
      Specified by:
      getAutoRenewPeriod in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The autoRenewPeriod.
    • setAutoRenewPeriod

      public ContractUpdateTransactionBody.Builder setAutoRenewPeriod(Duration value)
       *
       If set, modify the duration added to expiration time by each
       auto-renewal to this value.
       
      .proto.Duration autoRenewPeriod = 7;
    • setAutoRenewPeriod

      public ContractUpdateTransactionBody.Builder setAutoRenewPeriod(Duration.Builder builderForValue)
       *
       If set, modify the duration added to expiration time by each
       auto-renewal to this value.
       
      .proto.Duration autoRenewPeriod = 7;
    • mergeAutoRenewPeriod

      public ContractUpdateTransactionBody.Builder mergeAutoRenewPeriod(Duration value)
       *
       If set, modify the duration added to expiration time by each
       auto-renewal to this value.
       
      .proto.Duration autoRenewPeriod = 7;
    • clearAutoRenewPeriod

      public ContractUpdateTransactionBody.Builder clearAutoRenewPeriod()
       *
       If set, modify the duration added to expiration time by each
       auto-renewal to this value.
       
      .proto.Duration autoRenewPeriod = 7;
    • hasFileID

      @Deprecated public boolean hasFileID()
      Deprecated.
       *
       This field is unused and SHALL NOT modify the contract state.<br/>
       Previously, an ID of a file containing the bytecode of the Solidity
       transaction that created this contract.
       
      .proto.FileID fileID = 8 [deprecated = true];
      Specified by:
      hasFileID in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the fileID field is set.
    • getFileID

      @Deprecated public FileID getFileID()
      Deprecated.
       *
       This field is unused and SHALL NOT modify the contract state.<br/>
       Previously, an ID of a file containing the bytecode of the Solidity
       transaction that created this contract.
       
      .proto.FileID fileID = 8 [deprecated = true];
      Specified by:
      getFileID in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The fileID.
    • setFileID

      Deprecated.
       *
       This field is unused and SHALL NOT modify the contract state.<br/>
       Previously, an ID of a file containing the bytecode of the Solidity
       transaction that created this contract.
       
      .proto.FileID fileID = 8 [deprecated = true];
    • setFileID

      Deprecated.
       *
       This field is unused and SHALL NOT modify the contract state.<br/>
       Previously, an ID of a file containing the bytecode of the Solidity
       transaction that created this contract.
       
      .proto.FileID fileID = 8 [deprecated = true];
    • mergeFileID

      Deprecated.
       *
       This field is unused and SHALL NOT modify the contract state.<br/>
       Previously, an ID of a file containing the bytecode of the Solidity
       transaction that created this contract.
       
      .proto.FileID fileID = 8 [deprecated = true];
    • clearFileID

      Deprecated.
       *
       This field is unused and SHALL NOT modify the contract state.<br/>
       Previously, an ID of a file containing the bytecode of the Solidity
       transaction that created this contract.
       
      .proto.FileID fileID = 8 [deprecated = true];
    • hasMemo

      @Deprecated public boolean hasMemo()
      Deprecated.
      proto.ContractUpdateTransactionBody.memo is deprecated. See contract_update.proto;l=103
       *
       This value could not accurately distinguish unset or deliberately
       empty. memoWrapper should be used instead.<br/>
       
      string memo = 9 [deprecated = true];
      Specified by:
      hasMemo in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the memo field is set.
    • getMemo

      @Deprecated public String getMemo()
      Deprecated.
      proto.ContractUpdateTransactionBody.memo is deprecated. See contract_update.proto;l=103
       *
       This value could not accurately distinguish unset or deliberately
       empty. memoWrapper should be used instead.<br/>
       
      string memo = 9 [deprecated = true];
      Specified by:
      getMemo in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The memo.
    • getMemoBytes

      @Deprecated public com.google.protobuf.ByteString getMemoBytes()
      Deprecated.
      proto.ContractUpdateTransactionBody.memo is deprecated. See contract_update.proto;l=103
       *
       This value could not accurately distinguish unset or deliberately
       empty. memoWrapper should be used instead.<br/>
       
      string memo = 9 [deprecated = true];
      Specified by:
      getMemoBytes in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The bytes for memo.
    • setMemo

      Deprecated.
      proto.ContractUpdateTransactionBody.memo is deprecated. See contract_update.proto;l=103
       *
       This value could not accurately distinguish unset or deliberately
       empty. memoWrapper should be used instead.<br/>
       
      string memo = 9 [deprecated = true];
      Parameters:
      value - The memo to set.
      Returns:
      This builder for chaining.
    • clearMemo

      Deprecated.
      proto.ContractUpdateTransactionBody.memo is deprecated. See contract_update.proto;l=103
       *
       This value could not accurately distinguish unset or deliberately
       empty. memoWrapper should be used instead.<br/>
       
      string memo = 9 [deprecated = true];
      Returns:
      This builder for chaining.
    • setMemoBytes

      @Deprecated public ContractUpdateTransactionBody.Builder setMemoBytes(com.google.protobuf.ByteString value)
      Deprecated.
      proto.ContractUpdateTransactionBody.memo is deprecated. See contract_update.proto;l=103
       *
       This value could not accurately distinguish unset or deliberately
       empty. memoWrapper should be used instead.<br/>
       
      string memo = 9 [deprecated = true];
      Parameters:
      value - The bytes for memo to set.
      Returns:
      This builder for chaining.
    • hasMemoWrapper

      public boolean hasMemoWrapper()
       *
       If set, modify the short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memoWrapper = 10;
      Specified by:
      hasMemoWrapper in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the memoWrapper field is set.
    • getMemoWrapper

      public com.google.protobuf.StringValue getMemoWrapper()
       *
       If set, modify the short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memoWrapper = 10;
      Specified by:
      getMemoWrapper in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The memoWrapper.
    • setMemoWrapper

      public ContractUpdateTransactionBody.Builder setMemoWrapper(com.google.protobuf.StringValue value)
       *
       If set, modify the short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memoWrapper = 10;
    • setMemoWrapper

      public ContractUpdateTransactionBody.Builder setMemoWrapper(com.google.protobuf.StringValue.Builder builderForValue)
       *
       If set, modify the short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memoWrapper = 10;
    • mergeMemoWrapper

      public ContractUpdateTransactionBody.Builder mergeMemoWrapper(com.google.protobuf.StringValue value)
       *
       If set, modify the short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memoWrapper = 10;
    • clearMemoWrapper

      public ContractUpdateTransactionBody.Builder clearMemoWrapper()
       *
       If set, modify the short memo for this smart contract.
       <p>
       This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes`
       (default 100) bytes when encoded as UTF-8.
       
      .google.protobuf.StringValue memoWrapper = 10;
    • hasMaxAutomaticTokenAssociations

      public boolean hasMaxAutomaticTokenAssociations()
       *
       If set, modify the maximum number of tokens that can be auto-associated with the
       contract.
       <p>
       If this is set and less than or equal to `used_auto_associations`, or 0, then this contract
       MUST manually associate with a token before transacting in that token.<br/>
       This value MAY also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      .google.protobuf.Int32Value max_automatic_token_associations = 11;
      Specified by:
      hasMaxAutomaticTokenAssociations in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the maxAutomaticTokenAssociations field is set.
    • getMaxAutomaticTokenAssociations

      public com.google.protobuf.Int32Value getMaxAutomaticTokenAssociations()
       *
       If set, modify the maximum number of tokens that can be auto-associated with the
       contract.
       <p>
       If this is set and less than or equal to `used_auto_associations`, or 0, then this contract
       MUST manually associate with a token before transacting in that token.<br/>
       This value MAY also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      .google.protobuf.Int32Value max_automatic_token_associations = 11;
      Specified by:
      getMaxAutomaticTokenAssociations in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The maxAutomaticTokenAssociations.
    • setMaxAutomaticTokenAssociations

      public ContractUpdateTransactionBody.Builder setMaxAutomaticTokenAssociations(com.google.protobuf.Int32Value value)
       *
       If set, modify the maximum number of tokens that can be auto-associated with the
       contract.
       <p>
       If this is set and less than or equal to `used_auto_associations`, or 0, then this contract
       MUST manually associate with a token before transacting in that token.<br/>
       This value MAY also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      .google.protobuf.Int32Value max_automatic_token_associations = 11;
    • setMaxAutomaticTokenAssociations

      public ContractUpdateTransactionBody.Builder setMaxAutomaticTokenAssociations(com.google.protobuf.Int32Value.Builder builderForValue)
       *
       If set, modify the maximum number of tokens that can be auto-associated with the
       contract.
       <p>
       If this is set and less than or equal to `used_auto_associations`, or 0, then this contract
       MUST manually associate with a token before transacting in that token.<br/>
       This value MAY also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      .google.protobuf.Int32Value max_automatic_token_associations = 11;
    • mergeMaxAutomaticTokenAssociations

      public ContractUpdateTransactionBody.Builder mergeMaxAutomaticTokenAssociations(com.google.protobuf.Int32Value value)
       *
       If set, modify the maximum number of tokens that can be auto-associated with the
       contract.
       <p>
       If this is set and less than or equal to `used_auto_associations`, or 0, then this contract
       MUST manually associate with a token before transacting in that token.<br/>
       This value MAY also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      .google.protobuf.Int32Value max_automatic_token_associations = 11;
    • clearMaxAutomaticTokenAssociations

      public ContractUpdateTransactionBody.Builder clearMaxAutomaticTokenAssociations()
       *
       If set, modify the maximum number of tokens that can be auto-associated with the
       contract.
       <p>
       If this is set and less than or equal to `used_auto_associations`, or 0, then this contract
       MUST manually associate with a token before transacting in that token.<br/>
       This value MAY also be `-1` to indicate no limit.<br/>
       This value MUST NOT be less than `-1`.
       
      .google.protobuf.Int32Value max_automatic_token_associations = 11;
    • hasAutoRenewAccountId

      public boolean hasAutoRenewAccountId()
       *
       If set, modify the account, in the same shard and realm as this smart
       contract, that has agreed to allow the network to use its balance, when
       needed, to automatically extend this contract's expiration time.
       <p>
       If this field is set to a non-default value, that Account MUST sign this
       transaction.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `auto_renew_account_id` value SHALL be removed on success.
       
      .proto.AccountID auto_renew_account_id = 12;
      Specified by:
      hasAutoRenewAccountId in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the autoRenewAccountId field is set.
    • getAutoRenewAccountId

      public AccountID getAutoRenewAccountId()
       *
       If set, modify the account, in the same shard and realm as this smart
       contract, that has agreed to allow the network to use its balance, when
       needed, to automatically extend this contract's expiration time.
       <p>
       If this field is set to a non-default value, that Account MUST sign this
       transaction.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `auto_renew_account_id` value SHALL be removed on success.
       
      .proto.AccountID auto_renew_account_id = 12;
      Specified by:
      getAutoRenewAccountId in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The autoRenewAccountId.
    • setAutoRenewAccountId

      public ContractUpdateTransactionBody.Builder setAutoRenewAccountId(AccountID value)
       *
       If set, modify the account, in the same shard and realm as this smart
       contract, that has agreed to allow the network to use its balance, when
       needed, to automatically extend this contract's expiration time.
       <p>
       If this field is set to a non-default value, that Account MUST sign this
       transaction.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `auto_renew_account_id` value SHALL be removed on success.
       
      .proto.AccountID auto_renew_account_id = 12;
    • setAutoRenewAccountId

      public ContractUpdateTransactionBody.Builder setAutoRenewAccountId(AccountID.Builder builderForValue)
       *
       If set, modify the account, in the same shard and realm as this smart
       contract, that has agreed to allow the network to use its balance, when
       needed, to automatically extend this contract's expiration time.
       <p>
       If this field is set to a non-default value, that Account MUST sign this
       transaction.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `auto_renew_account_id` value SHALL be removed on success.
       
      .proto.AccountID auto_renew_account_id = 12;
    • mergeAutoRenewAccountId

      public ContractUpdateTransactionBody.Builder mergeAutoRenewAccountId(AccountID value)
       *
       If set, modify the account, in the same shard and realm as this smart
       contract, that has agreed to allow the network to use its balance, when
       needed, to automatically extend this contract's expiration time.
       <p>
       If this field is set to a non-default value, that Account MUST sign this
       transaction.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `auto_renew_account_id` value SHALL be removed on success.
       
      .proto.AccountID auto_renew_account_id = 12;
    • clearAutoRenewAccountId

      public ContractUpdateTransactionBody.Builder clearAutoRenewAccountId()
       *
       If set, modify the account, in the same shard and realm as this smart
       contract, that has agreed to allow the network to use its balance, when
       needed, to automatically extend this contract's expiration time.
       <p>
       If this field is set to a non-default value, that Account MUST sign this
       transaction.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `auto_renew_account_id` value SHALL be removed on success.
       
      .proto.AccountID auto_renew_account_id = 12;
    • hasStakedAccountId

      public boolean hasStakedAccountId()
       *
       An account identifier.<br/>
       A staked account acts as a proxy, and this contract effectively
       nominates the same node as the identified account.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to the same node as the identified account.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `staked_account_id` value SHALL be removed on success.
       
      .proto.AccountID staked_account_id = 13;
      Specified by:
      hasStakedAccountId in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the stakedAccountId field is set.
    • getStakedAccountId

      public AccountID getStakedAccountId()
       *
       An account identifier.<br/>
       A staked account acts as a proxy, and this contract effectively
       nominates the same node as the identified account.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to the same node as the identified account.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `staked_account_id` value SHALL be removed on success.
       
      .proto.AccountID staked_account_id = 13;
      Specified by:
      getStakedAccountId in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The stakedAccountId.
    • setStakedAccountId

      public ContractUpdateTransactionBody.Builder setStakedAccountId(AccountID value)
       *
       An account identifier.<br/>
       A staked account acts as a proxy, and this contract effectively
       nominates the same node as the identified account.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to the same node as the identified account.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `staked_account_id` value SHALL be removed on success.
       
      .proto.AccountID staked_account_id = 13;
    • setStakedAccountId

      public ContractUpdateTransactionBody.Builder setStakedAccountId(AccountID.Builder builderForValue)
       *
       An account identifier.<br/>
       A staked account acts as a proxy, and this contract effectively
       nominates the same node as the identified account.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to the same node as the identified account.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `staked_account_id` value SHALL be removed on success.
       
      .proto.AccountID staked_account_id = 13;
    • mergeStakedAccountId

      public ContractUpdateTransactionBody.Builder mergeStakedAccountId(AccountID value)
       *
       An account identifier.<br/>
       A staked account acts as a proxy, and this contract effectively
       nominates the same node as the identified account.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to the same node as the identified account.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `staked_account_id` value SHALL be removed on success.
       
      .proto.AccountID staked_account_id = 13;
    • clearStakedAccountId

      public ContractUpdateTransactionBody.Builder clearStakedAccountId()
       *
       An account identifier.<br/>
       A staked account acts as a proxy, and this contract effectively
       nominates the same node as the identified account.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to the same node as the identified account.<br/>
       If this field is set to a default AccountID value (`0.0.0`), any
       pre-existing `staked_account_id` value SHALL be removed on success.
       
      .proto.AccountID staked_account_id = 13;
    • hasStakedNodeId

      public boolean hasStakedNodeId()
       *
       A node identifier.<br/>
       A staked node identifier indicates the consensus node that this
       account nominates for staking.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to this node.
       If set to a the value `-1` any pre-existing `staked_node_id` value
       SHALL be removed on success.
       <p>
       <blockquote>Note: node IDs do fluctuate as node operators change.
       Most contracts are immutable, and a contract staking to an invalid
       node ID SHALL NOT participate in staking. Immutable contracts may
       find it more reliable to use a proxy account for staking (via
       `staked_account_id`) to enable updating the _effective_ staking node
       ID when necessary through updating the proxy account.</blockquote>
       
      int64 staked_node_id = 14;
      Specified by:
      hasStakedNodeId in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the stakedNodeId field is set.
    • getStakedNodeId

      public long getStakedNodeId()
       *
       A node identifier.<br/>
       A staked node identifier indicates the consensus node that this
       account nominates for staking.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to this node.
       If set to a the value `-1` any pre-existing `staked_node_id` value
       SHALL be removed on success.
       <p>
       <blockquote>Note: node IDs do fluctuate as node operators change.
       Most contracts are immutable, and a contract staking to an invalid
       node ID SHALL NOT participate in staking. Immutable contracts may
       find it more reliable to use a proxy account for staking (via
       `staked_account_id`) to enable updating the _effective_ staking node
       ID when necessary through updating the proxy account.</blockquote>
       
      int64 staked_node_id = 14;
      Specified by:
      getStakedNodeId in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The stakedNodeId.
    • setStakedNodeId

      public ContractUpdateTransactionBody.Builder setStakedNodeId(long value)
       *
       A node identifier.<br/>
       A staked node identifier indicates the consensus node that this
       account nominates for staking.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to this node.
       If set to a the value `-1` any pre-existing `staked_node_id` value
       SHALL be removed on success.
       <p>
       <blockquote>Note: node IDs do fluctuate as node operators change.
       Most contracts are immutable, and a contract staking to an invalid
       node ID SHALL NOT participate in staking. Immutable contracts may
       find it more reliable to use a proxy account for staking (via
       `staked_account_id`) to enable updating the _effective_ staking node
       ID when necessary through updating the proxy account.</blockquote>
       
      int64 staked_node_id = 14;
      Parameters:
      value - The stakedNodeId to set.
      Returns:
      This builder for chaining.
    • clearStakedNodeId

      public ContractUpdateTransactionBody.Builder clearStakedNodeId()
       *
       A node identifier.<br/>
       A staked node identifier indicates the consensus node that this
       account nominates for staking.
       <p>
       If set, modify this smart contract such that it SHALL stake its HBAR
       to this node.
       If set to a the value `-1` any pre-existing `staked_node_id` value
       SHALL be removed on success.
       <p>
       <blockquote>Note: node IDs do fluctuate as node operators change.
       Most contracts are immutable, and a contract staking to an invalid
       node ID SHALL NOT participate in staking. Immutable contracts may
       find it more reliable to use a proxy account for staking (via
       `staked_account_id`) to enable updating the _effective_ staking node
       ID when necessary through updating the proxy account.</blockquote>
       
      int64 staked_node_id = 14;
      Returns:
      This builder for chaining.
    • hasDeclineReward

      public boolean hasDeclineReward()
       *
       A flag indicating if staking rewards are declined.<br/>
       If set, modify the flag indicating if this contract declines to accept
       rewards for staking its HBAR to secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      .google.protobuf.BoolValue decline_reward = 15;
      Specified by:
      hasDeclineReward in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      Whether the declineReward field is set.
    • getDeclineReward

      public com.google.protobuf.BoolValue getDeclineReward()
       *
       A flag indicating if staking rewards are declined.<br/>
       If set, modify the flag indicating if this contract declines to accept
       rewards for staking its HBAR to secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      .google.protobuf.BoolValue decline_reward = 15;
      Specified by:
      getDeclineReward in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The declineReward.
    • setDeclineReward

      public ContractUpdateTransactionBody.Builder setDeclineReward(com.google.protobuf.BoolValue value)
       *
       A flag indicating if staking rewards are declined.<br/>
       If set, modify the flag indicating if this contract declines to accept
       rewards for staking its HBAR to secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      .google.protobuf.BoolValue decline_reward = 15;
    • setDeclineReward

      public ContractUpdateTransactionBody.Builder setDeclineReward(com.google.protobuf.BoolValue.Builder builderForValue)
       *
       A flag indicating if staking rewards are declined.<br/>
       If set, modify the flag indicating if this contract declines to accept
       rewards for staking its HBAR to secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      .google.protobuf.BoolValue decline_reward = 15;
    • mergeDeclineReward

      public ContractUpdateTransactionBody.Builder mergeDeclineReward(com.google.protobuf.BoolValue value)
       *
       A flag indicating if staking rewards are declined.<br/>
       If set, modify the flag indicating if this contract declines to accept
       rewards for staking its HBAR to secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      .google.protobuf.BoolValue decline_reward = 15;
    • clearDeclineReward

      public ContractUpdateTransactionBody.Builder clearDeclineReward()
       *
       A flag indicating if staking rewards are declined.<br/>
       If set, modify the flag indicating if this contract declines to accept
       rewards for staking its HBAR to secure the network.
       <p>
       If set to true, this smart contract SHALL NOT receive any reward for
       staking its HBAR balance to help secure the network, regardless of
       staking configuration, but MAY stake HBAR to support the network
       without reward.
       
      .google.protobuf.BoolValue decline_reward = 15;
    • getHookIdsToDeleteList

      public List<Long> getHookIdsToDeleteList()
       *
       The ids the hooks to delete from the contract.
       
      repeated int64 hook_ids_to_delete = 16;
      Specified by:
      getHookIdsToDeleteList in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      A list containing the hookIdsToDelete.
    • getHookIdsToDeleteCount

      public int getHookIdsToDeleteCount()
       *
       The ids the hooks to delete from the contract.
       
      repeated int64 hook_ids_to_delete = 16;
      Specified by:
      getHookIdsToDeleteCount in interface ContractUpdateTransactionBodyOrBuilder
      Returns:
      The count of hookIdsToDelete.
    • getHookIdsToDelete

      public long getHookIdsToDelete(int index)
       *
       The ids the hooks to delete from the contract.
       
      repeated int64 hook_ids_to_delete = 16;
      Specified by:
      getHookIdsToDelete in interface ContractUpdateTransactionBodyOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The hookIdsToDelete at the given index.
    • setHookIdsToDelete

      public ContractUpdateTransactionBody.Builder setHookIdsToDelete(int index, long value)
       *
       The ids the hooks to delete from the contract.
       
      repeated int64 hook_ids_to_delete = 16;
      Parameters:
      value - The hookIdsToDelete to set.
      Returns:
      This builder for chaining.
    • addHookIdsToDelete

      public ContractUpdateTransactionBody.Builder addHookIdsToDelete(long value)
       *
       The ids the hooks to delete from the contract.
       
      repeated int64 hook_ids_to_delete = 16;
      Parameters:
      value - The hookIdsToDelete to add.
      Returns:
      This builder for chaining.
    • addAllHookIdsToDelete

      public ContractUpdateTransactionBody.Builder addAllHookIdsToDelete(Iterable<? extends Long> values)
       *
       The ids the hooks to delete from the contract.
       
      repeated int64 hook_ids_to_delete = 16;
      Parameters:
      values - The hookIdsToDelete to add.
      Returns:
      This builder for chaining.
    • clearHookIdsToDelete

      public ContractUpdateTransactionBody.Builder clearHookIdsToDelete()
       *
       The ids the hooks to delete from the contract.
       
      repeated int64 hook_ids_to_delete = 16;
      Returns:
      This builder for chaining.
    • getHookCreationDetailsList

      public List<HookCreationDetails> getHookCreationDetailsList()
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
      Specified by:
      getHookCreationDetailsList in interface ContractUpdateTransactionBodyOrBuilder
    • getHookCreationDetailsCount

      public int getHookCreationDetailsCount()
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
      Specified by:
      getHookCreationDetailsCount in interface ContractUpdateTransactionBodyOrBuilder
    • getHookCreationDetails

      public HookCreationDetails getHookCreationDetails(int index)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
      Specified by:
      getHookCreationDetails in interface ContractUpdateTransactionBodyOrBuilder
    • setHookCreationDetails

      public ContractUpdateTransactionBody.Builder setHookCreationDetails(int index, HookCreationDetails value)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
    • setHookCreationDetails

      public ContractUpdateTransactionBody.Builder setHookCreationDetails(int index, HookCreationDetails.Builder builderForValue)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
    • addHookCreationDetails

      public ContractUpdateTransactionBody.Builder addHookCreationDetails(HookCreationDetails value)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
    • addHookCreationDetails

      public ContractUpdateTransactionBody.Builder addHookCreationDetails(int index, HookCreationDetails value)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
    • addHookCreationDetails

      public ContractUpdateTransactionBody.Builder addHookCreationDetails(HookCreationDetails.Builder builderForValue)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
    • addHookCreationDetails

      public ContractUpdateTransactionBody.Builder addHookCreationDetails(int index, HookCreationDetails.Builder builderForValue)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
    • addAllHookCreationDetails

      public ContractUpdateTransactionBody.Builder addAllHookCreationDetails(Iterable<? extends HookCreationDetails> values)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
    • clearHookCreationDetails

      public ContractUpdateTransactionBody.Builder clearHookCreationDetails()
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;
    • removeHookCreationDetails

      public ContractUpdateTransactionBody.Builder removeHookCreationDetails(int index)
       *
       The hooks to create for the contract.
       
      repeated .com.hedera.hapi.node.hooks.HookCreationDetails hook_creation_details = 17;