Class RefusalStopDetails
-
- All Implemented Interfaces:
public final class RefusalStopDetailsStructured information about a refusal.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classRefusalStopDetails.BuilderA builder for RefusalStopDetails.
public final classRefusalStopDetails.CategoryThe policy category that triggered the refusal.
nullwhen the refusal doesn't map to a named category.
-
Method Summary
Modifier and Type Method Description final Optional<RefusalStopDetails.Category>category()The policy category that triggered the refusal. final Optional<String>explanation()Human-readable explanation of the refusal. final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("refusal")final JsonField<RefusalStopDetails.Category>_category()Returns the raw JSON value of category. final JsonField<String>_explanation()Returns the raw JSON value of explanation. final Map<String, JsonValue>_additionalProperties()final RefusalStopDetails.BuildertoBuilder()final RefusalStopDetailsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static RefusalStopDetails.Builderbuilder()Returns a mutable builder for constructing an instance of RefusalStopDetails. -
-
Method Detail
-
category
final Optional<RefusalStopDetails.Category> category()
The policy category that triggered the refusal.
nullwhen the refusal doesn't map to a named category.
-
explanation
final Optional<String> explanation()
Human-readable explanation of the refusal.
This text is not guaranteed to be stable.
nullwhen no explanation is available for the category.
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("refusal")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_category
final JsonField<RefusalStopDetails.Category> _category()
Returns the raw JSON value of category.
Unlike category, this method doesn't throw if the JSON field has an unexpected type.
-
_explanation
final JsonField<String> _explanation()
Returns the raw JSON value of explanation.
Unlike explanation, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final RefusalStopDetails.Builder toBuilder()
-
validate
final RefusalStopDetails validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static RefusalStopDetails.Builder builder()
Returns a mutable builder for constructing an instance of RefusalStopDetails.
The following fields are required:
.category() .explanation()
-
-
-
-