Class ResponseMetadata

java.lang.Object
com.hubspot.slack.client.models.response.ResponseMetadata
All Implemented Interfaces:
ResponseMetadataIF

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

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

  • Method Details

    • getNextCursor

      public Optional<String> getNextCursor()
      Specified by:
      getNextCursor in interface ResponseMetadataIF
      Returns:
      The value of the nextCursor attribute
    • withNextCursor

      public final ResponseMetadata withNextCursor(@Nullable String value)
      Copy the current immutable object by setting a present value for the optional nextCursor attribute.
      Parameters:
      value - The value for nextCursor, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withNextCursor

      public final ResponseMetadata withNextCursor(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the nextCursor 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 nextCursor
      Returns:
      A modified copy or this if not changed
    • equals

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

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

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

      public static ResponseMetadata.Builder builder()
      Creates a builder for ResponseMetadata.
       ResponseMetadata.builder()
          .setNextCursor(Optional<String>) // optional nextCursor
          .build();
       
      Returns:
      A new ResponseMetadata builder