Class SlackFileObject

java.lang.Object
com.hubspot.slack.client.models.blocks.SlackFileObject
All Implemented Interfaces:
SlackFileObjectIF

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

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

  • Method Details

    • getUrl

      public Optional<String> getUrl()
      Specified by:
      getUrl in interface SlackFileObjectIF
      Returns:
      The value of the url attribute
    • getId

      public Optional<String> getId()
      Specified by:
      getId in interface SlackFileObjectIF
      Returns:
      The value of the id attribute
    • withUrl

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

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

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

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

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

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

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

      public static SlackFileObject.Builder builder()
      Creates a builder for SlackFileObject.
       SlackFileObject.builder()
          .setUrl(Optional<String>) // optional url
          .setId(Optional<String>) // optional id
          .build();
       
      Returns:
      A new SlackFileObject builder