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().

  • Method Details

    • metrics

      @Nullable public com.google.common.collect.ImmutableList<ActivityMetricForm> metrics()
      Specified by:
      metrics in interface ActivityPayloadForm
      Returns:
      The value of the metrics attribute
    • tags

      @Nullable public com.google.common.collect.ImmutableList<ActivityTagForm> tags()
      Specified by:
      tags in interface ActivityPayloadForm
      Returns:
      The value of the tags attribute
    • timestamps

      @Nullable public com.google.common.collect.ImmutableList<ActivityTimestampForm> timestamps()
      Specified by:
      timestamps in interface ActivityPayloadForm
      Returns:
      The value of the timestamps attribute
    • withMetrics

      public final ImmutableActivityPayloadForm withMetrics(@Nullable ActivityMetricForm... elements)
      Copy the current immutable object with elements that replace the content of metrics.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withMetrics

      public final ImmutableActivityPayloadForm withMetrics(@Nullable Iterable<? extends ActivityMetricForm> elements)
      Copy the current immutable object with elements that replace the content of metrics. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of metrics elements to set
      Returns:
      A modified copy of this object
    • withTags

      public final ImmutableActivityPayloadForm withTags(@Nullable ActivityTagForm... elements)
      Copy the current immutable object with elements that replace the content of tags.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withTags

      public final ImmutableActivityPayloadForm withTags(@Nullable Iterable<? extends ActivityTagForm> elements)
      Copy the current immutable object with elements that replace the content of tags. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of tags elements to set
      Returns:
      A modified copy of this object
    • withTimestamps

      public final ImmutableActivityPayloadForm withTimestamps(@Nullable ActivityTimestampForm... elements)
      Copy the current immutable object with elements that replace the content of timestamps.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withTimestamps

      public final ImmutableActivityPayloadForm withTimestamps(@Nullable Iterable<? extends ActivityTimestampForm> elements)
      Copy the current immutable object with elements that replace the content of timestamps. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of timestamps elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableActivityPayloadForm that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: metrics, tags, timestamps.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ActivityPayloadForm with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableActivityPayloadForm copyOf(ActivityPayloadForm instance)
      Creates an immutable copy of a ActivityPayloadForm value. 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

      public static ImmutableActivityPayloadForm.Builder builder()
      Creates a builder for ImmutableActivityPayloadForm.
       ImmutableActivityPayloadForm.builder()
          .metrics(List&lt;io.jenkins.plugins.trunk.model.event.ActivityMetricForm&gt; | null) // nullable metrics
          .tags(List&lt;io.jenkins.plugins.trunk.model.event.ActivityTagForm&gt; | null) // nullable tags
          .timestamps(List&lt;io.jenkins.plugins.trunk.model.event.ActivityTimestampForm&gt; | null) // nullable timestamps
          .build();
       
      Returns:
      A new ImmutableActivityPayloadForm builder