Class SetOptionsOp

java.lang.Object
org.stellar.sdk.xdr.SetOptionsOp
All Implemented Interfaces:
XdrElement

public class SetOptionsOp extends Object implements XdrElement
SetOptionsOp's original definition in the XDR file is:
 struct SetOptionsOp
 {
     AccountID* inflationDest; // sets the inflation destination

     uint32* clearFlags; // which flags to clear
     uint32* setFlags;   // which flags to set

     // account threshold manipulation
     uint32* masterWeight; // weight of the master account
     uint32* lowThreshold;
     uint32* medThreshold;
     uint32* highThreshold;

     string32* homeDomain; // sets the home domain

     // Add, update or remove a signer for the account
     // signer is deleted if the weight is 0
     Signer* signer;
 };
 
  • Constructor Details

    • SetOptionsOp

      public SetOptionsOp()
    • SetOptionsOp

      public SetOptionsOp(AccountID inflationDest, Uint32 clearFlags, Uint32 setFlags, Uint32 masterWeight, Uint32 lowThreshold, Uint32 medThreshold, Uint32 highThreshold, String32 homeDomain, Signer signer)
      Creates a new SetOptionsOp instance.
      Parameters:
      inflationDest - the inflationDest field value
      clearFlags - the clearFlags field value
      setFlags - the setFlags field value
      masterWeight - the masterWeight field value
      lowThreshold - the lowThreshold field value
      medThreshold - the medThreshold field value
      highThreshold - the highThreshold field value
      homeDomain - the homeDomain field value
      signer - the signer 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 SetOptionsOp decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

      public static SetOptionsOp decode(XdrDataInputStream stream) throws IOException
      Throws:
      IOException
    • fromXdrBase64

      public static SetOptionsOp fromXdrBase64(String xdr) throws IOException
      Throws:
      IOException
    • fromXdrByteArray

      public static SetOptionsOp 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 SetOptionsOp fromJson(String json)
    • builder

      public static SetOptionsOp.SetOptionsOpBuilder builder()
    • toBuilder

    • getInflationDest

      public AccountID getInflationDest()
      Value of the inflationDest field.
      Returns:
      the inflationDest field value
    • getClearFlags

      public Uint32 getClearFlags()
      Value of the clearFlags field.
      Returns:
      the clearFlags field value
    • getSetFlags

      public Uint32 getSetFlags()
      Value of the setFlags field.
      Returns:
      the setFlags field value
    • getMasterWeight

      public Uint32 getMasterWeight()
      Value of the masterWeight field.
      Returns:
      the masterWeight field value
    • getLowThreshold

      public Uint32 getLowThreshold()
      Value of the lowThreshold field.
      Returns:
      the lowThreshold field value
    • getMedThreshold

      public Uint32 getMedThreshold()
      Value of the medThreshold field.
      Returns:
      the medThreshold field value
    • getHighThreshold

      public Uint32 getHighThreshold()
      Value of the highThreshold field.
      Returns:
      the highThreshold field value
    • getHomeDomain

      public String32 getHomeDomain()
      Value of the homeDomain field.
      Returns:
      the homeDomain field value
    • getSigner

      public Signer getSigner()
      Value of the signer field.
      Returns:
      the signer field value
    • setInflationDest

      public void setInflationDest(AccountID inflationDest)
      Value of the inflationDest field.
      Parameters:
      inflationDest - the inflationDest field value
    • setClearFlags

      public void setClearFlags(Uint32 clearFlags)
      Value of the clearFlags field.
      Parameters:
      clearFlags - the clearFlags field value
    • setSetFlags

      public void setSetFlags(Uint32 setFlags)
      Value of the setFlags field.
      Parameters:
      setFlags - the setFlags field value
    • setMasterWeight

      public void setMasterWeight(Uint32 masterWeight)
      Value of the masterWeight field.
      Parameters:
      masterWeight - the masterWeight field value
    • setLowThreshold

      public void setLowThreshold(Uint32 lowThreshold)
      Value of the lowThreshold field.
      Parameters:
      lowThreshold - the lowThreshold field value
    • setMedThreshold

      public void setMedThreshold(Uint32 medThreshold)
      Value of the medThreshold field.
      Parameters:
      medThreshold - the medThreshold field value
    • setHighThreshold

      public void setHighThreshold(Uint32 highThreshold)
      Value of the highThreshold field.
      Parameters:
      highThreshold - the highThreshold field value
    • setHomeDomain

      public void setHomeDomain(String32 homeDomain)
      Value of the homeDomain field.
      Parameters:
      homeDomain - the homeDomain field value
    • setSigner

      public void setSigner(Signer signer)
      Value of the signer field.
      Parameters:
      signer - the signer 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