Package se.diabol.jenkins.pipeline.model
Record Class Promotion
java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Promotion
- Record Components:
name- the promotion processstartTime- epoch milliseconds when the promotion randuration- milliseconds between the build start and the promotionuser- who promoted, or "anonymous"icon- path of the promotion's star icon relative to the Jenkins rootparams- the promotion's parameters as "name: value" strings
@ExportedBean(defaultVisibility=100)
public record Promotion(String name, long startTime, long duration, String user, String icon, List<String> params)
extends Record
A promotion of a build.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.name()Returns the value of thenamerecord component.params()Returns the value of theparamsrecord component.longReturns the value of thestartTimerecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Constructor Details
-
Promotion
public Promotion(String name, long startTime, long duration, String user, String icon, List<String> params) Creates an instance of aPromotionrecord class.- Parameters:
name- the value for thenamerecord componentstartTime- the value for thestartTimerecord componentduration- the value for thedurationrecord componentuser- the value for theuserrecord componenticon- the value for theiconrecord componentparams- the value for theparamsrecord 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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
startTime
@Exported public long startTime()Returns the value of thestartTimerecord component.- Returns:
- the value of the
startTimerecord component
-
duration
@Exported public long duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-