Class ExperimentRunDetails

java.lang.Object
software.amazon.awssdk.services.cloudwatchomni.model.ExperimentRunDetails
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<ExperimentRunDetails.Builder,ExperimentRunDetails>

@Generated("software.amazon.awssdk:codegen") public final class ExperimentRunDetails extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ExperimentRunDetails.Builder,ExperimentRunDetails>

Detailed information about a run of an experiment.

See Also:
  • Method Details

    • experimentId

      public final String experimentId()

      The ID of the experiment the run belongs to.

      Returns:
      The ID of the experiment the run belongs to.
    • runId

      public final String runId()

      The ID of the run.

      Returns:
      The ID of the run.
    • source

      public final ExperimentRunSource source()

      Whether the run is reported by the caller's code or hosted by the service.

      If the service returns an enum value that is not available in the current SDK version, source will return ExperimentRunSource.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from sourceAsString().

      Returns:
      Whether the run is reported by the caller's code or hosted by the service.
      See Also:
    • sourceAsString

      public final String sourceAsString()

      Whether the run is reported by the caller's code or hosted by the service.

      If the service returns an enum value that is not available in the current SDK version, source will return ExperimentRunSource.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from sourceAsString().

      Returns:
      Whether the run is reported by the caller's code or hosted by the service.
      See Also:
    • status

      public final ExperimentRunStatus status()

      The status of the run.

      If the service returns an enum value that is not available in the current SDK version, status will return ExperimentRunStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The status of the run.
      See Also:
    • statusAsString

      public final String statusAsString()

      The status of the run.

      If the service returns an enum value that is not available in the current SDK version, status will return ExperimentRunStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The status of the run.
      See Also:
    • statusReason

      public final ExperimentRunStatusReason statusReason()

      Why the run did not finish. Present when status is DID_NOT_FINISH.

      If the service returns an enum value that is not available in the current SDK version, statusReason will return ExperimentRunStatusReason.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusReasonAsString().

      Returns:
      Why the run did not finish. Present when status is DID_NOT_FINISH.
      See Also:
    • statusReasonAsString

      public final String statusReasonAsString()

      Why the run did not finish. Present when status is DID_NOT_FINISH.

      If the service returns an enum value that is not available in the current SDK version, statusReason will return ExperimentRunStatusReason.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusReasonAsString().

      Returns:
      Why the run did not finish. Present when status is DID_NOT_FINISH.
      See Also:
    • statusDetail

      public final String statusDetail()

      Additional detail about the status: the StopExperimentRun detail, or for RUNNER_FAILED, the AgentCore error details as one string of up to 1,000 characters.

      Returns:
      Additional detail about the status: the StopExperimentRun detail, or for RUNNER_FAILED, the AgentCore error details as one string of up to 1,000 characters.
    • producer

      public final ExperimentProducer producer()

      The producer that reports the run. Reported runs only.

      Returns:
      The producer that reports the run. Reported runs only.
    • producerPrincipal

      public final String producerPrincipal()

      The IAM principal that started the run, without the session name.

      Returns:
      The IAM principal that started the run, without the session name.
    • target

      public final TargetConfig target()

      The version of the experiment's target that the run tested, as given when the run was started or created.

      Returns:
      The version of the experiment's target that the run tested, as given when the run was started or created.
    • control

      public final ControlSource control()

      What the run is compared against, as given.

      Returns:
      What the run is compared against, as given.
    • controlRunId

      public final String controlRunId()

      The ID of the run this run is compared with, resolved when the run starts: either the live control run or the earlier run.

      Returns:
      The ID of the run this run is compared with, resolved when the run starts: either the live control run or the earlier run.
    • role

      public final RunRole role()

      The role of the run: TARGET, or CONTROL for a live control run.

      If the service returns an enum value that is not available in the current SDK version, role will return RunRole.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from roleAsString().

      Returns:
      The role of the run: TARGET, or CONTROL for a live control run.
      See Also:
    • roleAsString

      public final String roleAsString()

      The role of the run: TARGET, or CONTROL for a live control run.

      If the service returns an enum value that is not available in the current SDK version, role will return RunRole.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from roleAsString().

      Returns:
      The role of the run: TARGET, or CONTROL for a live control run.
      See Also:
    • targetRunId

      public final String targetRunId()

      For a CONTROL run, the ID of the run it is the control for.

      Returns:
      For a CONTROL run, the ID of the run it is the control for.
    • dataset

      public final ExperimentRunDataset dataset()

      The dataset the run tested.

      Returns:
      The dataset the run tested.
    • hasEvaluators

      public final boolean hasEvaluators()
      For responses, this returns true if the service returned a value for the Evaluators property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • evaluators

      public final List<ExperimentEvaluator> evaluators()

      The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasEvaluators() method.

      Returns:
      The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.
    • rule

      public final ExperimentRule rule()

      The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.

      Returns:
      The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.
    • hasMetadata

      public final boolean hasMetadata()
      For responses, this returns true if the service returned a value for the Metadata property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • metadata

      public final Map<String,String> metadata()

      Key-value facts about what the run tested, as given when the run was created.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasMetadata() method.

      Returns:
      Key-value facts about what the run tested, as given when the run was created.
    • description

      public final String description()

      The description of the run, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when none was given.

      Returns:
      The description of the run, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when none was given.
    • traceStats

      public final RunTraceStats traceStats()

      Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.

      Returns:
      Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.
    • batchEvaluation

      public final BatchEvaluationProgress batchEvaluation()

      The progress of the hosted run's batch evaluation. Hosted runs only.

      Returns:
      The progress of the hosted run's batch evaluation. Hosted runs only.
    • summary

      public final ExperimentCaseSummary summary()

      Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.

      Returns:
      Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.
    • hasMetrics

      public final boolean hasMetrics()
      For responses, this returns true if the service returned a value for the Metrics property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • metrics

      public final List<EvaluatorMetric> metrics()

      Statistics for each of the run's evaluators.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasMetrics() method.

      Returns:
      Statistics for each of the run's evaluators.
    • caseRecordsWritten

      public final Integer caseRecordsWritten()

      The number of case records written, across every attempt and revision.

      Returns:
      The number of case records written, across every attempt and revision.
    • verdict

      public final Verdict verdict()

      The verdict of the run. Present only for runs with a rule, once the run has ended.

      If the service returns an enum value that is not available in the current SDK version, verdict will return Verdict.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from verdictAsString().

      Returns:
      The verdict of the run. Present only for runs with a rule, once the run has ended.
      See Also:
    • verdictAsString

      public final String verdictAsString()

      The verdict of the run. Present only for runs with a rule, once the run has ended.

      If the service returns an enum value that is not available in the current SDK version, verdict will return Verdict.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from verdictAsString().

      Returns:
      The verdict of the run. Present only for runs with a rule, once the run has ended.
      See Also:
    • verdictReasonCode

      public final VerdictReasonCode verdictReasonCode()

      The reason for the run's verdict.

      If the service returns an enum value that is not available in the current SDK version, verdictReasonCode will return VerdictReasonCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from verdictReasonCodeAsString().

      Returns:
      The reason for the run's verdict.
      See Also:
    • verdictReasonCodeAsString

      public final String verdictReasonCodeAsString()

      The reason for the run's verdict.

      If the service returns an enum value that is not available in the current SDK version, verdictReasonCode will return VerdictReasonCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from verdictReasonCodeAsString().

      Returns:
      The reason for the run's verdict.
      See Also:
    • verdictReason

      public final String verdictReason()

      A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".

      Returns:
      A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
    • hasChecks

      public final boolean hasChecks()
      For responses, this returns true if the service returned a value for the Checks property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • checks

      public final List<VerdictCheck> checks()

      The result of checking each of the rule's gates.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasChecks() method.

      Returns:
      The result of checking each of the rule's gates.
    • createdAt

      public final Instant createdAt()

      The time when the run was created.

      Returns:
      The time when the run was created.
    • startedAt

      public final Instant startedAt()

      The time when the run started. For reported runs, the declared run.startedAt, or createdAt if none was declared. For hosted runs, the time when the batch evaluation was created.

      Returns:
      The time when the run started. For reported runs, the declared run.startedAt, or createdAt if none was declared. For hosted runs, the time when the batch evaluation was created.
    • completedAt

      public final Instant completedAt()

      The time when the run ended.

      Returns:
      The time when the run ended.
    • updatedAt

      public final Instant updatedAt()

      The time when the run was last updated.

      Returns:
      The time when the run was last updated.
    • toBuilder

      public ExperimentRunDetails.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<ExperimentRunDetails.Builder,ExperimentRunDetails>
      Returns:
      a builder for type T
    • builder

      public static ExperimentRunDetails.Builder builder()
    • serializableBuilderClass

      public static Class<? extends ExperimentRunDetails.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.