Class ChallengeEvent

java.lang.Object
com.hubspot.slack.client.models.events.ChallengeEvent
All Implemented Interfaces:
ChallengeEventIF

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

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

  • Method Details

    • getToken

      public String getToken()
      Specified by:
      getToken in interface ChallengeEventIF
      Returns:
      The value of the token attribute
    • getChallenge

      public String getChallenge()
      Specified by:
      getChallenge in interface ChallengeEventIF
      Returns:
      The value of the challenge attribute
    • getType

      public String getType()
      Specified by:
      getType in interface ChallengeEventIF
      Returns:
      The value of the type attribute
    • withToken

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

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

      public final ChallengeEvent withType(String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check 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
    • equals

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

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

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

      public static ChallengeEvent.Builder builder()
      Creates a builder for ChallengeEvent.
       ChallengeEvent.builder()
          .setToken(String) // required token
          .setChallenge(String) // required challenge
          .setType(String) // required type
          .build();
       
      Returns:
      A new ChallengeEvent builder