Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class ScheduleCreateTransactionBody.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<ScheduleCreateTransactionBody,ScheduleCreateTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<ScheduleCreateTransactionBody,ScheduleCreateTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.ScheduleCreateTransactionBody.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,ScheduleCreateTransactionBodyOrBuilder,Cloneable
- Enclosing class:
ScheduleCreateTransactionBody
public static final class ScheduleCreateTransactionBody.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<ScheduleCreateTransactionBody,ScheduleCreateTransactionBody.Builder>
implements ScheduleCreateTransactionBodyOrBuilder
*
Create a new Schedule.
#### Requirements
This transaction SHALL create a new _schedule_ entity in network state.<br/>
The schedule created SHALL contain the `scheduledTransactionBody` to be
executed.<br/>
If successful the receipt SHALL contain a `scheduleID` with the full
identifier of the schedule created.<br/>
When a schedule _executes_ successfully, the receipt SHALL include a
`scheduledTransactionID` with the `TransactionID` of the transaction that
executed.<br/>
When a scheduled transaction is executed the network SHALL charge the
regular _service_ fee for the transaction to the `payerAccountID` for
that schedule, but SHALL NOT charge node or network fees.<br/>
If the `payerAccountID` field is not set, the effective `payerAccountID`
SHALL be the `payer` for this create transaction.<br/>
If an `adminKey` is not specified, or is an empty `KeyList`, the schedule
created SHALL be immutable.<br/>
An immutable schedule MAY be signed, and MAY execute, but SHALL NOT be
deleted.<br/>
If two schedules have the same values for all fields except `payerAccountID`
then those two schedules SHALL be deemed "identical".<br/>
If a `scheduleCreate` requests a new schedule that is identical to an
existing schedule, the transaction SHALL fail and SHALL return a status
code of `IDENTICAL_SCHEDULE_ALREADY_CREATED` in the receipt.<br/>
The receipt for a duplicate schedule SHALL include the `ScheduleID` of the
existing schedule and the `TransactionID` of the earlier `scheduleCreate`
so that the earlier schedule may be queried and/or referred to in a
subsequent `scheduleSign`.
#### Signature Requirements
A `scheduleSign` transaction SHALL be used to add additional signatures
to an existing schedule.<br/>
Each signature SHALL "activate" the corresponding cryptographic("primitive")
key for that schedule.<br/>
Signature requirements SHALL be met when the set of active keys includes
all keys required by the scheduled transaction.<br/>
A scheduled transaction for a "long term" schedule SHALL NOT execute if
the signature requirements for that transaction are not met when the
network consensus time reaches the schedule `expiration_time`.<br/>
A "short term" schedule SHALL execute immediately once signature
requirements are met. This MAY be immediately when created.
#### Long Term Schedules
A "short term" schedule SHALL have the flag `wait_for_expiry` _unset_.<br/>
A "long term" schedule SHALL have the flag `wait_for_expiry` _set_.<br/>
A "long term" schedule SHALL NOT be accepted if the network configuration
`scheduling.longTermEnabled` is not enabled.<br/>
A "long term" schedule SHALL execute when the current consensus time
matches or exceeds the `expiration_time` for that schedule, if the
signature requirements for the scheduled transaction
are met at that instant.<br/>
A "long term" schedule SHALL NOT execute before the current consensus time
matches or exceeds the `expiration_time` for that schedule.<br/>
A "long term" schedule SHALL expire, and be removed from state, after the
network consensus time exceeds the schedule `expiration_time`.<br/>
A short term schedule SHALL expire, and be removed from state,
after the network consensus time exceeds the current network
configuration for `ledger.scheduleTxExpiryTimeSecs`.
> Note
>> Long term schedules are not (as of release 0.56.0) enabled. Any schedule
>> created currently MUST NOT set the `wait_for_expiry` flag.<br/>
>> When long term schedules are not enabled, schedules SHALL NOT be
>> executed at expiration, and MUST meet signature requirements strictly
>> before expiration to be executed.
### Block Stream Effects
If the scheduled transaction is executed immediately, the transaction
record SHALL include a `scheduleRef` with the schedule identifier of the
schedule created.
Protobuf type proto.ScheduleCreateTransactionBody-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescription* A `Key` required to delete this schedule.* An expiration time.* A short description of the schedule.* An account identifier of a `payer` for the scheduled transaction.* A scheduled transaction.* A flag to delay execution until expiration.* A `Key` required to delete this schedule.* An expiration time.getMemo()* A short description of the schedule.com.google.protobuf.ByteString* A short description of the schedule.* An account identifier of a `payer` for the scheduled transaction.* A scheduled transaction.boolean* A flag to delay execution until expiration.boolean* A `Key` required to delete this schedule.boolean* An expiration time.boolean* An account identifier of a `payer` for the scheduled transaction.boolean* A scheduled transaction.mergeAdminKey(Key value) * A `Key` required to delete this schedule.mergeExpirationTime(Timestamp value) * An expiration time.mergePayerAccountID(AccountID value) * An account identifier of a `payer` for the scheduled transaction.* A scheduled transaction.setAdminKey(Key value) * A `Key` required to delete this schedule.setAdminKey(Key.Builder builderForValue) * A `Key` required to delete this schedule.setExpirationTime(Timestamp value) * An expiration time.setExpirationTime(Timestamp.Builder builderForValue) * An expiration time.* A short description of the schedule.setMemoBytes(com.google.protobuf.ByteString value) * A short description of the schedule.setPayerAccountID(AccountID value) * An account identifier of a `payer` for the scheduled transaction.setPayerAccountID(AccountID.Builder builderForValue) * An account identifier of a `payer` for the scheduled transaction.* A scheduled transaction.setScheduledTransactionBody(SchedulableTransactionBody.Builder builderForValue) * A scheduled transaction.setWaitForExpiry(boolean value) * A flag to delay execution until expiration.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasScheduledTransactionBody
public boolean hasScheduledTransactionBody()* A scheduled transaction. <p> This value is REQUIRED.<br/> This transaction body MUST be one of the types enabled in the network configuration value `scheduling.whitelist`.
.proto.SchedulableTransactionBody scheduledTransactionBody = 1;- Specified by:
hasScheduledTransactionBodyin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- Whether the scheduledTransactionBody field is set.
-
getScheduledTransactionBody
* A scheduled transaction. <p> This value is REQUIRED.<br/> This transaction body MUST be one of the types enabled in the network configuration value `scheduling.whitelist`.
.proto.SchedulableTransactionBody scheduledTransactionBody = 1;- Specified by:
getScheduledTransactionBodyin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- The scheduledTransactionBody.
-
setScheduledTransactionBody
public ScheduleCreateTransactionBody.Builder setScheduledTransactionBody(SchedulableTransactionBody value) * A scheduled transaction. <p> This value is REQUIRED.<br/> This transaction body MUST be one of the types enabled in the network configuration value `scheduling.whitelist`.
.proto.SchedulableTransactionBody scheduledTransactionBody = 1; -
setScheduledTransactionBody
public ScheduleCreateTransactionBody.Builder setScheduledTransactionBody(SchedulableTransactionBody.Builder builderForValue) * A scheduled transaction. <p> This value is REQUIRED.<br/> This transaction body MUST be one of the types enabled in the network configuration value `scheduling.whitelist`.
.proto.SchedulableTransactionBody scheduledTransactionBody = 1; -
mergeScheduledTransactionBody
public ScheduleCreateTransactionBody.Builder mergeScheduledTransactionBody(SchedulableTransactionBody value) * A scheduled transaction. <p> This value is REQUIRED.<br/> This transaction body MUST be one of the types enabled in the network configuration value `scheduling.whitelist`.
.proto.SchedulableTransactionBody scheduledTransactionBody = 1; -
clearScheduledTransactionBody
* A scheduled transaction. <p> This value is REQUIRED.<br/> This transaction body MUST be one of the types enabled in the network configuration value `scheduling.whitelist`.
.proto.SchedulableTransactionBody scheduledTransactionBody = 1; -
getMemo
* A short description of the schedule. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 2;- Specified by:
getMemoin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- The memo.
-
getMemoBytes
public com.google.protobuf.ByteString getMemoBytes()* A short description of the schedule. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 2;- Specified by:
getMemoBytesin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- The bytes for memo.
-
setMemo
* A short description of the schedule. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 2;- Parameters:
value- The memo to set.- Returns:
- This builder for chaining.
-
clearMemo
* A short description of the schedule. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 2;- Returns:
- This builder for chaining.
-
setMemoBytes
* A short description of the schedule. <p> This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
string memo = 2;- Parameters:
value- The bytes for memo to set.- Returns:
- This builder for chaining.
-
hasAdminKey
public boolean hasAdminKey()* A `Key` required to delete this schedule. <p> If this is not set, or is an empty `KeyList`, this schedule SHALL be immutable and SHALL NOT be deleted.
.proto.Key adminKey = 3;- Specified by:
hasAdminKeyin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- Whether the adminKey field is set.
-
getAdminKey
* A `Key` required to delete this schedule. <p> If this is not set, or is an empty `KeyList`, this schedule SHALL be immutable and SHALL NOT be deleted.
.proto.Key adminKey = 3;- Specified by:
getAdminKeyin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- The adminKey.
-
setAdminKey
* A `Key` required to delete this schedule. <p> If this is not set, or is an empty `KeyList`, this schedule SHALL be immutable and SHALL NOT be deleted.
.proto.Key adminKey = 3; -
setAdminKey
* A `Key` required to delete this schedule. <p> If this is not set, or is an empty `KeyList`, this schedule SHALL be immutable and SHALL NOT be deleted.
.proto.Key adminKey = 3; -
mergeAdminKey
* A `Key` required to delete this schedule. <p> If this is not set, or is an empty `KeyList`, this schedule SHALL be immutable and SHALL NOT be deleted.
.proto.Key adminKey = 3; -
clearAdminKey
* A `Key` required to delete this schedule. <p> If this is not set, or is an empty `KeyList`, this schedule SHALL be immutable and SHALL NOT be deleted.
.proto.Key adminKey = 3; -
hasPayerAccountID
public boolean hasPayerAccountID()* An account identifier of a `payer` for the scheduled transaction. <p> This value MAY be unset. If unset, the `payer` for this `scheduleCreate` transaction SHALL be the `payer` for the scheduled transaction.<br/> If this is set, the identified account SHALL be charged the fees required for the scheduled transaction when it is executed.<br/> If the actual `payer` for the _scheduled_ transaction lacks sufficient HBAR balance to pay service fees for the scheduled transaction _when it executes_, the scheduled transaction SHALL fail with `INSUFFICIENT_PAYER_BALANCE`.<br/>
.proto.AccountID payerAccountID = 4;- Specified by:
hasPayerAccountIDin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- Whether the payerAccountID field is set.
-
getPayerAccountID
* An account identifier of a `payer` for the scheduled transaction. <p> This value MAY be unset. If unset, the `payer` for this `scheduleCreate` transaction SHALL be the `payer` for the scheduled transaction.<br/> If this is set, the identified account SHALL be charged the fees required for the scheduled transaction when it is executed.<br/> If the actual `payer` for the _scheduled_ transaction lacks sufficient HBAR balance to pay service fees for the scheduled transaction _when it executes_, the scheduled transaction SHALL fail with `INSUFFICIENT_PAYER_BALANCE`.<br/>
.proto.AccountID payerAccountID = 4;- Specified by:
getPayerAccountIDin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- The payerAccountID.
-
setPayerAccountID
* An account identifier of a `payer` for the scheduled transaction. <p> This value MAY be unset. If unset, the `payer` for this `scheduleCreate` transaction SHALL be the `payer` for the scheduled transaction.<br/> If this is set, the identified account SHALL be charged the fees required for the scheduled transaction when it is executed.<br/> If the actual `payer` for the _scheduled_ transaction lacks sufficient HBAR balance to pay service fees for the scheduled transaction _when it executes_, the scheduled transaction SHALL fail with `INSUFFICIENT_PAYER_BALANCE`.<br/>
.proto.AccountID payerAccountID = 4; -
setPayerAccountID
* An account identifier of a `payer` for the scheduled transaction. <p> This value MAY be unset. If unset, the `payer` for this `scheduleCreate` transaction SHALL be the `payer` for the scheduled transaction.<br/> If this is set, the identified account SHALL be charged the fees required for the scheduled transaction when it is executed.<br/> If the actual `payer` for the _scheduled_ transaction lacks sufficient HBAR balance to pay service fees for the scheduled transaction _when it executes_, the scheduled transaction SHALL fail with `INSUFFICIENT_PAYER_BALANCE`.<br/>
.proto.AccountID payerAccountID = 4; -
mergePayerAccountID
* An account identifier of a `payer` for the scheduled transaction. <p> This value MAY be unset. If unset, the `payer` for this `scheduleCreate` transaction SHALL be the `payer` for the scheduled transaction.<br/> If this is set, the identified account SHALL be charged the fees required for the scheduled transaction when it is executed.<br/> If the actual `payer` for the _scheduled_ transaction lacks sufficient HBAR balance to pay service fees for the scheduled transaction _when it executes_, the scheduled transaction SHALL fail with `INSUFFICIENT_PAYER_BALANCE`.<br/>
.proto.AccountID payerAccountID = 4; -
clearPayerAccountID
* An account identifier of a `payer` for the scheduled transaction. <p> This value MAY be unset. If unset, the `payer` for this `scheduleCreate` transaction SHALL be the `payer` for the scheduled transaction.<br/> If this is set, the identified account SHALL be charged the fees required for the scheduled transaction when it is executed.<br/> If the actual `payer` for the _scheduled_ transaction lacks sufficient HBAR balance to pay service fees for the scheduled transaction _when it executes_, the scheduled transaction SHALL fail with `INSUFFICIENT_PAYER_BALANCE`.<br/>
.proto.AccountID payerAccountID = 4; -
hasExpirationTime
public boolean hasExpirationTime()* An expiration time. <p> If not set, the expiration SHALL default to the current consensus time advanced by either the network configuration value `scheduling.maxExpirationFutureSeconds`, if `wait_for_expiry` is set and "long term" schedules are enabled, or the network configuration value `ledger.scheduleTxExpiryTimeSecs` otherwise.
.proto.Timestamp expiration_time = 5;- Specified by:
hasExpirationTimein interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- Whether the expirationTime field is set.
-
getExpirationTime
* An expiration time. <p> If not set, the expiration SHALL default to the current consensus time advanced by either the network configuration value `scheduling.maxExpirationFutureSeconds`, if `wait_for_expiry` is set and "long term" schedules are enabled, or the network configuration value `ledger.scheduleTxExpiryTimeSecs` otherwise.
.proto.Timestamp expiration_time = 5;- Specified by:
getExpirationTimein interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- The expirationTime.
-
setExpirationTime
* An expiration time. <p> If not set, the expiration SHALL default to the current consensus time advanced by either the network configuration value `scheduling.maxExpirationFutureSeconds`, if `wait_for_expiry` is set and "long term" schedules are enabled, or the network configuration value `ledger.scheduleTxExpiryTimeSecs` otherwise.
.proto.Timestamp expiration_time = 5; -
setExpirationTime
* An expiration time. <p> If not set, the expiration SHALL default to the current consensus time advanced by either the network configuration value `scheduling.maxExpirationFutureSeconds`, if `wait_for_expiry` is set and "long term" schedules are enabled, or the network configuration value `ledger.scheduleTxExpiryTimeSecs` otherwise.
.proto.Timestamp expiration_time = 5; -
mergeExpirationTime
* An expiration time. <p> If not set, the expiration SHALL default to the current consensus time advanced by either the network configuration value `scheduling.maxExpirationFutureSeconds`, if `wait_for_expiry` is set and "long term" schedules are enabled, or the network configuration value `ledger.scheduleTxExpiryTimeSecs` otherwise.
.proto.Timestamp expiration_time = 5; -
clearExpirationTime
* An expiration time. <p> If not set, the expiration SHALL default to the current consensus time advanced by either the network configuration value `scheduling.maxExpirationFutureSeconds`, if `wait_for_expiry` is set and "long term" schedules are enabled, or the network configuration value `ledger.scheduleTxExpiryTimeSecs` otherwise.
.proto.Timestamp expiration_time = 5; -
getWaitForExpiry
public boolean getWaitForExpiry()* A flag to delay execution until expiration. <p> If this flag is set the scheduled transaction SHALL NOT be evaluated for execution before the network consensus time matches or exceeds the `expiration_time`.<br/> If this flag is not set, the scheduled transaction SHALL be executed immediately when all required signatures are received, whether in this `scheduleCreate` transaction or a later `scheduleSign` transaction.<br/> This value SHALL NOT be used and MUST NOT be set when the network configuration value `scheduling.longTermEnabled` is not enabled.
bool wait_for_expiry = 13;- Specified by:
getWaitForExpiryin interfaceScheduleCreateTransactionBodyOrBuilder- Returns:
- The waitForExpiry.
-
setWaitForExpiry
* A flag to delay execution until expiration. <p> If this flag is set the scheduled transaction SHALL NOT be evaluated for execution before the network consensus time matches or exceeds the `expiration_time`.<br/> If this flag is not set, the scheduled transaction SHALL be executed immediately when all required signatures are received, whether in this `scheduleCreate` transaction or a later `scheduleSign` transaction.<br/> This value SHALL NOT be used and MUST NOT be set when the network configuration value `scheduling.longTermEnabled` is not enabled.
bool wait_for_expiry = 13;- Parameters:
value- The waitForExpiry to set.- Returns:
- This builder for chaining.
-
clearWaitForExpiry
* A flag to delay execution until expiration. <p> If this flag is set the scheduled transaction SHALL NOT be evaluated for execution before the network consensus time matches or exceeds the `expiration_time`.<br/> If this flag is not set, the scheduled transaction SHALL be executed immediately when all required signatures are received, whether in this `scheduleCreate` transaction or a later `scheduleSign` transaction.<br/> This value SHALL NOT be used and MUST NOT be set when the network configuration value `scheduling.longTermEnabled` is not enabled.
bool wait_for_expiry = 13;- Returns:
- This builder for chaining.
-