Class ReactionsAddParams

java.lang.Object
com.hubspot.slack.client.methods.params.reactions.ReactionsAddParams
All Implemented Interfaces:
ReactionsAddParamsIF

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

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

  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface ReactionsAddParamsIF
      Returns:
      The value of the name attribute
    • getChannel

      public Optional<String> getChannel()
      Specified by:
      getChannel in interface ReactionsAddParamsIF
      Returns:
      The value of the channel attribute
    • getTimestamp

      public Optional<String> getTimestamp()
      Specified by:
      getTimestamp in interface ReactionsAddParamsIF
      Returns:
      The value of the timestamp attribute
    • getFile

      @Deprecated public Optional<String> getFile()
      Deprecated.
      As of 22nd August 2019, Slack has removed support for file comments - file threads are the replacement
      Specified by:
      getFile in interface ReactionsAddParamsIF
    • getFileComment

      @Deprecated public Optional<String> getFileComment()
      Deprecated.
      As of 22nd August 2019, Slack has removed support for file comments - file threads are the replacement
      Specified by:
      getFileComment in interface ReactionsAddParamsIF
    • withName

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

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

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

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

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

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

      @Deprecated public final ReactionsAddParams withFile(Optional<String> optional)
      Deprecated.
      Copy the current immutable object by setting an optional value for the file 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 file
      Returns:
      A modified copy or this if not changed
    • withFileComment

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

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

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

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

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

      public static ReactionsAddParams.Builder builder()
      Creates a builder for ReactionsAddParams.
       ReactionsAddParams.builder()
          .setName(String) // required name
          .setChannel(Optional<String>) // optional channel
          .setTimestamp(Optional<String>) // optional timestamp
          .setFile(Optional<String>) // optional file
          .setFileComment(Optional<String>) // optional fileComment
          .build();
       
      Returns:
      A new ReactionsAddParams builder