Module ai.docling.serve.client
Class RequestContext.Builder<I,O>
java.lang.Object
ai.docling.serve.client.operations.RequestContext.Builder<I,O>
- Enclosing class:
- RequestContext<I,
O>
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()Creates a new empty Builder instance.Builder(RequestContext<I, O> context) Creates a new Builder instance initialized with values from the given RequestContext. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a new RequestContext instance with the configured values.Sets the request object.responseType(Class<O> responseType) Sets the response type class.Sets the URI for the request.
-
Constructor Details
-
Builder
public Builder()Creates a new empty Builder instance. -
Builder
Creates a new Builder instance initialized with values from the given RequestContext.- Parameters:
context- the RequestContext to copy values from
-
-
Method Details
-
uri
Sets the URI for the request.- Parameters:
uri- the URI string- Returns:
- this Builder instance for method chaining
-
request
Sets the request object.- Parameters:
request- the request object of type I- Returns:
- this Builder instance for method chaining
-
responseType
Sets the response type class.- Parameters:
responseType- the Class object representing the response type O- Returns:
- this Builder instance for method chaining
-
build
Builds and returns a new RequestContext instance with the configured values.- Returns:
- a new RequestContext instance
-