Class SuccessfulPolicyResponse

java.lang.Object
com.styra.opa.openapi.models.shared.SuccessfulPolicyResponse

public class SuccessfulPolicyResponse extends Object
SuccessfulPolicyResponse

Success. The server also returns 200 if the path refers to an undefined document. In this case, the response will not contain a result property.

  • Constructor Details

  • Method Details

    • result

      public Optional<Result> result()
      The base or virtual document referred to by the URL path. If the path is undefined, this key will be omitted.
    • metrics

      public Optional<Map<String,Object>> metrics()
      If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
    • decisionId

      public Optional<String> decisionId()
      If decision logging is enabled, this field contains a string that uniquely identifies the decision. The identifier will be included in the decision log event for this decision. Callers can use the identifier for correlation purposes.
    • provenance

      public Optional<Provenance> provenance()
      Provenance information can be requested on individual API calls and are returned inline with the API response. To obtain provenance information on an API call, specify the `provenance=true` query parameter when executing the API call.
    • builder

      public static final SuccessfulPolicyResponse.Builder builder()
    • withResult

      public SuccessfulPolicyResponse withResult(Result result)
      The base or virtual document referred to by the URL path. If the path is undefined, this key will be omitted.
    • withResult

      public SuccessfulPolicyResponse withResult(Optional<? extends Result> result)
      The base or virtual document referred to by the URL path. If the path is undefined, this key will be omitted.
    • withMetrics

      public SuccessfulPolicyResponse withMetrics(Map<String,Object> metrics)
      If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
    • withMetrics

      public SuccessfulPolicyResponse withMetrics(Optional<? extends Map<String,Object>> metrics)
      If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
    • withDecisionId

      public SuccessfulPolicyResponse withDecisionId(String decisionId)
      If decision logging is enabled, this field contains a string that uniquely identifies the decision. The identifier will be included in the decision log event for this decision. Callers can use the identifier for correlation purposes.
    • withDecisionId

      public SuccessfulPolicyResponse withDecisionId(Optional<String> decisionId)
      If decision logging is enabled, this field contains a string that uniquely identifies the decision. The identifier will be included in the decision log event for this decision. Callers can use the identifier for correlation purposes.
    • withProvenance

      public SuccessfulPolicyResponse withProvenance(Provenance provenance)
      Provenance information can be requested on individual API calls and are returned inline with the API response. To obtain provenance information on an API call, specify the `provenance=true` query parameter when executing the API call.
    • withProvenance

      public SuccessfulPolicyResponse withProvenance(Optional<? extends Provenance> provenance)
      Provenance information can be requested on individual API calls and are returned inline with the API response. To obtain provenance information on an API call, specify the `provenance=true` query parameter when executing the API call.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object