Loading...
Searching...
No Matches
Request builder pattern

Request builders capture the arguments required to create a request and expose optional settings through fluent setters. Construction happens when build() is called or when the builder is implicitly converted to a compatible std::shared_ptr.

Request builders are move-only and single-use. Calling build() or implicitly converting the same builder object more than once throws std::logic_error. The builder is consumed before request validation or construction completes; if that first attempt throws, retrying the same builder still throws std::logic_error.

Request builder objects are not thread-safe. Accessing the same builder object from multiple threads requires external synchronization. Distinct builder objects are independent.

Each request-specific factory function returns the corresponding builder. Required arguments are passed to the factory function, while optional settings such as Python future notification and completion callbacks are configured through method chaining when supported by that request type.