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 Summary
ConstructorsConstructorDescriptionConnectionResult(boolean success, String safeMessage, String workspaceName, String channelName, SlackRoute route) ConnectionResult(boolean success, String safeMessage, String workspaceName, String channelName, SlackRoute route, long retryAfterSeconds) ConnectionResult(boolean success, String safeMessage, String workspaceName, String channelName, SlackRoute route, long retryAfterSeconds, String authenticationDigest) Creates an instance of aConnectionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theauthenticationDigestrecord component.Returns the value of thechannelNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theretryAfterSecondsrecord component.route()Returns the value of therouterecord component.Returns the value of thesafeMessagerecord component.booleansuccess()Returns the value of thesuccessrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworkspaceNamerecord component.
-
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 aConnectionResultrecord class.- Parameters:
success- the value for thesuccessrecord componentsafeMessage- the value for thesafeMessagerecord componentworkspaceName- the value for theworkspaceNamerecord componentchannelName- the value for thechannelNamerecord componentroute- the value for therouterecord componentretryAfterSeconds- the value for theretryAfterSecondsrecord componentauthenticationDigest- the value for theauthenticationDigestrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
success
public boolean success()Returns the value of thesuccessrecord component.- Returns:
- the value of the
successrecord component
-
safeMessage
Returns the value of thesafeMessagerecord component.- Returns:
- the value of the
safeMessagerecord component
-
workspaceName
Returns the value of theworkspaceNamerecord component.- Returns:
- the value of the
workspaceNamerecord component
-
channelName
Returns the value of thechannelNamerecord component.- Returns:
- the value of the
channelNamerecord component
-
route
Returns the value of therouterecord component.- Returns:
- the value of the
routerecord component
-
retryAfterSeconds
public long retryAfterSeconds()Returns the value of theretryAfterSecondsrecord component.- Returns:
- the value of the
retryAfterSecondsrecord component
-
authenticationDigest
Returns the value of theauthenticationDigestrecord component.- Returns:
- the value of the
authenticationDigestrecord component
-