Interface Observation.Builder

  • Method Details

    • observationId

      Observation.Builder observationId(String observationId)

      The unique identifier of the observation.

      Parameters:
      observationId - The unique identifier of the observation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • accountId

      Observation.Builder accountId(String accountId)

      The account the observation belongs to.

      Parameters:
      accountId - The account the observation belongs to.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • title

      A short human-readable headline for the observation.

      Parameters:
      title - A short human-readable headline for the observation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • summary

      Observation.Builder summary(String summary)

      A human-readable summary of what was found.

      Parameters:
      summary - A human-readable summary of what was found.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • severity

      Observation.Builder severity(String severity)

      The severity assigned to the observation.

      Parameters:
      severity - The severity assigned to the observation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • severity

      The severity assigned to the observation.

      Parameters:
      severity - The severity assigned to the observation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      Observation.Builder status(String status)

      The current status of the observation.

      Parameters:
      status - The current status of the observation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • status

      The current status of the observation.

      Parameters:
      status - The current status of the observation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • reasoning

      Observation.Builder reasoning(String reasoning)

      The explanation of how the correlated anomalies led to this observation. It is either plain text, or a JSON array written as a string, where each element is an object with a statement and the anomalyIds that statement is based on, in the order of the explanation. It is the array form only if it parses as a JSON array of objects, each with a statement; any other value is plain text. The value can be empty.

      Parameters:
      reasoning - The explanation of how the correlated anomalies led to this observation. It is either plain text, or a JSON array written as a string, where each element is an object with a statement and the anomalyIds that statement is based on, in the order of the explanation. It is the array form only if it parses as a JSON array of objects, each with a statement; any other value is plain text. The value can be empty.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • anomalies

      Observation.Builder anomalies(Collection<String> anomalies)

      The identifiers of the anomalies this observation correlates. At most 100 are listed: when it correlates more, the 100 most recent.

      Parameters:
      anomalies - The identifiers of the anomalies this observation correlates. At most 100 are listed: when it correlates more, the 100 most recent.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • anomalies

      Observation.Builder anomalies(String... anomalies)

      The identifiers of the anomalies this observation correlates. At most 100 are listed: when it correlates more, the 100 most recent.

      Parameters:
      anomalies - The identifiers of the anomalies this observation correlates. At most 100 are listed: when it correlates more, the 100 most recent.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • affectedNodes

      Observation.Builder affectedNodes(Collection<ObservationNode> affectedNodes)

      The nodes this observation affects.

      Parameters:
      affectedNodes - The nodes this observation affects.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • affectedNodes

      Observation.Builder affectedNodes(ObservationNode... affectedNodes)

      The nodes this observation affects.

      Parameters:
      affectedNodes - The nodes this observation affects.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • affectedNodes

      Observation.Builder affectedNodes(Consumer<ObservationNode.Builder>... affectedNodes)

      The nodes this observation affects.

      This is a convenience method that creates an instance of the ObservationNode.Builder avoiding the need to create one manually via ObservationNode.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to affectedNodes(List<ObservationNode>).

      Parameters:
      affectedNodes - a consumer that will call methods on ObservationNode.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • relatedChanges

      Observation.Builder relatedChanges(Collection<RelatedChange> relatedChanges)

      The changes that the observation cites as related, oldest first. A change tied to more than one node appears once for each node, with the same changeId. At most 50 are listed: when the observation cites more, the 50 oldest. Absent when it cites none.

      Parameters:
      relatedChanges - The changes that the observation cites as related, oldest first. A change tied to more than one node appears once for each node, with the same changeId. At most 50 are listed: when the observation cites more, the 50 oldest. Absent when it cites none.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • relatedChanges

      Observation.Builder relatedChanges(RelatedChange... relatedChanges)

      The changes that the observation cites as related, oldest first. A change tied to more than one node appears once for each node, with the same changeId. At most 50 are listed: when the observation cites more, the 50 oldest. Absent when it cites none.

      Parameters:
      relatedChanges - The changes that the observation cites as related, oldest first. A change tied to more than one node appears once for each node, with the same changeId. At most 50 are listed: when the observation cites more, the 50 oldest. Absent when it cites none.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • relatedChanges

      Observation.Builder relatedChanges(Consumer<RelatedChange.Builder>... relatedChanges)

      The changes that the observation cites as related, oldest first. A change tied to more than one node appears once for each node, with the same changeId. At most 50 are listed: when the observation cites more, the 50 oldest. Absent when it cites none.

      This is a convenience method that creates an instance of the RelatedChange.Builder avoiding the need to create one manually via RelatedChange.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to relatedChanges(List<RelatedChange>).

      Parameters:
      relatedChanges - a consumer that will call methods on RelatedChange.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • createdAt

      Observation.Builder createdAt(Instant createdAt)

      When the observation was created.

      Parameters:
      createdAt - When the observation was created.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • updatedAt

      Observation.Builder updatedAt(Instant updatedAt)

      When the observation was last modified.

      Parameters:
      updatedAt - When the observation was last modified.
      Returns:
      Returns a reference to this object so that method calls can be chained together.