Package com.anthropic.models.messages
Class Metadata
-
- All Implemented Interfaces:
public final class Metadata
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMetadata.BuilderA builder for Metadata.
-
Method Summary
Modifier and Type Method Description final Optional<String>userId()An external identifier for the user who is associated with the request. final JsonField<String>_userId()Returns the raw JSON value of userId. final Map<String, JsonValue>_additionalProperties()final Metadata.BuildertoBuilder()final Metadatavalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Metadata.Builderbuilder()Returns a mutable builder for constructing an instance of Metadata. -
-
Method Detail
-
userId
final Optional<String> userId()
An external identifier for the user who is associated with the request.
This should be a uuid, hash value, or other opaque identifier. Anthropic may use this id to help detect abuse. Do not include any identifying information such as name, email address, or phone number.
-
_userId
final JsonField<String> _userId()
Returns the raw JSON value of userId.
Unlike userId, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final Metadata.Builder toBuilder()
-
validate
final Metadata 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 Metadata.Builder builder()
Returns a mutable builder for constructing an instance of Metadata.
-
-
-
-