Package org.stellar.sdk.xdr
Class ManageSellOfferResult
java.lang.Object
org.stellar.sdk.xdr.ManageSellOfferResult
- All Implemented Interfaces:
XdrElement
ManageSellOfferResult's original definition in the XDR file is:
union ManageSellOfferResult switch (ManageSellOfferResultCode code)
{
case MANAGE_SELL_OFFER_SUCCESS:
ManageOfferSuccessResult success;
case MANAGE_SELL_OFFER_MALFORMED:
case MANAGE_SELL_OFFER_SELL_NO_TRUST:
case MANAGE_SELL_OFFER_BUY_NO_TRUST:
case MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED:
case MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED:
case MANAGE_SELL_OFFER_LINE_FULL:
case MANAGE_SELL_OFFER_UNDERFUNDED:
case MANAGE_SELL_OFFER_CROSS_SELF:
case MANAGE_SELL_OFFER_SELL_NO_ISSUER:
case MANAGE_SELL_OFFER_BUY_NO_ISSUER:
case MANAGE_SELL_OFFER_NOT_FOUND:
case MANAGE_SELL_OFFER_LOW_RESERVE:
void;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionManageSellOfferResult(ManageSellOfferResultCode discriminant, ManageOfferSuccessResult success) Creates a newManageSellOfferResultinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static ManageSellOfferResultdecode(XdrDataInputStream stream) static ManageSellOfferResultdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic ManageSellOfferResultstatic ManageSellOfferResultfromXdrBase64(String xdr) static ManageSellOfferResultfromXdrByteArray(byte[] xdr) Value of thediscriminantfield.Value of thesuccessfield.inthashCode()voidsetDiscriminant(ManageSellOfferResultCode 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
-
ManageSellOfferResult
public ManageSellOfferResult() -
ManageSellOfferResult
public ManageSellOfferResult(ManageSellOfferResultCode discriminant, ManageOfferSuccessResult success) Creates a newManageSellOfferResultinstance.- 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 ManageSellOfferResult 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
-