Class ImmutableComposableTestCaseDto

java.lang.Object
com.chutneytesting.component.scenario.api.dto.ImmutableComposableTestCaseDto
All Implemented Interfaces:
ComposableTestCaseDto

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

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

  • Method Details

    • id

      public Optional<String> id()
      Specified by:
      id in interface ComposableTestCaseDto
      Returns:
      The value of the id attribute
    • title

      public String title()
      Specified by:
      title in interface ComposableTestCaseDto
      Returns:
      The value of the title attribute
    • description

      public Optional<String> description()
      Specified by:
      description in interface ComposableTestCaseDto
      Returns:
      The value of the description attribute
    • creationDate

      public Instant creationDate()
      Specified by:
      creationDate in interface ComposableTestCaseDto
      Returns:
      The value of the creationDate attribute
    • tags

      public List<String> tags()
      Specified by:
      tags in interface ComposableTestCaseDto
      Returns:
      The value of the tags attribute
    • scenario

      Specified by:
      scenario in interface ComposableTestCaseDto
      Returns:
      The value of the scenario attribute
    • datasetId

      public Optional<String> datasetId()
      Specified by:
      datasetId in interface ComposableTestCaseDto
      Returns:
      The value of the datasetId attribute
    • author

      public String author()
      Specified by:
      author in interface ComposableTestCaseDto
      Returns:
      The value of the author attribute
    • updateDate

      public Instant updateDate()
      Specified by:
      updateDate in interface ComposableTestCaseDto
      Returns:
      The value of the updateDate attribute
    • version

      public Integer version()
      Specified by:
      version in interface ComposableTestCaseDto
      Returns:
      The value of the version attribute
    • executionParameters

      public List<KeyValue> executionParameters()
      Specified by:
      executionParameters in interface ComposableTestCaseDto
      Returns:
      The value of the executionParameters attribute
    • withId

      public final ImmutableComposableTestCaseDto withId(String value)
      Copy the current immutable object by setting a present value for the optional id attribute.
      Parameters:
      value - The value for id
      Returns:
      A modified copy of this object
    • withId

      public final ImmutableComposableTestCaseDto withId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the id attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for id
      Returns:
      A modified copy of this object
    • withTitle

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

      public final ImmutableComposableTestCaseDto withDescription(String value)
      Copy the current immutable object by setting a present value for the optional description attribute.
      Parameters:
      value - The value for description
      Returns:
      A modified copy of this object
    • withDescription

      public final ImmutableComposableTestCaseDto withDescription(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the description attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for description
      Returns:
      A modified copy of this object
    • withCreationDate

      public final ImmutableComposableTestCaseDto withCreationDate(Instant value)
      Copy the current immutable object by setting a value for the creationDate attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for creationDate
      Returns:
      A modified copy of the this object
    • withTags

      public final ImmutableComposableTestCaseDto withTags(String... 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 ImmutableComposableTestCaseDto withTags(Iterable<String> 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
    • withScenario

      Copy the current immutable object by setting a value for the scenario attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for scenario
      Returns:
      A modified copy of the this object
    • withDatasetId

      public final ImmutableComposableTestCaseDto withDatasetId(String value)
      Copy the current immutable object by setting a present value for the optional datasetId attribute.
      Parameters:
      value - The value for datasetId
      Returns:
      A modified copy of this object
    • withDatasetId

      public final ImmutableComposableTestCaseDto withDatasetId(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the datasetId attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for datasetId
      Returns:
      A modified copy of this object
    • withAuthor

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

      public final ImmutableComposableTestCaseDto withUpdateDate(Instant value)
      Copy the current immutable object by setting a value for the updateDate attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for updateDate
      Returns:
      A modified copy of the this object
    • withVersion

      public final ImmutableComposableTestCaseDto withVersion(Integer value)
      Copy the current immutable object by setting a value for the version attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for version
      Returns:
      A modified copy of the this object
    • withExecutionParameters

      public final ImmutableComposableTestCaseDto withExecutionParameters(KeyValue... elements)
      Copy the current immutable object with elements that replace the content of executionParameters.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withExecutionParameters

      public final ImmutableComposableTestCaseDto withExecutionParameters(Iterable<? extends KeyValue> elements)
      Copy the current immutable object with elements that replace the content of executionParameters. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of executionParameters 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 ImmutableComposableTestCaseDto 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, title, description, creationDate, tags, scenario, datasetId, author, updateDate, version, executionParameters.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableComposableTestCaseDto.Builder builder()
      Creates a builder for ImmutableComposableTestCaseDto.
       ImmutableComposableTestCaseDto.builder()
          .id(String) // optional id
          .title(String) // required title
          .description(String) // optional description
          .creationDate(java.time.Instant) // optional creationDate
          .addTags|addAllTags(String) // tags elements
          .scenario(com.chutneytesting.component.scenario.api.dto.ComposableTestCaseDto.ComposableScenarioDto) // required scenario
          .datasetId(String) // optional datasetId
          .author(String) // optional author
          .updateDate(java.time.Instant) // optional updateDate
          .version(Integer) // optional version
          .addExecutionParameters|addAllExecutionParameters(com.chutneytesting.server.core.domain.tools.ui.KeyValue) // executionParameters elements
          .build();
       
      Returns:
      A new ImmutableComposableTestCaseDto builder