Class DndSnoozeResponse

java.lang.Object
com.hubspot.slack.client.models.response.dnd.DndSnoozeResponse
All Implemented Interfaces:
DndSnoozeResponseIF, SlackResponse

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

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

  • Method Details

    • isOk

      public boolean isOk()
      Specified by:
      isOk in interface SlackResponse
      Returns:
      The value of the ok attribute
    • getResponseMetadata

      public Optional<ResponseMetadata> getResponseMetadata()
      Specified by:
      getResponseMetadata in interface SlackResponse
      Returns:
      The value of the responseMetadata attribute
    • isSnoozeEnabled

      public boolean isSnoozeEnabled()
      Specified by:
      isSnoozeEnabled in interface DndSnoozeResponseIF
      Returns:
      The value of the snoozeEnabled attribute
    • getSnoozeEnd

      public Optional<Instant> getSnoozeEnd()
      Specified by:
      getSnoozeEnd in interface DndSnoozeResponseIF
      Returns:
      The value of the snoozeEnd attribute
    • getSnoozeRemaining

      public Optional<Integer> getSnoozeRemaining()
      Specified by:
      getSnoozeRemaining in interface DndSnoozeResponseIF
      Returns:
      The value of the snoozeRemaining attribute
    • withOk

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

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

      public final DndSnoozeResponse withResponseMetadata(Optional<? extends ResponseMetadata> optional)
      Copy the current immutable object by setting an optional value for the responseMetadata 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 responseMetadata
      Returns:
      A modified copy or this if not changed
    • withSnoozeEnabled

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

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

      public final DndSnoozeResponse withSnoozeEnd(Optional<? extends Instant> optional)
      Copy the current immutable object by setting an optional value for the snoozeEnd 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 snoozeEnd
      Returns:
      A modified copy or this if not changed
    • withSnoozeRemaining

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of DndSnoozeResponse 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: ok, responseMetadata, snoozeEnabled, snoozeEnd, snoozeRemaining.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static DndSnoozeResponse.Builder builder()
      Creates a builder for DndSnoozeResponse.
       DndSnoozeResponse.builder()
          .setOk(boolean) // required ok
          .setResponseMetadata(Optional<ResponseMetadata>) // optional responseMetadata
          .setSnoozeEnabled(boolean) // required snoozeEnabled
          .setSnoozeEnd(Optional<java.time.Instant>) // optional snoozeEnd
          .setSnoozeRemaining(Optional<Integer>) // optional snoozeRemaining
          .build();
       
      Returns:
      A new DndSnoozeResponse builder