Class SuccessfulPolicyResponse
- java.lang.Object
-
- com.styra.opa.openapi.models.shared.SuccessfulPolicyResponse
-
public class SuccessfulPolicyResponse extends java.lang.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SuccessfulPolicyResponse.Builder
-
Constructor Summary
Constructors Constructor Description SuccessfulPolicyResponse()
SuccessfulPolicyResponse(java.util.Optional<? extends Result> result, java.util.Optional<? extends java.util.Map<java.lang.String,java.lang.Object>> metrics, java.util.Optional<java.lang.String> decisionId, java.util.Optional<? extends Provenance> provenance)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SuccessfulPolicyResponse.Builder
builder()
java.util.Optional<java.lang.String>
decisionId()
If decision logging is enabled, this field contains a string that uniquely identifies the decision.boolean
equals(java.lang.Object o)
int
hashCode()
java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>
metrics()
If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.java.util.Optional<Provenance>
provenance()
Provenance information can be requested on individual API calls and are returned inline with the API response.java.util.Optional<Result>
result()
The base or virtual document referred to by the URL path.java.lang.String
toString()
SuccessfulPolicyResponse
withDecisionId(java.lang.String decisionId)
If decision logging is enabled, this field contains a string that uniquely identifies the decision.SuccessfulPolicyResponse
withDecisionId(java.util.Optional<java.lang.String> decisionId)
If decision logging is enabled, this field contains a string that uniquely identifies the decision.SuccessfulPolicyResponse
withMetrics(java.util.Map<java.lang.String,java.lang.Object> metrics)
If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.SuccessfulPolicyResponse
withMetrics(java.util.Optional<? extends java.util.Map<java.lang.String,java.lang.Object>> metrics)
If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.SuccessfulPolicyResponse
withProvenance(Provenance provenance)
Provenance information can be requested on individual API calls and are returned inline with the API response.SuccessfulPolicyResponse
withProvenance(java.util.Optional<? extends Provenance> provenance)
Provenance information can be requested on individual API calls and are returned inline with the API response.SuccessfulPolicyResponse
withResult(Result result)
The base or virtual document referred to by the URL path.SuccessfulPolicyResponse
withResult(java.util.Optional<? extends Result> result)
The base or virtual document referred to by the URL path.
-
-
-
Constructor Detail
-
SuccessfulPolicyResponse
public SuccessfulPolicyResponse(java.util.Optional<? extends Result> result, java.util.Optional<? extends java.util.Map<java.lang.String,java.lang.Object>> metrics, java.util.Optional<java.lang.String> decisionId, java.util.Optional<? extends Provenance> provenance)
-
SuccessfulPolicyResponse
public SuccessfulPolicyResponse()
-
-
Method Detail
-
result
public java.util.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 java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metrics()
If query metrics are enabled, this field contains query performance metrics collected during the parse, compile, and evaluation steps.
-
decisionId
public java.util.Optional<java.lang.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 java.util.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(java.util.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(java.util.Map<java.lang.String,java.lang.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(java.util.Optional<? extends java.util.Map<java.lang.String,java.lang.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(java.lang.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(java.util.Optional<java.lang.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(java.util.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(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-