Class ImmutableActivityPayloadForm
java.lang.Object
io.jenkins.plugins.trunk.model.event.ImmutableActivityPayloadForm
- All Implemented Interfaces:
ActivityPayloadForm
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableActivityPayloadForm
extends Object
implements ActivityPayloadForm
Immutable implementation of
ActivityPayloadForm.
Use the builder to create immutable instances:
ImmutableActivityPayloadForm.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableActivityPayloadForm. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableActivityPayloadForm.static ImmutableActivityPayloadFormcopyOf(ActivityPayloadForm instance) Creates an immutable copy of aActivityPayloadFormvalue.booleanThis instance is equal to all instances ofImmutableActivityPayloadFormthat have equal attribute values.inthashCode()Computes a hash code from attributes:metrics,tags,timestamps.com.google.common.collect.ImmutableList<ActivityMetricForm>metrics()com.google.common.collect.ImmutableList<ActivityTagForm>tags()com.google.common.collect.ImmutableList<ActivityTimestampForm>toString()Prints the immutable valueActivityPayloadFormwith attribute values.withMetrics(ActivityMetricForm... elements) Copy the current immutable object with elements that replace the content ofmetrics.withMetrics(Iterable<? extends ActivityMetricForm> elements) Copy the current immutable object with elements that replace the content ofmetrics.withTags(ActivityTagForm... elements) Copy the current immutable object with elements that replace the content oftags.withTags(Iterable<? extends ActivityTagForm> elements) Copy the current immutable object with elements that replace the content oftags.withTimestamps(ActivityTimestampForm... elements) Copy the current immutable object with elements that replace the content oftimestamps.withTimestamps(Iterable<? extends ActivityTimestampForm> elements) Copy the current immutable object with elements that replace the content oftimestamps.
-
Method Details
-
metrics
- Specified by:
metricsin interfaceActivityPayloadForm- Returns:
- The value of the
metricsattribute
-
tags
- Specified by:
tagsin interfaceActivityPayloadForm- Returns:
- The value of the
tagsattribute
-
timestamps
- Specified by:
timestampsin interfaceActivityPayloadForm- Returns:
- The value of the
timestampsattribute
-
withMetrics
Copy the current immutable object with elements that replace the content ofmetrics.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMetrics
public final ImmutableActivityPayloadForm withMetrics(@Nullable Iterable<? extends ActivityMetricForm> elements) Copy the current immutable object with elements that replace the content ofmetrics. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of metrics elements to set- Returns:
- A modified copy of
thisobject
-
withTags
Copy the current immutable object with elements that replace the content oftags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTags
public final ImmutableActivityPayloadForm withTags(@Nullable Iterable<? extends ActivityTagForm> elements) Copy the current immutable object with elements that replace the content oftags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of tags elements to set- Returns:
- A modified copy of
thisobject
-
withTimestamps
public final ImmutableActivityPayloadForm withTimestamps(@Nullable ActivityTimestampForm... elements) Copy the current immutable object with elements that replace the content oftimestamps.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTimestamps
public final ImmutableActivityPayloadForm withTimestamps(@Nullable Iterable<? extends ActivityTimestampForm> elements) Copy the current immutable object with elements that replace the content oftimestamps. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of timestamps elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableActivityPayloadFormthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:metrics,tags,timestamps. -
toString
Prints the immutable valueActivityPayloadFormwith attribute values. -
copyOf
Creates an immutable copy of aActivityPayloadFormvalue. 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 ActivityPayloadForm instance
-
builder
Creates a builder forImmutableActivityPayloadForm.ImmutableActivityPayloadForm.builder() .metrics(List<io.jenkins.plugins.trunk.model.event.ActivityMetricForm> | null) // nullablemetrics.tags(List<io.jenkins.plugins.trunk.model.event.ActivityTagForm> | null) // nullabletags.timestamps(List<io.jenkins.plugins.trunk.model.event.ActivityTimestampForm> | null) // nullabletimestamps.build();- Returns:
- A new ImmutableActivityPayloadForm builder
-