Package se.diabol.jenkins.pipeline.model
Record Class Permissions
java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Permissions
@ExportedBean(defaultVisibility=100)
public record Permissions(boolean build, boolean cancel)
extends Record
What the current user may do with a job; computed while exporting, never cached.
-
Constructor Summary
ConstructorsConstructorDescriptionPermissions(boolean build, boolean cancel) Creates an instance of aPermissionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbuild()Returns the value of thebuildrecord component.booleancancel()Returns the value of thecancelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static PermissionsPermissions of the current user on the job with the given full name; none when there is no such job.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Permissions
public Permissions(boolean build, boolean cancel) Creates an instance of aPermissionsrecord class.- Parameters:
build- the value for thebuildrecord componentcancel- the value for thecancelrecord component
-
-
Method Details
-
on
Permissions of the current user on the job with the given full name; none when there is no such job. -
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. All components in this record class are compared with '=='. -
build
@Exported public boolean build()Returns the value of thebuildrecord component.- Returns:
- the value of the
buildrecord component
-
cancel
@Exported public boolean cancel()Returns the value of thecancelrecord component.- Returns:
- the value of the
cancelrecord component
-