Class Operation.OperationBody

java.lang.Object
org.stellar.sdk.xdr.Operation.OperationBody
All Implemented Interfaces:
XdrElement
Enclosing class:
Operation

public static class Operation.OperationBody extends Object implements XdrElement
OperationBody's original definition in the XDR file is:
 union switch (OperationType type)
     {
     case CREATE_ACCOUNT:
         CreateAccountOp createAccountOp;
     case PAYMENT:
         PaymentOp paymentOp;
     case PATH_PAYMENT_STRICT_RECEIVE:
         PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp;
     case MANAGE_SELL_OFFER:
         ManageSellOfferOp manageSellOfferOp;
     case CREATE_PASSIVE_SELL_OFFER:
         CreatePassiveSellOfferOp createPassiveSellOfferOp;
     case SET_OPTIONS:
         SetOptionsOp setOptionsOp;
     case CHANGE_TRUST:
         ChangeTrustOp changeTrustOp;
     case ALLOW_TRUST:
         AllowTrustOp allowTrustOp;
     case ACCOUNT_MERGE:
         MuxedAccount destination;
     case INFLATION:
         void;
     case MANAGE_DATA:
         ManageDataOp manageDataOp;
     case BUMP_SEQUENCE:
         BumpSequenceOp bumpSequenceOp;
     case MANAGE_BUY_OFFER:
         ManageBuyOfferOp manageBuyOfferOp;
     case PATH_PAYMENT_STRICT_SEND:
         PathPaymentStrictSendOp pathPaymentStrictSendOp;
     case CREATE_CLAIMABLE_BALANCE:
         CreateClaimableBalanceOp createClaimableBalanceOp;
     case CLAIM_CLAIMABLE_BALANCE:
         ClaimClaimableBalanceOp claimClaimableBalanceOp;
     case BEGIN_SPONSORING_FUTURE_RESERVES:
         BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp;
     case END_SPONSORING_FUTURE_RESERVES:
         void;
     case REVOKE_SPONSORSHIP:
         RevokeSponsorshipOp revokeSponsorshipOp;
     case CLAWBACK:
         ClawbackOp clawbackOp;
     case CLAWBACK_CLAIMABLE_BALANCE:
         ClawbackClaimableBalanceOp clawbackClaimableBalanceOp;
     case SET_TRUST_LINE_FLAGS:
         SetTrustLineFlagsOp setTrustLineFlagsOp;
     case LIQUIDITY_POOL_DEPOSIT:
         LiquidityPoolDepositOp liquidityPoolDepositOp;
     case LIQUIDITY_POOL_WITHDRAW:
         LiquidityPoolWithdrawOp liquidityPoolWithdrawOp;
     case INVOKE_HOST_FUNCTION:
         InvokeHostFunctionOp invokeHostFunctionOp;
     case EXTEND_FOOTPRINT_TTL:
         ExtendFootprintTTLOp extendFootprintTTLOp;
     case RESTORE_FOOTPRINT:
         RestoreFootprintOp restoreFootprintOp;
     }
 
  • Constructor Details

    • OperationBody

      public OperationBody()
    • OperationBody

      public OperationBody(OperationType discriminant, CreateAccountOp createAccountOp, PaymentOp paymentOp, PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp, ManageSellOfferOp manageSellOfferOp, CreatePassiveSellOfferOp createPassiveSellOfferOp, SetOptionsOp setOptionsOp, ChangeTrustOp changeTrustOp, AllowTrustOp allowTrustOp, MuxedAccount destination, ManageDataOp manageDataOp, BumpSequenceOp bumpSequenceOp, ManageBuyOfferOp manageBuyOfferOp, PathPaymentStrictSendOp pathPaymentStrictSendOp, CreateClaimableBalanceOp createClaimableBalanceOp, ClaimClaimableBalanceOp claimClaimableBalanceOp, BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp, RevokeSponsorshipOp revokeSponsorshipOp, ClawbackOp clawbackOp, ClawbackClaimableBalanceOp clawbackClaimableBalanceOp, SetTrustLineFlagsOp setTrustLineFlagsOp, LiquidityPoolDepositOp liquidityPoolDepositOp, LiquidityPoolWithdrawOp liquidityPoolWithdrawOp, InvokeHostFunctionOp invokeHostFunctionOp, ExtendFootprintTTLOp extendFootprintTTLOp, RestoreFootprintOp restoreFootprintOp)
      Creates a new OperationBody instance.
      Parameters:
      discriminant - the discriminant field value
      createAccountOp - the createAccountOp field value
      paymentOp - the paymentOp field value
      pathPaymentStrictReceiveOp - the pathPaymentStrictReceiveOp field value
      manageSellOfferOp - the manageSellOfferOp field value
      createPassiveSellOfferOp - the createPassiveSellOfferOp field value
      setOptionsOp - the setOptionsOp field value
      changeTrustOp - the changeTrustOp field value
      allowTrustOp - the allowTrustOp field value
      destination - the destination field value
      manageDataOp - the manageDataOp field value
      bumpSequenceOp - the bumpSequenceOp field value
      manageBuyOfferOp - the manageBuyOfferOp field value
      pathPaymentStrictSendOp - the pathPaymentStrictSendOp field value
      createClaimableBalanceOp - the createClaimableBalanceOp field value
      claimClaimableBalanceOp - the claimClaimableBalanceOp field value
      beginSponsoringFutureReservesOp - the beginSponsoringFutureReservesOp field value
      revokeSponsorshipOp - the revokeSponsorshipOp field value
      clawbackOp - the clawbackOp field value
      clawbackClaimableBalanceOp - the clawbackClaimableBalanceOp field value
      setTrustLineFlagsOp - the setTrustLineFlagsOp field value
      liquidityPoolDepositOp - the liquidityPoolDepositOp field value
      liquidityPoolWithdrawOp - the liquidityPoolWithdrawOp field value
      invokeHostFunctionOp - the invokeHostFunctionOp field value
      extendFootprintTTLOp - the extendFootprintTTLOp field value
      restoreFootprintOp - the restoreFootprintOp field value
  • Method Details

    • encode

      public void encode(XdrDataOutputStream stream) throws IOException
      Description copied from interface: XdrElement
      Encodes this value to XDR and writes it to the provided stream.
      Specified by:
      encode in interface XdrElement
      Parameters:
      stream - the destination XDR output stream
      Throws:
      IOException - if an I/O error occurs while writing the value
    • decode

      public static Operation.OperationBody decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

      public static Operation.OperationBody decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static Operation.OperationBody fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static Operation.OperationBody fromXdrByteArray(byte[] xdr) throws IOException
      Throws:
      IOException
    • toJson

      public String toJson()
      Description copied from interface: XdrElement
      Serializes this value to JSON.
      Specified by:
      toJson in interface XdrElement
      Returns:
      the JSON representation of this value
    • fromJson

      public static Operation.OperationBody fromJson(String json)
    • builder

    • toBuilder

    • getDiscriminant

      public OperationType getDiscriminant()
      Value of the discriminant field.
      Returns:
      the discriminant field value
    • getCreateAccountOp

      public CreateAccountOp getCreateAccountOp()
      Value of the createAccountOp field.
      Returns:
      the createAccountOp field value
    • getPaymentOp

      public PaymentOp getPaymentOp()
      Value of the paymentOp field.
      Returns:
      the paymentOp field value
    • getPathPaymentStrictReceiveOp

      public PathPaymentStrictReceiveOp getPathPaymentStrictReceiveOp()
      Value of the pathPaymentStrictReceiveOp field.
      Returns:
      the pathPaymentStrictReceiveOp field value
    • getManageSellOfferOp

      public ManageSellOfferOp getManageSellOfferOp()
      Value of the manageSellOfferOp field.
      Returns:
      the manageSellOfferOp field value
    • getCreatePassiveSellOfferOp

      public CreatePassiveSellOfferOp getCreatePassiveSellOfferOp()
      Value of the createPassiveSellOfferOp field.
      Returns:
      the createPassiveSellOfferOp field value
    • getSetOptionsOp

      public SetOptionsOp getSetOptionsOp()
      Value of the setOptionsOp field.
      Returns:
      the setOptionsOp field value
    • getChangeTrustOp

      public ChangeTrustOp getChangeTrustOp()
      Value of the changeTrustOp field.
      Returns:
      the changeTrustOp field value
    • getAllowTrustOp

      public AllowTrustOp getAllowTrustOp()
      Value of the allowTrustOp field.
      Returns:
      the allowTrustOp field value
    • getDestination

      public MuxedAccount getDestination()
      Value of the destination field.
      Returns:
      the destination field value
    • getManageDataOp

      public ManageDataOp getManageDataOp()
      Value of the manageDataOp field.
      Returns:
      the manageDataOp field value
    • getBumpSequenceOp

      public BumpSequenceOp getBumpSequenceOp()
      Value of the bumpSequenceOp field.
      Returns:
      the bumpSequenceOp field value
    • getManageBuyOfferOp

      public ManageBuyOfferOp getManageBuyOfferOp()
      Value of the manageBuyOfferOp field.
      Returns:
      the manageBuyOfferOp field value
    • getPathPaymentStrictSendOp

      public PathPaymentStrictSendOp getPathPaymentStrictSendOp()
      Value of the pathPaymentStrictSendOp field.
      Returns:
      the pathPaymentStrictSendOp field value
    • getCreateClaimableBalanceOp

      public CreateClaimableBalanceOp getCreateClaimableBalanceOp()
      Value of the createClaimableBalanceOp field.
      Returns:
      the createClaimableBalanceOp field value
    • getClaimClaimableBalanceOp

      public ClaimClaimableBalanceOp getClaimClaimableBalanceOp()
      Value of the claimClaimableBalanceOp field.
      Returns:
      the claimClaimableBalanceOp field value
    • getBeginSponsoringFutureReservesOp

      public BeginSponsoringFutureReservesOp getBeginSponsoringFutureReservesOp()
      Value of the beginSponsoringFutureReservesOp field.
      Returns:
      the beginSponsoringFutureReservesOp field value
    • getRevokeSponsorshipOp

      public RevokeSponsorshipOp getRevokeSponsorshipOp()
      Value of the revokeSponsorshipOp field.
      Returns:
      the revokeSponsorshipOp field value
    • getClawbackOp

      public ClawbackOp getClawbackOp()
      Value of the clawbackOp field.
      Returns:
      the clawbackOp field value
    • getClawbackClaimableBalanceOp

      public ClawbackClaimableBalanceOp getClawbackClaimableBalanceOp()
      Value of the clawbackClaimableBalanceOp field.
      Returns:
      the clawbackClaimableBalanceOp field value
    • getSetTrustLineFlagsOp

      public SetTrustLineFlagsOp getSetTrustLineFlagsOp()
      Value of the setTrustLineFlagsOp field.
      Returns:
      the setTrustLineFlagsOp field value
    • getLiquidityPoolDepositOp

      public LiquidityPoolDepositOp getLiquidityPoolDepositOp()
      Value of the liquidityPoolDepositOp field.
      Returns:
      the liquidityPoolDepositOp field value
    • getLiquidityPoolWithdrawOp

      public LiquidityPoolWithdrawOp getLiquidityPoolWithdrawOp()
      Value of the liquidityPoolWithdrawOp field.
      Returns:
      the liquidityPoolWithdrawOp field value
    • getInvokeHostFunctionOp

      public InvokeHostFunctionOp getInvokeHostFunctionOp()
      Value of the invokeHostFunctionOp field.
      Returns:
      the invokeHostFunctionOp field value
    • getExtendFootprintTTLOp

      public ExtendFootprintTTLOp getExtendFootprintTTLOp()
      Value of the extendFootprintTTLOp field.
      Returns:
      the extendFootprintTTLOp field value
    • getRestoreFootprintOp

      public RestoreFootprintOp getRestoreFootprintOp()
      Value of the restoreFootprintOp field.
      Returns:
      the restoreFootprintOp field value
    • setDiscriminant

      public void setDiscriminant(OperationType discriminant)
      Value of the discriminant field.
      Parameters:
      discriminant - the discriminant field value
    • setCreateAccountOp

      public void setCreateAccountOp(CreateAccountOp createAccountOp)
      Value of the createAccountOp field.
      Parameters:
      createAccountOp - the createAccountOp field value
    • setPaymentOp

      public void setPaymentOp(PaymentOp paymentOp)
      Value of the paymentOp field.
      Parameters:
      paymentOp - the paymentOp field value
    • setPathPaymentStrictReceiveOp

      public void setPathPaymentStrictReceiveOp(PathPaymentStrictReceiveOp pathPaymentStrictReceiveOp)
      Value of the pathPaymentStrictReceiveOp field.
      Parameters:
      pathPaymentStrictReceiveOp - the pathPaymentStrictReceiveOp field value
    • setManageSellOfferOp

      public void setManageSellOfferOp(ManageSellOfferOp manageSellOfferOp)
      Value of the manageSellOfferOp field.
      Parameters:
      manageSellOfferOp - the manageSellOfferOp field value
    • setCreatePassiveSellOfferOp

      public void setCreatePassiveSellOfferOp(CreatePassiveSellOfferOp createPassiveSellOfferOp)
      Value of the createPassiveSellOfferOp field.
      Parameters:
      createPassiveSellOfferOp - the createPassiveSellOfferOp field value
    • setSetOptionsOp

      public void setSetOptionsOp(SetOptionsOp setOptionsOp)
      Value of the setOptionsOp field.
      Parameters:
      setOptionsOp - the setOptionsOp field value
    • setChangeTrustOp

      public void setChangeTrustOp(ChangeTrustOp changeTrustOp)
      Value of the changeTrustOp field.
      Parameters:
      changeTrustOp - the changeTrustOp field value
    • setAllowTrustOp

      public void setAllowTrustOp(AllowTrustOp allowTrustOp)
      Value of the allowTrustOp field.
      Parameters:
      allowTrustOp - the allowTrustOp field value
    • setDestination

      public void setDestination(MuxedAccount destination)
      Value of the destination field.
      Parameters:
      destination - the destination field value
    • setManageDataOp

      public void setManageDataOp(ManageDataOp manageDataOp)
      Value of the manageDataOp field.
      Parameters:
      manageDataOp - the manageDataOp field value
    • setBumpSequenceOp

      public void setBumpSequenceOp(BumpSequenceOp bumpSequenceOp)
      Value of the bumpSequenceOp field.
      Parameters:
      bumpSequenceOp - the bumpSequenceOp field value
    • setManageBuyOfferOp

      public void setManageBuyOfferOp(ManageBuyOfferOp manageBuyOfferOp)
      Value of the manageBuyOfferOp field.
      Parameters:
      manageBuyOfferOp - the manageBuyOfferOp field value
    • setPathPaymentStrictSendOp

      public void setPathPaymentStrictSendOp(PathPaymentStrictSendOp pathPaymentStrictSendOp)
      Value of the pathPaymentStrictSendOp field.
      Parameters:
      pathPaymentStrictSendOp - the pathPaymentStrictSendOp field value
    • setCreateClaimableBalanceOp

      public void setCreateClaimableBalanceOp(CreateClaimableBalanceOp createClaimableBalanceOp)
      Value of the createClaimableBalanceOp field.
      Parameters:
      createClaimableBalanceOp - the createClaimableBalanceOp field value
    • setClaimClaimableBalanceOp

      public void setClaimClaimableBalanceOp(ClaimClaimableBalanceOp claimClaimableBalanceOp)
      Value of the claimClaimableBalanceOp field.
      Parameters:
      claimClaimableBalanceOp - the claimClaimableBalanceOp field value
    • setBeginSponsoringFutureReservesOp

      public void setBeginSponsoringFutureReservesOp(BeginSponsoringFutureReservesOp beginSponsoringFutureReservesOp)
      Value of the beginSponsoringFutureReservesOp field.
      Parameters:
      beginSponsoringFutureReservesOp - the beginSponsoringFutureReservesOp field value
    • setRevokeSponsorshipOp

      public void setRevokeSponsorshipOp(RevokeSponsorshipOp revokeSponsorshipOp)
      Value of the revokeSponsorshipOp field.
      Parameters:
      revokeSponsorshipOp - the revokeSponsorshipOp field value
    • setClawbackOp

      public void setClawbackOp(ClawbackOp clawbackOp)
      Value of the clawbackOp field.
      Parameters:
      clawbackOp - the clawbackOp field value
    • setClawbackClaimableBalanceOp

      public void setClawbackClaimableBalanceOp(ClawbackClaimableBalanceOp clawbackClaimableBalanceOp)
      Value of the clawbackClaimableBalanceOp field.
      Parameters:
      clawbackClaimableBalanceOp - the clawbackClaimableBalanceOp field value
    • setSetTrustLineFlagsOp

      public void setSetTrustLineFlagsOp(SetTrustLineFlagsOp setTrustLineFlagsOp)
      Value of the setTrustLineFlagsOp field.
      Parameters:
      setTrustLineFlagsOp - the setTrustLineFlagsOp field value
    • setLiquidityPoolDepositOp

      public void setLiquidityPoolDepositOp(LiquidityPoolDepositOp liquidityPoolDepositOp)
      Value of the liquidityPoolDepositOp field.
      Parameters:
      liquidityPoolDepositOp - the liquidityPoolDepositOp field value
    • setLiquidityPoolWithdrawOp

      public void setLiquidityPoolWithdrawOp(LiquidityPoolWithdrawOp liquidityPoolWithdrawOp)
      Value of the liquidityPoolWithdrawOp field.
      Parameters:
      liquidityPoolWithdrawOp - the liquidityPoolWithdrawOp field value
    • setInvokeHostFunctionOp

      public void setInvokeHostFunctionOp(InvokeHostFunctionOp invokeHostFunctionOp)
      Value of the invokeHostFunctionOp field.
      Parameters:
      invokeHostFunctionOp - the invokeHostFunctionOp field value
    • setExtendFootprintTTLOp

      public void setExtendFootprintTTLOp(ExtendFootprintTTLOp extendFootprintTTLOp)
      Value of the extendFootprintTTLOp field.
      Parameters:
      extendFootprintTTLOp - the extendFootprintTTLOp field value
    • setRestoreFootprintOp

      public void setRestoreFootprintOp(RestoreFootprintOp restoreFootprintOp)
      Value of the restoreFootprintOp field.
      Parameters:
      restoreFootprintOp - the restoreFootprintOp field value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object