Package com.daml.ledger.javaapi.data
Class CommandsSubmission
java.lang.Object
com.daml.ledger.javaapi.data.CommandsSubmission
This class can be used to build a valid submission. It provides
#create(String, String, String, List)
for initial creation and methods to set optional parameters
e.g withActAs(List)
, withWorkflowId(String)
etc.
Usage:
var submission = CommandsSubmission.create(userId, commandId, Optional.of(synchronizerId), commands) .withAccessToken(token) .withWorkflowId(workflowId) .with...
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CommandsSubmission
(@NonNull Optional<String> workflowId, @NonNull String userId, @NonNull String commandId, @NonNull List<@NonNull ? extends HasCommands> commands, @NonNull Optional<Duration> deduplicationDuration, @NonNull Optional<Long> deduplicationOffset, @NonNull Optional<Instant> minLedgerTimeAbs, @NonNull Optional<Duration> minLedgerTimeRel, @NonNull List<@NonNull String> actAs, @NonNull List<@NonNull String> readAs, @NonNull Optional<String> submissionId, @NonNull List<@NonNull DisclosedContract> disclosedContracts, @NonNull Optional<String> synchronizerId, @NonNull Optional<String> accessToken, @NonNull List<String> packageIdSelectionPreference, @NonNull List<@NonNull PrefetchContractKey> prefetchContractKeys) -
Method Summary
Modifier and TypeMethodDescriptionstatic CommandsSubmission
create
(String userId, String commandId, Optional<String> synchronizerId, @NonNull List<@NonNull ? extends HasCommands> commands) boolean
static CommandsSubmission
fromProto
(CommandsOuterClass.Commands commands) getActAs()
@NonNull String
@NonNull List<? extends HasCommands>
@NonNull List<DisclosedContract>
@NonNull String
int
hashCode()
toProto()
toString()
withAccessToken
(@NonNull String accessToken) withCommands
(List<@NonNull ? extends HasCommands> commands) withDeduplicationDuration
(@NonNull Duration deduplicationDuration) withDeduplicationOffset
(@NonNull Long deduplicationOffset) withDisclosedContracts
(List<@NonNull DisclosedContract> disclosedContracts) withMinLedgerTimeAbs
(@NonNull Instant minLedgerTimeAbs) withMinLedgerTimeRel
(@NonNull Duration minLedgerTimeRel) withPackageIdSelectionPreference
(List<@NonNull String> packageIdSelectionPreference) withPrefetchContractKeys
(@NonNull List<@NonNull PrefetchContractKey> prefetchContractKeys) withReadAs
(List<@NonNull String> readAs) withWorkflowId
(String workflowId)
-
Constructor Details
-
CommandsSubmission
protected CommandsSubmission(@NonNull Optional<String> workflowId, @NonNull String userId, @NonNull String commandId, @NonNull List<@NonNull ? extends HasCommands> commands, @NonNull Optional<Duration> deduplicationDuration, @NonNull Optional<Long> deduplicationOffset, @NonNull Optional<Instant> minLedgerTimeAbs, @NonNull Optional<Duration> minLedgerTimeRel, @NonNull List<@NonNull String> actAs, @NonNull List<@NonNull String> readAs, @NonNull Optional<String> submissionId, @NonNull List<@NonNull DisclosedContract> disclosedContracts, @NonNull Optional<String> synchronizerId, @NonNull Optional<String> accessToken, @NonNull List<String> packageIdSelectionPreference, @NonNull List<@NonNull PrefetchContractKey> prefetchContractKeys)
-
-
Method Details
-
create
public static CommandsSubmission create(String userId, String commandId, Optional<String> synchronizerId, @NonNull List<@NonNull ? extends HasCommands> commands) -
getWorkflowId
-
getPackageIdSelectionPreference
-
getUserId
-
getCommandId
-
getCommands
-
getDeduplicationDuration
-
getDeduplicationOffset
-
getMinLedgerTimeAbs
-
getMinLedgerTimeRel
-
getActAs
-
getReadAs
-
getSubmissionId
-
getDisclosedContracts
-
getSynchronizerId
-
getAccessToken
-
getPrefetchContractKeys
-
withWorkflowId
-
withActAs
-
withActAs
-
withReadAs
-
withMinLedgerTimeAbs
-
withMinLedgerTimeRel
-
withDeduplicationDuration
public CommandsSubmission withDeduplicationDuration(@NonNull Duration deduplicationDuration) throws CommandsSubmission.RedundantDeduplicationSpecification -
withDeduplicationOffset
public CommandsSubmission withDeduplicationOffset(@NonNull Long deduplicationOffset) throws CommandsSubmission.RedundantDeduplicationSpecification -
withCommands
-
withAccessToken
-
withDisclosedContracts
public CommandsSubmission withDisclosedContracts(List<@NonNull DisclosedContract> disclosedContracts) -
withPackageIdSelectionPreference
public CommandsSubmission withPackageIdSelectionPreference(List<@NonNull String> packageIdSelectionPreference) -
withPrefetchContractKeys
public CommandsSubmission withPrefetchContractKeys(@NonNull List<@NonNull PrefetchContractKey> prefetchContractKeys) -
toProto
-
fromProto
-
toString
-
equals
-
hashCode
public int hashCode()
-