Class ImmutableActivityEventForm

java.lang.Object
io.jenkins.plugins.trunk.model.event.ImmutableActivityEventForm
All Implemented Interfaces:
ActivityEventForm

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableActivityEventForm extends Object implements ActivityEventForm
Immutable implementation of ActivityEventForm.

Use the builder to create immutable instances: ImmutableActivityEventForm.builder().

  • Method Details

    • id

      public String id()
      Specified by:
      id in interface ActivityEventForm
      Returns:
      The value of the id attribute
    • parent

      @Nullable public ActivityEventParent parent()
      Specified by:
      parent in interface ActivityEventForm
      Returns:
      The value of the parent attribute
    • chainId

      public String chainId()
      Specified by:
      chainId in interface ActivityEventForm
      Returns:
      The value of the chainId attribute
    • origin

      public String origin()
      Specified by:
      origin in interface ActivityEventForm
      Returns:
      The value of the origin attribute
    • createdAt

      public Long createdAt()
      Specified by:
      createdAt in interface ActivityEventForm
      Returns:
      The value of the createdAt attribute
    • finishedAt

      @Nullable public Long finishedAt()
      Specified by:
      finishedAt in interface ActivityEventForm
      Returns:
      The value of the finishedAt attribute
    • conclusion

      public ActivityConclusion conclusion()
      Specified by:
      conclusion in interface ActivityEventForm
      Returns:
      The value of the conclusion attribute
    • payload

      public ActivityPayloadForm payload()
      Specified by:
      payload in interface ActivityEventForm
      Returns:
      The value of the payload attribute
    • sequence

      public SequenceForm sequence()
      Specified by:
      sequence in interface ActivityEventForm
      Returns:
      The value of the sequence attribute
    • withId

      public final ImmutableActivityEventForm withId(String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id
      Returns:
      A modified copy of the this object
    • withParent

      public final ImmutableActivityEventForm withParent(@Nullable ActivityEventParent value)
      Copy the current immutable object by setting a value for the parent attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for parent (can be null)
      Returns:
      A modified copy of the this object
    • withChainId

      public final ImmutableActivityEventForm withChainId(String value)
      Copy the current immutable object by setting a value for the chainId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for chainId
      Returns:
      A modified copy of the this object
    • withOrigin

      public final ImmutableActivityEventForm withOrigin(String value)
      Copy the current immutable object by setting a value for the origin attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for origin
      Returns:
      A modified copy of the this object
    • withCreatedAt

      public final ImmutableActivityEventForm withCreatedAt(Long value)
      Copy the current immutable object by setting a value for the createdAt attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for createdAt
      Returns:
      A modified copy of the this object
    • withFinishedAt

      public final ImmutableActivityEventForm withFinishedAt(@Nullable Long value)
      Copy the current immutable object by setting a value for the finishedAt attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for finishedAt (can be null)
      Returns:
      A modified copy of the this object
    • withConclusion

      public final ImmutableActivityEventForm withConclusion(ActivityConclusion value)
      Copy the current immutable object by setting a value for the conclusion attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for conclusion
      Returns:
      A modified copy of the this object
    • withPayload

      public final ImmutableActivityEventForm withPayload(ActivityPayloadForm value)
      Copy the current immutable object by setting a value for the payload attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for payload
      Returns:
      A modified copy of the this object
    • withSequence

      public final ImmutableActivityEventForm withSequence(SequenceForm value)
      Copy the current immutable object by setting a value for the sequence attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for sequence
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableActivityEventForm 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: id, parent, chainId, origin, createdAt, finishedAt, conclusion, payload, sequence.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableActivityEventForm copyOf(ActivityEventForm instance)
      Creates an immutable copy of a ActivityEventForm 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 ActivityEventForm instance
    • builder

      public static ImmutableActivityEventForm.Builder builder()
      Creates a builder for ImmutableActivityEventForm.
       ImmutableActivityEventForm.builder()
          .id(String) // required id
          .parent(io.jenkins.plugins.trunk.model.event.ActivityEventParent | null) // nullable parent
          .chainId(String) // required chainId
          .origin(String) // required origin
          .createdAt(Long) // required createdAt
          .finishedAt(Long | null) // nullable finishedAt
          .conclusion(io.jenkins.plugins.trunk.model.event.ActivityConclusion) // required conclusion
          .payload(io.jenkins.plugins.trunk.model.event.ActivityPayloadForm) // required payload
          .sequence(io.jenkins.plugins.trunk.model.event.SequenceForm) // required sequence
          .build();
       
      Returns:
      A new ImmutableActivityEventForm builder