Class ImmutableRawTestCaseDto

  • All Implemented Interfaces:
    RawTestCaseDto

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

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

    • Method Detail

      • withScenario

        public final ImmutableRawTestCaseDto withScenario​(String value)
        Copy the current immutable object by setting a value for the scenario attribute. An equals check 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
      • withId

        public final ImmutableRawTestCaseDto 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 ImmutableRawTestCaseDto 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 ImmutableRawTestCaseDto 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 ImmutableRawTestCaseDto 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 ImmutableRawTestCaseDto 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
      • withTags

        public final ImmutableRawTestCaseDto 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 ImmutableRawTestCaseDto 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
      • withCreationDate

        public final ImmutableRawTestCaseDto 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
      • withAuthor

        public final ImmutableRawTestCaseDto 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 ImmutableRawTestCaseDto 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 ImmutableRawTestCaseDto 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
      • withParameters

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

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

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

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

        public static ImmutableRawTestCaseDto.Builder builder()
        Creates a builder for ImmutableRawTestCaseDto.
         ImmutableRawTestCaseDto.builder()
            .scenario(String) // required scenario
            .id(String) // optional id
            .title(String) // required title
            .description(String) // optional description
            .addTags|addAllTags(String) // tags elements
            .creationDate(java.time.Instant) // optional creationDate
            .author(String) // optional author
            .updateDate(java.time.Instant) // optional updateDate
            .version(Integer) // optional version
            .addParameters|addAllParameters(com.chutneytesting.server.core.domain.tools.ui.KeyValue) // parameters elements
            .build();
         
        Returns:
        A new ImmutableRawTestCaseDto builder