java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.ExternalRef
All Implemented Interfaces:
ExternalRefIF

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

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

  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface ExternalRefIF
      Returns:
      The value of the id attribute
    • getType

      public Optional<String> getType()
      Specified by:
      getType in interface ExternalRefIF
      Returns:
      The value of the type attribute
    • withId

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

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

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

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

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

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

      public static ExternalRef.Builder builder()
      Creates a builder for ExternalRef.
       ExternalRef.builder()
          .setId(String) // required id
          .setType(Optional<String>) // optional type
          .build();
       
      Returns:
      A new ExternalRef builder