SaveDocumentModelRestApiQuery class
Builder for creating document model adapters for saving documents using a REST API.
REST APIを利用したドキュメントの保存用のモデルアダプターを作成するためのビルダー。
- Inheritance
-
- Object
- SaveDocumentModelRestApiBuilder
- SaveDocumentModelRestApiQuery
Constructors
-
SaveDocumentModelRestApiQuery({required Uri endpoint(String endpoint, ModelAdapterDocumentQuery query), bool checkError(ApiResponse response)?, FutureOr<
Object> dataOnSave(ModelAdapterDocumentQuery query, DynamicMap value) = defaultDataOnSave, FutureOr<Map< headers(ModelAdapterDocumentQuery query)?, ApiMethod method(ModelAdapterDocumentQuery query, DynamicMap value) = defaultMethod, Future<String, String> >void> onSaved(ModelAdapterDocumentQuery query, DynamicMap value)?}) -
Builder for creating document model adapters for saving documents using a REST API.
const
Properties
- checkError → bool Function(ApiResponse response)?
-
A function that returns
trueif the response is an error.final -
dataOnSave
→ FutureOr<
Object> Function(ModelAdapterDocumentQuery query, DynamicMap value) -
A function that returns the document data.
final
- endpoint → Uri Function(String endpoint, ModelAdapterDocumentQuery query)
-
A function that returns the endpoint of the document.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ FutureOr<
Map< Function(ModelAdapterDocumentQuery query)?String, String> > -
A function that returns the headers.
final
- method → ApiMethod Function(ModelAdapterDocumentQuery query, DynamicMap value)
-
A function that returns the API method.
final
-
onSaved
→ Future<
void> Function(ModelAdapterDocumentQuery query, DynamicMap value)? -
A function that is called when the document is saved.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
process(
ModelAdapterDocumentQuery query, DynamicMap value, RestApiModelAdapter adapter) → Future< void> -
Describes the actual processing.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
defaultDataOnSave(
ModelAdapterDocumentQuery query, DynamicMap value) → FutureOr< DynamicMap> - A function that returns the document data.
-
defaultMethod(
ModelAdapterDocumentQuery query, DynamicMap value) → ApiMethod - A function that returns the API method.