java.lang.Object
com.hubspot.slack.client.models.blocks.elements.TimePicker
All Implemented Interfaces:
BlockElement, HasActionId, TimePickerIF

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

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

  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface BlockElement
      Specified by:
      getType in interface TimePickerIF
      Returns:
      The computed-at-construction value of the type attribute
    • getActionId

      public String getActionId()
      Specified by:
      getActionId in interface HasActionId
      Specified by:
      getActionId in interface TimePickerIF
      Returns:
      The value of the actionId attribute
    • getPlaceholder

      public Optional<Text> getPlaceholder()
      Specified by:
      getPlaceholder in interface TimePickerIF
      Returns:
      The value of the placeholder attribute
    • getTimezone

      public Optional<String> getTimezone()
      Specified by:
      getTimezone in interface TimePickerIF
      Returns:
      The value of the timezone attribute
    • getInitialTime

      public Optional<LocalTime> getInitialTime()
      Specified by:
      getInitialTime in interface TimePickerIF
      Returns:
      The value of the initialTime attribute
    • getConfirmationDialog

      public Optional<ConfirmationDialog> getConfirmationDialog()
      Specified by:
      getConfirmationDialog in interface TimePickerIF
      Returns:
      The value of the confirmationDialog attribute
    • withActionId

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

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

      public final TimePicker withPlaceholder(Optional<? extends Text> optional)
      Copy the current immutable object by setting an optional value for the placeholder 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 placeholder
      Returns:
      A modified copy or this if not changed
    • withTimezone

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

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

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

      public final TimePicker withInitialTime(Optional<? extends LocalTime> optional)
      Copy the current immutable object by setting an optional value for the initialTime 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 initialTime
      Returns:
      A modified copy or this if not changed
    • withConfirmationDialog

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

      public final TimePicker withConfirmationDialog(Optional<? extends ConfirmationDialog> optional)
      Copy the current immutable object by setting an optional value for the confirmationDialog 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 confirmationDialog
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of TimePicker 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: type, actionId, placeholder, timezone, initialTime, confirmationDialog.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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

      public static TimePicker.Builder builder()
      Creates a builder for TimePicker.
       TimePicker.builder()
          .setActionId(String) // required actionId
          .setPlaceholder(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optional placeholder
          .setTimezone(Optional<String>) // optional timezone
          .setInitialTime(Optional<java.time.LocalTime>) // optional initialTime
          .setConfirmationDialog(Optional<com.hubspot.slack.client.models.blocks.objects.ConfirmationDialog>) // optional confirmationDialog
          .build();
       
      Returns:
      A new TimePicker builder