Class SCSpecEventV0

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

public class SCSpecEventV0 extends Object implements XdrElement
SCSpecEventV0's original definition in the XDR file is:
 struct SCSpecEventV0
 {
     string doc<SC_SPEC_DOC_LIMIT>;
     string lib<80>;
     SCSymbol name;
     SCSymbol prefixTopics<2>;
     SCSpecEventParamV0 params<>;
     SCSpecEventDataFormat dataFormat;
 };
 
  • Constructor Details

    • SCSpecEventV0

      public SCSpecEventV0()
    • SCSpecEventV0

      public SCSpecEventV0(XdrString doc, XdrString lib, SCSymbol name, SCSymbol[] prefixTopics, SCSpecEventParamV0[] params, SCSpecEventDataFormat dataFormat)
      Creates a new SCSpecEventV0 instance.
      Parameters:
      doc - the doc field value
      lib - the lib field value
      name - the name field value
      prefixTopics - the prefixTopics field value
      params - the params field value
      dataFormat - the dataFormat 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 SCSpecEventV0 decode(XdrDataInputStream stream, int maxDepth) throws IOException
      Throws:
      IOException
    • decode

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

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

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

      public static SCSpecEventV0.SCSpecEventV0Builder builder()
    • toBuilder

    • getDoc

      public XdrString getDoc()
      Value of the doc field.
      Returns:
      the doc field value
    • getLib

      public XdrString getLib()
      Value of the lib field.
      Returns:
      the lib field value
    • getName

      public SCSymbol getName()
      Value of the name field.
      Returns:
      the name field value
    • getPrefixTopics

      public SCSymbol[] getPrefixTopics()
      Value of the prefixTopics field.
      Returns:
      the prefixTopics field value
    • getParams

      public SCSpecEventParamV0[] getParams()
      Value of the params field.
      Returns:
      the params field value
    • getDataFormat

      public SCSpecEventDataFormat getDataFormat()
      Value of the dataFormat field.
      Returns:
      the dataFormat field value
    • setDoc

      public void setDoc(XdrString doc)
      Value of the doc field.
      Parameters:
      doc - the doc field value
    • setLib

      public void setLib(XdrString lib)
      Value of the lib field.
      Parameters:
      lib - the lib field value
    • setName

      public void setName(SCSymbol name)
      Value of the name field.
      Parameters:
      name - the name field value
    • setPrefixTopics

      public void setPrefixTopics(SCSymbol[] prefixTopics)
      Value of the prefixTopics field.
      Parameters:
      prefixTopics - the prefixTopics field value
    • setParams

      public void setParams(SCSpecEventParamV0[] params)
      Value of the params field.
      Parameters:
      params - the params field value
    • setDataFormat

      public void setDataFormat(SCSpecEventDataFormat dataFormat)
      Value of the dataFormat field.
      Parameters:
      dataFormat - the dataFormat 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