Class ImmutableGwtStepDto

java.lang.Object
com.chutneytesting.scenario.api.raw.dto.ImmutableGwtStepDto
All Implemented Interfaces:
GwtStepDto

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

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

  • Method Details

    • sentence

      public Optional<String> sentence()
      Specified by:
      sentence in interface GwtStepDto
      Returns:
      The value of the sentence attribute
    • subSteps

      public List<GwtStepDto> subSteps()
      Specified by:
      subSteps in interface GwtStepDto
      Returns:
      The value of the subSteps attribute
    • implementation

      public Optional<GwtStepImplementationDto> implementation()
      Specified by:
      implementation in interface GwtStepDto
      Returns:
      The value of the implementation attribute
    • strategy

      public Optional<StrategyDto> strategy()
      Specified by:
      strategy in interface GwtStepDto
      Returns:
      The value of the strategy attribute
    • xRef

      public Optional<String> xRef()
      Specified by:
      xRef in interface GwtStepDto
      Returns:
      The value of the xRef attribute
    • withSentence

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

      public final ImmutableGwtStepDto withSentence(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the sentence 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 sentence
      Returns:
      A modified copy of this object
    • withSubSteps

      public final ImmutableGwtStepDto withSubSteps(GwtStepDto... elements)
      Copy the current immutable object with elements that replace the content of subSteps.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withSubSteps

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

      public final ImmutableGwtStepDto withImplementation(GwtStepImplementationDto value)
      Copy the current immutable object by setting a present value for the optional implementation attribute.
      Parameters:
      value - The value for implementation
      Returns:
      A modified copy of this object
    • withImplementation

      public final ImmutableGwtStepDto withImplementation(Optional<? extends GwtStepImplementationDto> optional)
      Copy the current immutable object by setting an optional value for the implementation attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for implementation
      Returns:
      A modified copy of this object
    • withStrategy

      public final ImmutableGwtStepDto withStrategy(StrategyDto value)
      Copy the current immutable object by setting a present value for the optional strategy attribute.
      Parameters:
      value - The value for strategy
      Returns:
      A modified copy of this object
    • withStrategy

      public final ImmutableGwtStepDto withStrategy(Optional<? extends StrategyDto> optional)
      Copy the current immutable object by setting an optional value for the strategy attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for strategy
      Returns:
      A modified copy of this object
    • withXRef

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

      public final ImmutableGwtStepDto withXRef(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the xRef 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 xRef
      Returns:
      A modified copy of this object
    • equals

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

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

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

      public static ImmutableGwtStepDto.Builder builder()
      Creates a builder for ImmutableGwtStepDto.
       ImmutableGwtStepDto.builder()
          .sentence(String) // optional sentence
          .addSubSteps|addAllSubSteps(com.chutneytesting.scenario.api.raw.dto.GwtStepDto) // subSteps elements
          .implementation(com.chutneytesting.scenario.api.raw.dto.GwtStepImplementationDto) // optional implementation
          .strategy(com.chutneytesting.scenario.api.raw.dto.StrategyDto) // optional strategy
          .xRef(String) // optional xRef
          .build();
       
      Returns:
      A new ImmutableGwtStepDto builder