Class ViewPlainTextInput

java.lang.Object
com.hubspot.slack.client.models.interaction.views.ViewPlainTextInput
All Implemented Interfaces:
ViewInput, ViewPlainTextInputIF

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

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

  • Method Details

    • getType

      public ViewInputType getType()
      Specified by:
      getType in interface ViewInput
      Returns:
      The value of the type attribute
    • getValue

      public Optional<String> getValue()
      Specified by:
      getValue in interface ViewPlainTextInputIF
      Returns:
      The value of the value attribute
    • withType

      public final ViewPlainTextInput withType(ViewInputType value)
      Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • withValue

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

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

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

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

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

      public static ViewPlainTextInput.Builder builder()
      Creates a builder for ViewPlainTextInput.
       ViewPlainTextInput.builder()
          .setType(com.hubspot.slack.client.models.interaction.views.ViewInputType) // required type
          .setValue(Optional<String>) // optional value
          .build();
       
      Returns:
      A new ViewPlainTextInput builder