Class ImmutableInsightVersion

java.lang.Object
io.riada.insight.model.InsightVersion
io.riada.insight.model.ImmutableInsightVersion

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableInsightVersion extends InsightVersion
Immutable implementation of InsightVersion.

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

  • Method Details

    • id

      public Long id()
      Specified by:
      id in class InsightVersion
      Returns:
      The value of the id attribute
    • projectId

      public Long projectId()
      Specified by:
      projectId in class InsightVersion
      Returns:
      The value of the projectId attribute
    • name

      public String name()
      Specified by:
      name in class InsightVersion
      Returns:
      The value of the name attribute
    • withId

      public final ImmutableInsightVersion withId(Long 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
    • withProjectId

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

      public final ImmutableInsightVersion 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
    • equals

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

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

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

      public static ImmutableInsightVersion.Builder builder()
      Creates a builder for ImmutableInsightVersion.
       ImmutableInsightVersion.builder()
          .setId(Long) // required id
          .setProjectId(Long) // required projectId
          .setName(String) // required name
          .build();
       
      Returns:
      A new ImmutableInsightVersion builder