Class ImOpenResponse

java.lang.Object
com.hubspot.slack.client.models.response.im.ImOpenResponse
All Implemented Interfaces:
ImOpenResponseIF, SlackResponse

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

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

      public boolean isNoOp()
      Specified by:
      isNoOp in interface ImOpenResponseIF
      Returns:
      The value of the noOp attribute
    • isAlreadyOpen

      public boolean isAlreadyOpen()
      Specified by:
      isAlreadyOpen in interface ImOpenResponseIF
      Returns:
      The value of the alreadyOpen attribute
    • getChannel

      public Optional<ImChannel> getChannel()
      Specified by:
      getChannel in interface ImOpenResponseIF
      Returns:
      The value of the channel attribute
    • withOk

      public final ImOpenResponse 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 ImOpenResponse 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 ImOpenResponse 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
    • withNoOp

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

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

      public final ImOpenResponse withChannel(@Nullable ImChannel 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 ImOpenResponse withChannel(Optional<? extends ImChannel> optional)
      Copy the current immutable object by setting an optional value for the channel 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 channel
      Returns:
      A modified copy or this if not changed
    • equals

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

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

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

      public static ImOpenResponse.Builder builder()
      Creates a builder for ImOpenResponse.
       ImOpenResponse.builder()
          .setOk(boolean) // required ok
          .setResponseMetadata(Optional<ResponseMetadata>) // optional responseMetadata
          .setNoOp(boolean) // optional noOp
          .setAlreadyOpen(boolean) // optional alreadyOpen
          .setChannel(Optional<com.hubspot.slack.client.models.channel.ImChannel>) // optional channel
          .build();
       
      Returns:
      A new ImOpenResponse builder