Package org.stellar.sdk.xdr
Class ManageBuyOfferResult
java.lang.Object
org.stellar.sdk.xdr.ManageBuyOfferResult
- All Implemented Interfaces:
XdrElement
ManageBuyOfferResult's original definition in the XDR file is:
union ManageBuyOfferResult switch (ManageBuyOfferResultCode code)
{
case MANAGE_BUY_OFFER_SUCCESS:
ManageOfferSuccessResult success;
case MANAGE_BUY_OFFER_MALFORMED:
case MANAGE_BUY_OFFER_SELL_NO_TRUST:
case MANAGE_BUY_OFFER_BUY_NO_TRUST:
case MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED:
case MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED:
case MANAGE_BUY_OFFER_LINE_FULL:
case MANAGE_BUY_OFFER_UNDERFUNDED:
case MANAGE_BUY_OFFER_CROSS_SELF:
case MANAGE_BUY_OFFER_SELL_NO_ISSUER:
case MANAGE_BUY_OFFER_BUY_NO_ISSUER:
case MANAGE_BUY_OFFER_NOT_FOUND:
case MANAGE_BUY_OFFER_LOW_RESERVE:
void;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionManageBuyOfferResult(ManageBuyOfferResultCode discriminant, ManageOfferSuccessResult success) Creates a newManageBuyOfferResultinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ManageBuyOfferResultdecode(XdrDataInputStream stream) static ManageBuyOfferResultdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ManageBuyOfferResultstatic ManageBuyOfferResultfromXdrBase64(String xdr) static ManageBuyOfferResultfromXdrByteArray(byte[] xdr) Value of thediscriminantfield.Value of thesuccessfield.inthashCode()voidsetDiscriminant(ManageBuyOfferResultCode discriminant) Value of thediscriminantfield.voidsetSuccess(ManageOfferSuccessResult success) Value of thesuccessfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
ManageBuyOfferResult
public ManageBuyOfferResult() -
ManageBuyOfferResult
public ManageBuyOfferResult(ManageBuyOfferResultCode discriminant, ManageOfferSuccessResult success) Creates a newManageBuyOfferResultinstance.- Parameters:
discriminant- thediscriminantfield valuesuccess- thesuccessfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
public static ManageBuyOfferResult decode(XdrDataInputStream stream, int maxDepth) throws IOException - Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getDiscriminant
Value of thediscriminantfield.- Returns:
- the
discriminantfield value
-
getSuccess
Value of thesuccessfield.- Returns:
- the
successfield value
-
setDiscriminant
Value of thediscriminantfield.- Parameters:
discriminant- thediscriminantfield value
-
setSuccess
Value of thesuccessfield.- Parameters:
success- thesuccessfield value
-
equals
-
hashCode
public int hashCode() -
toString
-