Class ImmutableExecutionSummaryDto

java.lang.Object
com.chutneytesting.execution.api.ImmutableExecutionSummaryDto
All Implemented Interfaces:
ExecutionSummaryDto, ExecutionHistory.Attached, ExecutionHistory.ExecutionProperties

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

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

  • Method Details

    • time

      public LocalDateTime time()
      Specified by:
      time in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the time attribute
    • duration

      public long duration()
      Specified by:
      duration in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the duration attribute
    • status

      public ServerReportStatus status()
      Specified by:
      status in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the status attribute
    • info

      public Optional<String> info()
      Specified by:
      info in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the info attribute
    • error

      public Optional<String> error()
      Specified by:
      error in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the error attribute
    • testCaseTitle

      public String testCaseTitle()
      Specified by:
      testCaseTitle in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the testCaseTitle attribute
    • environment

      public String environment()
      Specified by:
      environment in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the environment attribute
    • datasetId

      public Optional<String> datasetId()
      Specified by:
      datasetId in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the datasetId attribute
    • datasetVersion

      public Optional<Integer> datasetVersion()
      Specified by:
      datasetVersion in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the datasetVersion attribute
    • user

      public String user()
      Specified by:
      user in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the user attribute
    • campaignReport

      public Optional<CampaignExecutionReport> campaignReport()
      Specified by:
      campaignReport in interface ExecutionHistory.ExecutionProperties
      Returns:
      The value of the campaignReport attribute
    • executionId

      public Long executionId()
      Specified by:
      executionId in interface ExecutionHistory.Attached
      Returns:
      The value of the executionId attribute
    • withTime

      public final ImmutableExecutionSummaryDto withTime(LocalDateTime value)
      Copy the current immutable object by setting a value for the time attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for time
      Returns:
      A modified copy of the this object
    • withDuration

      public final ImmutableExecutionSummaryDto withDuration(long value)
      Copy the current immutable object by setting a value for the duration attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for duration
      Returns:
      A modified copy of the this object
    • withStatus

      public final ImmutableExecutionSummaryDto withStatus(ServerReportStatus value)
      Copy the current immutable object by setting a value for the status attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for status
      Returns:
      A modified copy of the this object
    • withInfo

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

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

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

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

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

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

      public final ImmutableExecutionSummaryDto 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 ImmutableExecutionSummaryDto 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
    • withDatasetVersion

      public final ImmutableExecutionSummaryDto withDatasetVersion(int value)
      Copy the current immutable object by setting a present value for the optional datasetVersion attribute.
      Parameters:
      value - The value for datasetVersion
      Returns:
      A modified copy of this object
    • withDatasetVersion

      public final ImmutableExecutionSummaryDto withDatasetVersion(Optional<Integer> optional)
      Copy the current immutable object by setting an optional value for the datasetVersion 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 datasetVersion
      Returns:
      A modified copy of this object
    • withUser

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

      public final ImmutableExecutionSummaryDto withCampaignReport(CampaignExecutionReport value)
      Copy the current immutable object by setting a present value for the optional campaignReport attribute.
      Parameters:
      value - The value for campaignReport
      Returns:
      A modified copy of this object
    • withCampaignReport

      public final ImmutableExecutionSummaryDto withCampaignReport(Optional<? extends CampaignExecutionReport> optional)
      Copy the current immutable object by setting an optional value for the campaignReport 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 campaignReport
      Returns:
      A modified copy of this object
    • withExecutionId

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableExecutionSummaryDto 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: time, duration, status, info, error, testCaseTitle, environment, datasetId, datasetVersion, user, campaignReport, executionId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableExecutionSummaryDto.Builder builder()
      Creates a builder for ImmutableExecutionSummaryDto.
       ImmutableExecutionSummaryDto.builder()
          .time(java.time.LocalDateTime) // required time
          .duration(long) // required duration
          .status(com.chutneytesting.server.core.domain.execution.report.ServerReportStatus) // required status
          .info(String) // optional info
          .error(String) // optional error
          .testCaseTitle(String) // required testCaseTitle
          .environment(String) // required environment
          .datasetId(String) // optional datasetId
          .datasetVersion(Integer) // optional datasetVersion
          .user(String) // required user
          .campaignReport(com.chutneytesting.server.core.domain.scenario.campaign.CampaignExecutionReport) // optional campaignReport
          .executionId(Long) // required executionId
          .build();
       
      Returns:
      A new ImmutableExecutionSummaryDto builder