Class DndInfoResponse

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

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

Use the builder to create immutable instances: DndInfoResponse.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
    • isDndEnabled

      public boolean isDndEnabled()
      Specified by:
      isDndEnabled in interface DndInfoResponseIF
      Returns:
      The value of the dndEnabled attribute
    • getNextDndStart

      public Optional<Instant> getNextDndStart()
      Specified by:
      getNextDndStart in interface DndInfoResponseIF
      Returns:
      The value of the nextDndStart attribute
    • getNextDndEnd

      public Optional<Instant> getNextDndEnd()
      Specified by:
      getNextDndEnd in interface DndInfoResponseIF
      Returns:
      The value of the nextDndEnd attribute
    • isSnoozeEnabled

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

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

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

      public final DndInfoResponse 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 DndInfoResponse 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 DndInfoResponse 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
    • withDndEnabled

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

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

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

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

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

      public final DndInfoResponse 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 DndInfoResponse 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 DndInfoResponse 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 DndInfoResponse 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 DndInfoResponse 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 DndInfoResponse 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, dndEnabled, nextDndStart, nextDndEnd, snoozeEnabled, snoozeEnd, snoozeRemaining.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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