Record Class ConnectionResult

java.lang.Object
java.lang.Record
io.jenkins.plugins.changeinvestigator.slack.transport.ConnectionResult

public record ConnectionResult(boolean success, String safeMessage, String workspaceName, String channelName, SlackRoute route, long retryAfterSeconds, String authenticationDigest) extends Record
Bounded display text and a verified route from a non-posting connection check. The authentication digest is SHA-256 of the bot token, never the token itself.
  • Constructor Details

    • ConnectionResult

      public ConnectionResult(boolean success, String safeMessage, String workspaceName, String channelName, SlackRoute route)
    • ConnectionResult

      public ConnectionResult(boolean success, String safeMessage, String workspaceName, String channelName, SlackRoute route, long retryAfterSeconds)
    • ConnectionResult

      public ConnectionResult(boolean success, String safeMessage, String workspaceName, String channelName, SlackRoute route, long retryAfterSeconds, String authenticationDigest)
      Creates an instance of a ConnectionResult record class.
      Parameters:
      success - the value for the success record component
      safeMessage - the value for the safeMessage record component
      workspaceName - the value for the workspaceName record component
      channelName - the value for the channelName record component
      route - the value for the route record component
      retryAfterSeconds - the value for the retryAfterSeconds record component
      authenticationDigest - the value for the authenticationDigest record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • success

      public boolean success()
      Returns the value of the success record component.
      Returns:
      the value of the success record component
    • safeMessage

      public String safeMessage()
      Returns the value of the safeMessage record component.
      Returns:
      the value of the safeMessage record component
    • workspaceName

      public String workspaceName()
      Returns the value of the workspaceName record component.
      Returns:
      the value of the workspaceName record component
    • channelName

      public String channelName()
      Returns the value of the channelName record component.
      Returns:
      the value of the channelName record component
    • route

      public SlackRoute route()
      Returns the value of the route record component.
      Returns:
      the value of the route record component
    • retryAfterSeconds

      public long retryAfterSeconds()
      Returns the value of the retryAfterSeconds record component.
      Returns:
      the value of the retryAfterSeconds record component
    • authenticationDigest

      public String authenticationDigest()
      Returns the value of the authenticationDigest record component.
      Returns:
      the value of the authenticationDigest record component