Package org.stellar.sdk.xdr
Class AllowTrustOp
java.lang.Object
org.stellar.sdk.xdr.AllowTrustOp
- All Implemented Interfaces:
XdrElement
AllowTrustOp's original definition in the XDR file is:
struct AllowTrustOp
{
AccountID trustor;
AssetCode asset;
// One of 0, AUTHORIZED_FLAG, or AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG
uint32 authorize;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionAllowTrustOp(AccountID trustor, AssetCode asset, Uint32 authorize) Creates a newAllowTrustOpinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static AllowTrustOpdecode(XdrDataInputStream stream) static AllowTrustOpdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic AllowTrustOpstatic AllowTrustOpfromXdrBase64(String xdr) static AllowTrustOpfromXdrByteArray(byte[] xdr) getAsset()Value of theassetfield.Value of theauthorizefield.Value of thetrustorfield.inthashCode()voidValue of theassetfield.voidsetAuthorize(Uint32 authorize) Value of theauthorizefield.voidsetTrustor(AccountID trustor) Value of thetrustorfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
AllowTrustOp
public AllowTrustOp() -
AllowTrustOp
Creates a newAllowTrustOpinstance.- Parameters:
trustor- thetrustorfield valueasset- theassetfield valueauthorize- theauthorizefield 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
- 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
-
getTrustor
Value of thetrustorfield.- Returns:
- the
trustorfield value
-
getAsset
Value of theassetfield.- Returns:
- the
assetfield value
-
getAuthorize
Value of theauthorizefield.- Returns:
- the
authorizefield value
-
setTrustor
Value of thetrustorfield.- Parameters:
trustor- thetrustorfield value
-
setAsset
Value of theassetfield.- Parameters:
asset- theassetfield value
-
setAuthorize
Value of theauthorizefield.- Parameters:
authorize- theauthorizefield value
-
equals
-
hashCode
public int hashCode() -
toString
-