Class ImmutableSequenceForm

java.lang.Object
io.jenkins.plugins.trunk.model.event.ImmutableSequenceForm
All Implemented Interfaces:
SequenceForm

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

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

  • Method Details

    • platform

      public String platform()
      Specified by:
      platform in interface SequenceForm
      Returns:
      The value of the platform attribute
    • kind

      public String kind()
      Specified by:
      kind in interface SequenceForm
      Returns:
      The value of the kind attribute
    • key

      public String key()
      Specified by:
      key in interface SequenceForm
      Returns:
      The value of the key attribute
    • name

      public String name()
      Specified by:
      name in interface SequenceForm
      Returns:
      The value of the name attribute
    • payload

      public SequencePayloadForm payload()
      Specified by:
      payload in interface SequenceForm
      Returns:
      The value of the payload attribute
    • withPlatform

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

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

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

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

      public final ImmutableSequenceForm withPayload(SequencePayloadForm 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
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableSequenceForm 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: platform, kind, key, name, payload.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableSequenceForm.Builder builder()
      Creates a builder for ImmutableSequenceForm.
       ImmutableSequenceForm.builder()
          .platform(String) // required platform
          .kind(String) // required kind
          .key(String) // required key
          .name(String) // required name
          .payload(io.jenkins.plugins.trunk.model.event.SequencePayloadForm) // required payload
          .build();
       
      Returns:
      A new ImmutableSequenceForm builder