Class ImmutableComposableStepDto

  • All Implemented Interfaces:
    ComposableStepDto

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

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

    • Method Detail

      • withId

        public final ImmutableComposableStepDto 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 ImmutableComposableStepDto 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
      • withName

        public final ImmutableComposableStepDto 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
      • withStrategy

        public final ImmutableComposableStepDto withStrategy​(StrategyDto value)
        Copy the current immutable object by setting a value for the strategy attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for strategy
        Returns:
        A modified copy of the this object
      • withUsage

        public final ImmutableComposableStepDto withUsage​(ComposableStepDto.StepUsage value)
        Copy the current immutable object by setting a value for the usage attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for usage
        Returns:
        A modified copy of the this object
      • withTask

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

        public final ImmutableComposableStepDto withTask​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the task 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 task
        Returns:
        A modified copy of this object
      • withSteps

        public final ImmutableComposableStepDto withSteps​(ComposableStepDto... elements)
        Copy the current immutable object with elements that replace the content of steps.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withSteps

        public final ImmutableComposableStepDto withSteps​(Iterable<? extends ComposableStepDto> elements)
        Copy the current immutable object with elements that replace the content of steps. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of steps elements to set
        Returns:
        A modified copy of this object
      • withDefaultParameters

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

        public final ImmutableComposableStepDto withDefaultParameters​(Iterable<? extends KeyValue> elements)
        Copy the current immutable object with elements that replace the content of defaultParameters. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of defaultParameters elements to set
        Returns:
        A modified copy of this object
      • withExecutionParameters

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

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

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableComposableStepDto 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, name, strategy, usage, task, steps, defaultParameters, executionParameters, tags.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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

        public static ImmutableComposableStepDto.Builder builder()
        Creates a builder for ImmutableComposableStepDto.
         ImmutableComposableStepDto.builder()
            .id(String) // optional id
            .name(String) // required name
            .strategy(com.chutneytesting.component.scenario.api.dto.StrategyDto) // optional strategy
            .usage(com.chutneytesting.component.scenario.api.dto.ComposableStepDto.StepUsage) // optional usage
            .task(String) // optional task
            .addSteps|addAllSteps(com.chutneytesting.component.scenario.api.dto.ComposableStepDto) // steps elements
            .addDefaultParameters|addAllDefaultParameters(com.chutneytesting.server.core.domain.tools.ui.KeyValue) // defaultParameters elements
            .addExecutionParameters|addAllExecutionParameters(com.chutneytesting.server.core.domain.tools.ui.KeyValue) // executionParameters elements
            .addTags|addAllTags(String) // tags elements
            .build();
         
        Returns:
        A new ImmutableComposableStepDto builder