Class DocumentBlockParam
-
- All Implemented Interfaces:
public final class DocumentBlockParam
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classDocumentBlockParam.BuilderA builder for DocumentBlockParam.
public final classDocumentBlockParam.Source
-
Method Summary
Modifier and Type Method Description final DocumentBlockParam.Sourcesource()final Optional<CacheControlEphemeral>cacheControl()Create a cache control breakpoint at this content block. final Optional<CitationsConfigParam>citations()final Optional<String>context()final Optional<String>title()final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("document")final JsonField<DocumentBlockParam.Source>_source()Returns the raw JSON value of source. final JsonField<CacheControlEphemeral>_cacheControl()Returns the raw JSON value of cacheControl. final JsonField<CitationsConfigParam>_citations()Returns the raw JSON value of citations. final JsonField<String>_context()Returns the raw JSON value of context. final JsonField<String>_title()Returns the raw JSON value of title. final Map<String, JsonValue>_additionalProperties()final DocumentBlockParam.BuildertoBuilder()final DocumentBlockParamvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static DocumentBlockParam.Builderbuilder()Returns a mutable builder for constructing an instance of DocumentBlockParam. final static DocumentBlockParamof(DocumentBlockParam.Source source)Returns an immutable instance of DocumentBlockParam with the required source set to the given value. final static DocumentBlockParamof(Base64PdfSource base64)Alias for calling of with Source.ofBase64(base64).final static DocumentBlockParamof(PlainTextSource text)Alias for calling of with Source.ofText(text).final static DocumentBlockParamof(ContentBlockSource content)Alias for calling of with Source.ofContent(content).final static DocumentBlockParamof(UrlPdfSource url)Alias for calling of with Source.ofUrl(url).final static DocumentBlockParamof(FileDocumentSource file)Alias for calling of with Source.ofFile(file).-
-
Method Detail
-
source
final DocumentBlockParam.Source source()
-
cacheControl
final Optional<CacheControlEphemeral> cacheControl()
Create a cache control breakpoint at this content block.
-
citations
final Optional<CitationsConfigParam> citations()
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("document")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_source
final JsonField<DocumentBlockParam.Source> _source()
Returns the raw JSON value of source.
Unlike source, this method doesn't throw if the JSON field has an unexpected type.
-
_cacheControl
final JsonField<CacheControlEphemeral> _cacheControl()
Returns the raw JSON value of cacheControl.
Unlike cacheControl, this method doesn't throw if the JSON field has an unexpected type.
-
_citations
final JsonField<CitationsConfigParam> _citations()
Returns the raw JSON value of citations.
Unlike citations, this method doesn't throw if the JSON field has an unexpected type.
-
_context
final JsonField<String> _context()
Returns the raw JSON value of context.
Unlike context, this method doesn't throw if the JSON field has an unexpected type.
-
_title
final JsonField<String> _title()
Returns the raw JSON value of title.
Unlike title, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final DocumentBlockParam.Builder toBuilder()
-
validate
final DocumentBlockParam 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 DocumentBlockParam.Builder builder()
Returns a mutable builder for constructing an instance of DocumentBlockParam.
The following fields are required:
.source()
-
of
final static DocumentBlockParam of(DocumentBlockParam.Source source)
Returns an immutable instance of DocumentBlockParam with the required source set to the given value.
-
of
final static DocumentBlockParam of(Base64PdfSource base64)
Alias for calling of with
Source.ofBase64(base64).
-
of
final static DocumentBlockParam of(PlainTextSource text)
Alias for calling of with
Source.ofText(text).
-
of
final static DocumentBlockParam of(ContentBlockSource content)
Alias for calling of with
Source.ofContent(content).
-
of
final static DocumentBlockParam of(UrlPdfSource url)
Alias for calling of with
Source.ofUrl(url).
-
of
final static DocumentBlockParam of(FileDocumentSource file)
Alias for calling of with
Source.ofFile(file).
-
-
-
-