Class ImmutableChannelVerifyResult

java.lang.Object
org.xrpl.xrpl4j.model.client.channels.ImmutableChannelVerifyResult
All Implemented Interfaces:
ChannelVerifyResult, XrplResult

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableChannelVerifyResult extends Object implements ChannelVerifyResult
Immutable implementation of ChannelVerifyResult.

Use the builder to create immutable instances: ImmutableChannelVerifyResult.builder().

  • Method Details

    • status

      public Optional<String> status()
      The value "success" indicates the request was successfully received and understood by the server.
      Specified by:
      status in interface XrplResult
      Returns:
      The String "success" if the request was successful, otherwise Optional.empty().
    • signatureVerified

      public boolean signatureVerified()
      If true, the signature is valid for the stated amount, channel, and public key.
      Specified by:
      signatureVerified in interface ChannelVerifyResult
      Returns:
      true if the signature was valid, otherwise false.
    • withStatus

      public final ImmutableChannelVerifyResult withStatus(String value)
      Copy the current immutable object by setting a present value for the optional status attribute.
      Parameters:
      value - The value for status
      Returns:
      A modified copy of this object
    • withStatus

      public final ImmutableChannelVerifyResult withStatus(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the status attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for status
      Returns:
      A modified copy of this object
    • withSignatureVerified

      public final ImmutableChannelVerifyResult withSignatureVerified(boolean value)
      Copy the current immutable object by setting a value for the signatureVerified attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for signatureVerified
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableChannelVerifyResult that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: status, signatureVerified.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ChannelVerifyResult with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableChannelVerifyResult copyOf(ChannelVerifyResult instance)
      Creates an immutable copy of a ChannelVerifyResult value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable ChannelVerifyResult instance
    • builder

      public static ImmutableChannelVerifyResult.Builder builder()
      Creates a builder for ImmutableChannelVerifyResult.
       ImmutableChannelVerifyResult.builder()
          .status(String) // optional status
          .signatureVerified(boolean) // required signatureVerified
          .build();
       
      Returns:
      A new ImmutableChannelVerifyResult builder