Class DndInfoParams

java.lang.Object
com.hubspot.slack.client.methods.params.dnd.DndInfoParams
All Implemented Interfaces:
DndInfoParamsIF

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

Use the builder to create immutable instances: DndInfoParams.builder(). Use the static factory method to create immutable instances: DndInfoParams.of().

  • Method Details

    • getUserId

      public Optional<String> getUserId()
      Specified by:
      getUserId in interface DndInfoParamsIF
      Returns:
      The value of the userId attribute
    • withUserId

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

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

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

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

      public static DndInfoParams of(Optional<String> userId)
      Construct a new immutable DndInfoParams instance.
      Parameters:
      userId - The value for the userId attribute
      Returns:
      An immutable DndInfoParams instance
    • of

      public static DndInfoParams of(@Nullable String userId)
      Construct a new immutable DndInfoParams instance.
      Parameters:
      userId - The value for the userId attribute
      Returns:
      An immutable DndInfoParams instance
    • copyOf

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

      public static DndInfoParams.Builder builder()
      Creates a builder for DndInfoParams.
       DndInfoParams.builder()
          .setUserId(Optional<String>) // optional userId
          .build();
       
      Returns:
      A new DndInfoParams builder