Class ImmutableAsyncFunctionCall

java.lang.Object
io.dialob.session.engine.session.ImmutableAsyncFunctionCall
All Implemented Interfaces:
AsyncFunctionCall

@Generated(from="AsyncFunctionCall", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAsyncFunctionCall extends Object implements AsyncFunctionCall
Immutable implementation of AsyncFunctionCall.

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

  • Method Details

    • getId

      public Optional<String> getId()
      Specified by:
      getId in interface AsyncFunctionCall
      Returns:
      The value of the id attribute
    • getTargetId

      public Optional<ItemId> getTargetId()
      Specified by:
      getTargetId in interface AsyncFunctionCall
      Returns:
      The value of the targetId attribute
    • getFunctionName

      public String getFunctionName()
      Specified by:
      getFunctionName in interface AsyncFunctionCall
      Returns:
      The value of the functionName attribute
    • getArgs

      public Object[] getArgs()
      Specified by:
      getArgs in interface AsyncFunctionCall
      Returns:
      A cloned args array
    • withId

      public final ImmutableAsyncFunctionCall withId(String value)
      Copy the current immutable object by setting a present value for the optional id attribute.
      Parameters:
      value - The value for id
      Returns:
      A modified copy or this if not changed
    • withId

      public final ImmutableAsyncFunctionCall withId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the id attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for id
      Returns:
      A modified copy or this if not changed
    • withTargetId

      public final ImmutableAsyncFunctionCall withTargetId(ItemId value)
      Copy the current immutable object by setting a present value for the optional targetId attribute.
      Parameters:
      value - The value for targetId
      Returns:
      A modified copy or this if not changed
    • withTargetId

      public final ImmutableAsyncFunctionCall withTargetId(Optional<? extends ItemId> optional)
      Copy the current immutable object by setting an optional value for the targetId attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for targetId
      Returns:
      A modified copy or this if not changed
    • withFunctionName

      public final ImmutableAsyncFunctionCall withFunctionName(String value)
      Copy the current immutable object by setting a value for the functionName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for functionName
      Returns:
      A modified copy or the this object
    • withArgs

      public final ImmutableAsyncFunctionCall withArgs(Object... elements)
      Copy the current immutable object with elements that replace the content of args. The array is cloned before being saved as attribute values.
      Parameters:
      elements - The elements for args
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAsyncFunctionCall 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: id, targetId, functionName, args.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableAsyncFunctionCall copyOf(AsyncFunctionCall instance)
      Creates an immutable copy of a AsyncFunctionCall 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 AsyncFunctionCall instance
    • builder

      public static ImmutableAsyncFunctionCall.Builder builder()
      Creates a builder for ImmutableAsyncFunctionCall.
       ImmutableAsyncFunctionCall.builder()
          .id(Optional<String>) // optional id
          .targetId(Optional<io.dialob.session.engine.session.model.ItemId>) // optional targetId
          .functionName(String) // required functionName
          .args(Object[]) // required args
          .build();
       
      Returns:
      A new ImmutableAsyncFunctionCall builder