Class ChatCompletion.Moderation.Output.Error
-
- All Implemented Interfaces:
public final class ChatCompletion.Moderation.Output.ErrorAn error produced while attempting moderation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChatCompletion.Moderation.Output.Error.BuilderA builder for Error.
-
Method Summary
Modifier and Type Method Description final Stringcode()The error code. final Stringmessage()The error message. final JsonValue_type()The object type, which is always error.final JsonField<String>_code()Returns the raw JSON value of code. final JsonField<String>_message()Returns the raw JSON value of message. final Map<String, JsonValue>_additionalProperties()final ChatCompletion.Moderation.Output.Error.BuildertoBuilder()final ChatCompletion.Moderation.Output.Errorvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ChatCompletion.Moderation.Output.Error.Builderbuilder()Returns a mutable builder for constructing an instance of Error. -
-
Method Detail
-
_type
final JsonValue _type()
The object type, which is always
error.Expected to always return the following:
JsonValue.from("error")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_code
final JsonField<String> _code()
Returns the raw JSON value of code.
Unlike code, this method doesn't throw if the JSON field has an unexpected type.
-
_message
final JsonField<String> _message()
Returns the raw JSON value of message.
Unlike message, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ChatCompletion.Moderation.Output.Error.Builder toBuilder()
-
validate
final ChatCompletion.Moderation.Output.Error 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 ChatCompletion.Moderation.Output.Error.Builder builder()
Returns a mutable builder for constructing an instance of Error.
The following fields are required:
.code() .message()
-
-
-
-