1.0.0
This commit is contained in:
commit
f076ae3790
82 changed files with 7250 additions and 0 deletions
41
.gitignore
vendored
Normal file
41
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
# See https://dart.dev/guides/libraries/private-files
|
||||||
|
|
||||||
|
# Files and directories created by pub
|
||||||
|
.dart_tool/
|
||||||
|
.buildlog
|
||||||
|
.packages
|
||||||
|
.project
|
||||||
|
.pub/
|
||||||
|
build/
|
||||||
|
**/packages/
|
||||||
|
|
||||||
|
# Files created by dart2js
|
||||||
|
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||||
|
# rules if you intend to use dart2js directly
|
||||||
|
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
|
||||||
|
# differentiate from explicit Javascript files)
|
||||||
|
*.dart.js
|
||||||
|
*.part.js
|
||||||
|
*.js.deps
|
||||||
|
*.js.map
|
||||||
|
*.info.json
|
||||||
|
|
||||||
|
# Directory created by dartdoc
|
||||||
|
doc/api/
|
||||||
|
|
||||||
|
# Don't commit pubspec lock file
|
||||||
|
# (Library packages only! Remove pattern if developing an application package)
|
||||||
|
pubspec.lock
|
||||||
|
|
||||||
|
# Don’t commit files and directories created by other development environments.
|
||||||
|
# For example, if your development environment creates any of the following files,
|
||||||
|
# consider putting them in a global ignore file:
|
||||||
|
|
||||||
|
# IntelliJ
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Mac
|
||||||
|
.DS_Store
|
||||||
23
.openapi-generator-ignore
Normal file
23
.openapi-generator-ignore
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# OpenAPI Generator Ignore
|
||||||
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
|
#ApiClient.cs
|
||||||
|
|
||||||
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
#foo/*/qux
|
||||||
|
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
|
#foo/**/qux
|
||||||
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can also negate patterns with an exclamation (!).
|
||||||
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
#docs/*.md
|
||||||
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
|
#!docs/README.md
|
||||||
64
.openapi-generator/FILES
Normal file
64
.openapi-generator/FILES
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
.gitignore
|
||||||
|
.openapi-generator-ignore
|
||||||
|
README.md
|
||||||
|
analysis_options.yaml
|
||||||
|
doc/AccessTokenResponse.md
|
||||||
|
doc/AuthModel.md
|
||||||
|
doc/BodyUpdateItemInTableItemsTableNamePost.md
|
||||||
|
doc/ColumnConditionCompat.md
|
||||||
|
doc/CreateAssetResponse.md
|
||||||
|
doc/CreateUserDefinition.md
|
||||||
|
doc/DefaultApi.md
|
||||||
|
doc/ErrorResponse.md
|
||||||
|
doc/HTTPValidationError.md
|
||||||
|
doc/ItemsFieldSelectorList.md
|
||||||
|
doc/LocationInner.md
|
||||||
|
doc/OkResponse.md
|
||||||
|
doc/TableDefinition.md
|
||||||
|
doc/TableItemsResponse.md
|
||||||
|
doc/UserUpdateDefinition.md
|
||||||
|
doc/ValidationError.md
|
||||||
|
lib/src/api.dart
|
||||||
|
lib/src/api/default_api.dart
|
||||||
|
lib/src/api_util.dart
|
||||||
|
lib/src/auth/api_key_auth.dart
|
||||||
|
lib/src/auth/auth.dart
|
||||||
|
lib/src/auth/basic_auth.dart
|
||||||
|
lib/src/auth/bearer_auth.dart
|
||||||
|
lib/src/auth/oauth.dart
|
||||||
|
lib/src/date_serializer.dart
|
||||||
|
lib/src/model/access_token_response.dart
|
||||||
|
lib/src/model/auth_model.dart
|
||||||
|
lib/src/model/body_update_item_in_table_items_table_name_post.dart
|
||||||
|
lib/src/model/column_condition_compat.dart
|
||||||
|
lib/src/model/create_asset_response.dart
|
||||||
|
lib/src/model/create_user_definition.dart
|
||||||
|
lib/src/model/date.dart
|
||||||
|
lib/src/model/error_response.dart
|
||||||
|
lib/src/model/http_validation_error.dart
|
||||||
|
lib/src/model/items_field_selector_list.dart
|
||||||
|
lib/src/model/location_inner.dart
|
||||||
|
lib/src/model/ok_response.dart
|
||||||
|
lib/src/model/table_definition.dart
|
||||||
|
lib/src/model/table_items_response.dart
|
||||||
|
lib/src/model/user_update_definition.dart
|
||||||
|
lib/src/model/validation_error.dart
|
||||||
|
lib/src/serializers.dart
|
||||||
|
lib/tuuli_api.dart
|
||||||
|
pubspec.yaml
|
||||||
|
test/access_token_response_test.dart
|
||||||
|
test/auth_model_test.dart
|
||||||
|
test/body_update_item_in_table_items_table_name_post_test.dart
|
||||||
|
test/column_condition_compat_test.dart
|
||||||
|
test/create_asset_response_test.dart
|
||||||
|
test/create_user_definition_test.dart
|
||||||
|
test/default_api_test.dart
|
||||||
|
test/error_response_test.dart
|
||||||
|
test/http_validation_error_test.dart
|
||||||
|
test/items_field_selector_list_test.dart
|
||||||
|
test/location_inner_test.dart
|
||||||
|
test/ok_response_test.dart
|
||||||
|
test/table_definition_test.dart
|
||||||
|
test/table_items_response_test.dart
|
||||||
|
test/user_update_definition_test.dart
|
||||||
|
test/validation_error_test.dart
|
||||||
1
.openapi-generator/VERSION
Normal file
1
.openapi-generator/VERSION
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
6.5.0
|
||||||
114
README.md
Normal file
114
README.md
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
# tuuli_api (EXPERIMENTAL)
|
||||||
|
|
||||||
|
Tuuli API for Tuuli frontend
|
||||||
|
|
||||||
|
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||||
|
|
||||||
|
- API version: 0.1.0
|
||||||
|
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
- Dart 2.15.0+ or Flutter 2.8.0+
|
||||||
|
- Dio 5.0.0+ (https://pub.dev/packages/dio)
|
||||||
|
|
||||||
|
## Installation & Usage
|
||||||
|
|
||||||
|
### pub.dev
|
||||||
|
|
||||||
|
To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
dependencies:
|
||||||
|
tuuli_api: 1.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Github
|
||||||
|
|
||||||
|
If this Dart package is published to Github, please include the following in pubspec.yaml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
dependencies:
|
||||||
|
tuuli_api:
|
||||||
|
git:
|
||||||
|
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||||
|
#ref: main
|
||||||
|
```
|
||||||
|
|
||||||
|
### Local development
|
||||||
|
|
||||||
|
To use the package from your local drive, please include the following in pubspec.yaml
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
dependencies:
|
||||||
|
tuuli_api:
|
||||||
|
path: /path/to/tuuli_api
|
||||||
|
```
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||||
|
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String tableName = tableName_example; // String |
|
||||||
|
final JsonObject body = Object; // JsonObject |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = await api.createItemItemsTableNamePost(tableName, body, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print("Exception when calling DefaultApi->createItemItemsTableNamePost: $e\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
|
All URIs are relative to _http://localhost_
|
||||||
|
|
||||||
|
| Class | Method | HTTP request | Description |
|
||||||
|
| --------------------------------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------- | ------------------------ |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**createItemItemsTableNamePost**](doc\DefaultApi.md#createitemitemstablenamepost) | **POST** /items/{tableName}/+ | Create Item |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**createTableApiCreateTableTableNamePost**](doc\DefaultApi.md#createtableapicreatetabletablenamepost) | **POST** /api/createTable/{tableName} | Create Table |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**createUserApiUsersPost**](doc\DefaultApi.md#createuserapiuserspost) | **POST** /api/users/+ | Create User |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**deleteItemFromTableItemsTableNamePost**](doc\DefaultApi.md#deleteitemfromtableitemstablenamepost) | **POST** /items/{tableName}/- | Delete Item From Table |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**dropTableApiDropTableTableNamePost**](doc\DefaultApi.md#droptableapidroptabletablenamepost) | **POST** /api/dropTable/{tableName} | Drop Table |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**getAccessTokenApiGetAccessTokenPost**](doc\DefaultApi.md#getaccesstokenapigetaccesstokenpost) | **POST** /api/getAccessToken | Get Access Token |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**getAssetAssetsFidGet**](doc\DefaultApi.md#getassetassetsfidget) | **GET** /assets/{fid} | Get Asset |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**getItemsFromTableItemsTableNamePost**](doc\DefaultApi.md#getitemsfromtableitemstablenamepost) | **POST** /items/{tableName} | Get Items From Table |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**listTablesApiListTablesGet**](doc\DefaultApi.md#listtablesapilisttablesget) | **GET** /api/listTables | List Tables |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**putAssetAssetsPost**](doc\DefaultApi.md#putassetassetspost) | **POST** /assets/+ | Put Asset |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**removeAssetAssetsAssetIdPost**](doc\DefaultApi.md#removeassetassetsassetidpost) | **POST** /assets/{asset_id}/- | Remove Asset |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**removeUserApiUsersPost**](doc\DefaultApi.md#removeuserapiuserspost) | **POST** /api/users/- | Remove User |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**updateAssetDescriptionAssetsAssetIdPost**](doc\DefaultApi.md#updateassetdescriptionassetsassetidpost) | **POST** /assets/{asset_id}/\* | Update Asset Description |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**updateItemInTableItemsTableNamePost**](doc\DefaultApi.md#updateitemintableitemstablenamepost) | **POST** /items/{tableName}/\* | Update Item In Table |
|
||||||
|
| [_DefaultApi_](doc\DefaultApi.md) | [**updateUserApiUsersPost**](doc\DefaultApi.md#updateuserapiuserspost) | **POST** /api/users/\* | Update User |
|
||||||
|
|
||||||
|
## Documentation For Models
|
||||||
|
|
||||||
|
- [AccessTokenResponse](doc\AccessTokenResponse.md)
|
||||||
|
- [AuthModel](doc\AuthModel.md)
|
||||||
|
- [BodyUpdateItemInTableItemsTableNamePost](doc\BodyUpdateItemInTableItemsTableNamePost.md)
|
||||||
|
- [ColumnConditionCompat](doc\ColumnConditionCompat.md)
|
||||||
|
- [CreateAssetResponse](doc\CreateAssetResponse.md)
|
||||||
|
- [CreateUserDefinition](doc\CreateUserDefinition.md)
|
||||||
|
- [ErrorResponse](doc\ErrorResponse.md)
|
||||||
|
- [HTTPValidationError](doc\HTTPValidationError.md)
|
||||||
|
- [ItemsFieldSelectorList](doc\ItemsFieldSelectorList.md)
|
||||||
|
- [LocationInner](doc\LocationInner.md)
|
||||||
|
- [OkResponse](doc\OkResponse.md)
|
||||||
|
- [TableDefinition](doc\TableDefinition.md)
|
||||||
|
- [TableItemsResponse](doc\TableItemsResponse.md)
|
||||||
|
- [UserUpdateDefinition](doc\UserUpdateDefinition.md)
|
||||||
|
- [ValidationError](doc\ValidationError.md)
|
||||||
|
|
||||||
|
## Documentation For Authorization
|
||||||
|
|
||||||
|
All endpoints do not require authorization.
|
||||||
|
|
||||||
|
## Author
|
||||||
11
analysis_options.yaml
Normal file
11
analysis_options.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
analyzer:
|
||||||
|
language:
|
||||||
|
strict-inference: true
|
||||||
|
strict-raw-types: true
|
||||||
|
strong-mode:
|
||||||
|
implicit-dynamic: false
|
||||||
|
implicit-casts: false
|
||||||
|
exclude:
|
||||||
|
- test/*.dart
|
||||||
|
errors:
|
||||||
|
deprecated_member_use_from_same_package: ignore
|
||||||
15
doc/AccessTokenResponse.md
Normal file
15
doc/AccessTokenResponse.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# tuuli_api.model.AccessTokenResponse
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**accessToken** | **String** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
16
doc/AuthModel.md
Normal file
16
doc/AuthModel.md
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# tuuli_api.model.AuthModel
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**username** | **String** | |
|
||||||
|
**password** | **String** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
16
doc/BodyUpdateItemInTableItemsTableNamePost.md
Normal file
16
doc/BodyUpdateItemInTableItemsTableNamePost.md
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# tuuli_api.model.BodyUpdateItemInTableItemsTableNamePost
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**item** | **BuiltMap<String, String>** | |
|
||||||
|
**oldItem** | **BuiltMap<String, String>** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
17
doc/ColumnConditionCompat.md
Normal file
17
doc/ColumnConditionCompat.md
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# tuuli_api.model.ColumnConditionCompat
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**column** | **String** | |
|
||||||
|
**operator_** | **String** | |
|
||||||
|
**value** | [**JsonObject**](.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
16
doc/CreateAssetResponse.md
Normal file
16
doc/CreateAssetResponse.md
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# tuuli_api.model.CreateAssetResponse
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ok** | **bool** | | [optional] [default to true]
|
||||||
|
**fid** | **String** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
16
doc/CreateUserDefinition.md
Normal file
16
doc/CreateUserDefinition.md
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
# tuuli_api.model.CreateUserDefinition
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**username** | **String** | |
|
||||||
|
**password** | **String** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
685
doc/DefaultApi.md
Normal file
685
doc/DefaultApi.md
Normal file
|
|
@ -0,0 +1,685 @@
|
||||||
|
# tuuli_api.api.DefaultApi
|
||||||
|
|
||||||
|
## Load the API package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**createItemItemsTableNamePost**](DefaultApi.md#createitemitemstablenamepost) | **POST** /items/{tableName}/+ | Create Item
|
||||||
|
[**createTableApiCreateTableTableNamePost**](DefaultApi.md#createtableapicreatetabletablenamepost) | **POST** /api/createTable/{tableName} | Create Table
|
||||||
|
[**createUserApiUsersPost**](DefaultApi.md#createuserapiuserspost) | **POST** /api/users/+ | Create User
|
||||||
|
[**deleteItemFromTableItemsTableNamePost**](DefaultApi.md#deleteitemfromtableitemstablenamepost) | **POST** /items/{tableName}/- | Delete Item From Table
|
||||||
|
[**dropTableApiDropTableTableNamePost**](DefaultApi.md#droptableapidroptabletablenamepost) | **POST** /api/dropTable/{tableName} | Drop Table
|
||||||
|
[**getAccessTokenApiGetAccessTokenPost**](DefaultApi.md#getaccesstokenapigetaccesstokenpost) | **POST** /api/getAccessToken | Get Access Token
|
||||||
|
[**getAssetAssetsFidGet**](DefaultApi.md#getassetassetsfidget) | **GET** /assets/{fid} | Get Asset
|
||||||
|
[**getItemsFromTableItemsTableNamePost**](DefaultApi.md#getitemsfromtableitemstablenamepost) | **POST** /items/{tableName} | Get Items From Table
|
||||||
|
[**listTablesApiListTablesGet**](DefaultApi.md#listtablesapilisttablesget) | **GET** /api/listTables | List Tables
|
||||||
|
[**putAssetAssetsPost**](DefaultApi.md#putassetassetspost) | **POST** /assets/+ | Put Asset
|
||||||
|
[**removeAssetAssetsAssetIdPost**](DefaultApi.md#removeassetassetsassetidpost) | **POST** /assets/{asset_id}/- | Remove Asset
|
||||||
|
[**removeUserApiUsersPost**](DefaultApi.md#removeuserapiuserspost) | **POST** /api/users/- | Remove User
|
||||||
|
[**updateAssetDescriptionAssetsAssetIdPost**](DefaultApi.md#updateassetdescriptionassetsassetidpost) | **POST** /assets/{asset_id}/* | Update Asset Description
|
||||||
|
[**updateItemInTableItemsTableNamePost**](DefaultApi.md#updateitemintableitemstablenamepost) | **POST** /items/{tableName}/* | Update Item In Table
|
||||||
|
[**updateUserApiUsersPost**](DefaultApi.md#updateuserapiuserspost) | **POST** /api/users/* | Update User
|
||||||
|
|
||||||
|
|
||||||
|
# **createItemItemsTableNamePost**
|
||||||
|
> OkResponse createItemItemsTableNamePost(tableName, body, accessToken)
|
||||||
|
|
||||||
|
Create Item
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String tableName = tableName_example; // String |
|
||||||
|
final JsonObject body = Object; // JsonObject |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.createItemItemsTableNamePost(tableName, body, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->createItemItemsTableNamePost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**tableName** | **String**| |
|
||||||
|
**body** | **JsonObject**| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **createTableApiCreateTableTableNamePost**
|
||||||
|
> OkResponse createTableApiCreateTableTableNamePost(tableName, requestBody, accessToken)
|
||||||
|
|
||||||
|
Create Table
|
||||||
|
|
||||||
|
Parameter `columns` should be a list of strings Each string should be in a following format: `column_name:column_type[:column_options]` Where *column_type* should be one of the following: - serial - str - bool - datetime - float - int - int:asset - int:user Also *column_options* can be one of the following: - unique - default Example: ```json [ \"id:serial:primary\", \"name:str:unique\", \"description:str\", \"is_active:bool\", \"price:float\", \"quantity:int\", \"creator_id:int:user\", \"asset_id:int:asset\" ] ``` Notes: 1. you cannot use *unique* and *default* at the same time 2. in current implementation you cannot use *default*, because there is no way to specify default value
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String tableName = tableName_example; // String |
|
||||||
|
final BuiltList<String> requestBody = ; // BuiltList<String> |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.createTableApiCreateTableTableNamePost(tableName, requestBody, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->createTableApiCreateTableTableNamePost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**tableName** | **String**| |
|
||||||
|
**requestBody** | [**BuiltList<String>**](String.md)| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **createUserApiUsersPost**
|
||||||
|
> OkResponse createUserApiUsersPost(createUserDefinition, accessToken)
|
||||||
|
|
||||||
|
Create User
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final CreateUserDefinition createUserDefinition = ; // CreateUserDefinition |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.createUserApiUsersPost(createUserDefinition, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->createUserApiUsersPost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**createUserDefinition** | [**CreateUserDefinition**](CreateUserDefinition.md)| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **deleteItemFromTableItemsTableNamePost**
|
||||||
|
> OkResponse deleteItemFromTableItemsTableNamePost(tableName, columnConditionCompat, accessToken)
|
||||||
|
|
||||||
|
Delete Item From Table
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String tableName = tableName_example; // String |
|
||||||
|
final BuiltList<ColumnConditionCompat> columnConditionCompat = ; // BuiltList<ColumnConditionCompat> |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.deleteItemFromTableItemsTableNamePost(tableName, columnConditionCompat, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->deleteItemFromTableItemsTableNamePost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**tableName** | **String**| |
|
||||||
|
**columnConditionCompat** | [**BuiltList<ColumnConditionCompat>**](ColumnConditionCompat.md)| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **dropTableApiDropTableTableNamePost**
|
||||||
|
> OkResponse dropTableApiDropTableTableNamePost(tableName, accessToken)
|
||||||
|
|
||||||
|
Drop Table
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String tableName = tableName_example; // String |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.dropTableApiDropTableTableNamePost(tableName, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->dropTableApiDropTableTableNamePost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**tableName** | **String**| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **getAccessTokenApiGetAccessTokenPost**
|
||||||
|
> AccessTokenResponse getAccessTokenApiGetAccessTokenPost(authModel)
|
||||||
|
|
||||||
|
Get Access Token
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final AuthModel authModel = ; // AuthModel |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.getAccessTokenApiGetAccessTokenPost(authModel);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->getAccessTokenApiGetAccessTokenPost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**authModel** | [**AuthModel**](AuthModel.md)| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**AccessTokenResponse**](AccessTokenResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **getAssetAssetsFidGet**
|
||||||
|
> JsonObject getAssetAssetsFidGet(fid)
|
||||||
|
|
||||||
|
Get Asset
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String fid = fid_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.getAssetAssetsFidGet(fid);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->getAssetAssetsFidGet: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**fid** | **String**| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**JsonObject**](JsonObject.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json, application/octet-stream
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **getItemsFromTableItemsTableNamePost**
|
||||||
|
> TableItemsResponse getItemsFromTableItemsTableNamePost(tableName, itemsFieldSelectorList, accessToken)
|
||||||
|
|
||||||
|
Get Items From Table
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String tableName = tableName_example; // String |
|
||||||
|
final ItemsFieldSelectorList itemsFieldSelectorList = ; // ItemsFieldSelectorList |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.getItemsFromTableItemsTableNamePost(tableName, itemsFieldSelectorList, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->getItemsFromTableItemsTableNamePost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**tableName** | **String**| |
|
||||||
|
**itemsFieldSelectorList** | [**ItemsFieldSelectorList**](ItemsFieldSelectorList.md)| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**TableItemsResponse**](TableItemsResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **listTablesApiListTablesGet**
|
||||||
|
> BuiltList<TableDefinition> listTablesApiListTablesGet(accessToken)
|
||||||
|
|
||||||
|
List Tables
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.listTablesApiListTablesGet(accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->listTablesApiListTablesGet: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**BuiltList<TableDefinition>**](TableDefinition.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **putAssetAssetsPost**
|
||||||
|
> CreateAssetResponse putAssetAssetsPost(asset, accessToken)
|
||||||
|
|
||||||
|
Put Asset
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final MultipartFile asset = BINARY_DATA_HERE; // MultipartFile |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.putAssetAssetsPost(asset, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->putAssetAssetsPost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**asset** | **MultipartFile**| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**CreateAssetResponse**](CreateAssetResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: multipart/form-data
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **removeAssetAssetsAssetIdPost**
|
||||||
|
> OkResponse removeAssetAssetsAssetIdPost(assetId, checkReferences, deleteReferencing, accessToken)
|
||||||
|
|
||||||
|
Remove Asset
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final int assetId = 56; // int |
|
||||||
|
final bool checkReferences = true; // bool |
|
||||||
|
final bool deleteReferencing = true; // bool |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.removeAssetAssetsAssetIdPost(assetId, checkReferences, deleteReferencing, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->removeAssetAssetsAssetIdPost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**assetId** | **int**| |
|
||||||
|
**checkReferences** | **bool**| | [optional] [default to true]
|
||||||
|
**deleteReferencing** | **bool**| | [optional] [default to false]
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **removeUserApiUsersPost**
|
||||||
|
> OkResponse removeUserApiUsersPost(userId, accessToken)
|
||||||
|
|
||||||
|
Remove User
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final int userId = 56; // int |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.removeUserApiUsersPost(userId, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->removeUserApiUsersPost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**userId** | **int**| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **updateAssetDescriptionAssetsAssetIdPost**
|
||||||
|
> OkResponse updateAssetDescriptionAssetsAssetIdPost(assetId, assetDescription, accessToken)
|
||||||
|
|
||||||
|
Update Asset Description
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final int assetId = 56; // int |
|
||||||
|
final String assetDescription = assetDescription_example; // String |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.updateAssetDescriptionAssetsAssetIdPost(assetId, assetDescription, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->updateAssetDescriptionAssetsAssetIdPost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**assetId** | **int**| |
|
||||||
|
**assetDescription** | **String**| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **updateItemInTableItemsTableNamePost**
|
||||||
|
> OkResponse updateItemInTableItemsTableNamePost(tableName, bodyUpdateItemInTableItemsTableNamePost, accessToken)
|
||||||
|
|
||||||
|
Update Item In Table
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final String tableName = tableName_example; // String |
|
||||||
|
final BodyUpdateItemInTableItemsTableNamePost bodyUpdateItemInTableItemsTableNamePost = ; // BodyUpdateItemInTableItemsTableNamePost |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.updateItemInTableItemsTableNamePost(tableName, bodyUpdateItemInTableItemsTableNamePost, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->updateItemInTableItemsTableNamePost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**tableName** | **String**| |
|
||||||
|
**bodyUpdateItemInTableItemsTableNamePost** | [**BodyUpdateItemInTableItemsTableNamePost**](BodyUpdateItemInTableItemsTableNamePost.md)| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **updateUserApiUsersPost**
|
||||||
|
> OkResponse updateUserApiUsersPost(userUpdateDefinition, accessToken)
|
||||||
|
|
||||||
|
Update User
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
|
||||||
|
final api = TuuliApi().getDefaultApi();
|
||||||
|
final UserUpdateDefinition userUpdateDefinition = ; // UserUpdateDefinition |
|
||||||
|
final String accessToken = accessToken_example; // String |
|
||||||
|
|
||||||
|
try {
|
||||||
|
final response = api.updateUserApiUsersPost(userUpdateDefinition, accessToken);
|
||||||
|
print(response);
|
||||||
|
} catch on DioError (e) {
|
||||||
|
print('Exception when calling DefaultApi->updateUserApiUsersPost: $e\n');
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**userUpdateDefinition** | [**UserUpdateDefinition**](UserUpdateDefinition.md)| |
|
||||||
|
**accessToken** | **String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**OkResponse**](OkResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
15
doc/ErrorResponse.md
Normal file
15
doc/ErrorResponse.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# tuuli_api.model.ErrorResponse
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**error** | **String** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
15
doc/HTTPValidationError.md
Normal file
15
doc/HTTPValidationError.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# tuuli_api.model.HTTPValidationError
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**detail** | [**BuiltList<ValidationError>**](ValidationError.md) | | [optional]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
15
doc/ItemsFieldSelectorList.md
Normal file
15
doc/ItemsFieldSelectorList.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# tuuli_api.model.ItemsFieldSelectorList
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**fields** | **BuiltList<String>** | | [optional] [default to ListBuilder()]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
14
doc/LocationInner.md
Normal file
14
doc/LocationInner.md
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# tuuli_api.model.LocationInner
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
15
doc/OkResponse.md
Normal file
15
doc/OkResponse.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# tuuli_api.model.OkResponse
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**ok** | **bool** | | [optional] [default to true]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
19
doc/TableDefinition.md
Normal file
19
doc/TableDefinition.md
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
# tuuli_api.model.TableDefinition
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**tableId** | **String** | |
|
||||||
|
**tableName** | **String** | |
|
||||||
|
**columns** | **String** | |
|
||||||
|
**system** | **bool** | |
|
||||||
|
**hidden** | **bool** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
15
doc/TableItemsResponse.md
Normal file
15
doc/TableItemsResponse.md
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
# tuuli_api.model.TableItemsResponse
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**items** | [**BuiltList<JsonObject>**](JsonObject.md) | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
17
doc/UserUpdateDefinition.md
Normal file
17
doc/UserUpdateDefinition.md
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# tuuli_api.model.UserUpdateDefinition
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**userId** | **int** | |
|
||||||
|
**password** | **String** | |
|
||||||
|
**accessToken** | **String** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
17
doc/ValidationError.md
Normal file
17
doc/ValidationError.md
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# tuuli_api.model.ValidationError
|
||||||
|
|
||||||
|
## Load the model package
|
||||||
|
```dart
|
||||||
|
import 'package:tuuli_api/api.dart';
|
||||||
|
```
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**loc** | [**BuiltList<LocationInner>**](LocationInner.md) | |
|
||||||
|
**msg** | **String** | |
|
||||||
|
**type** | **String** | |
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
73
lib/src/api.dart
Normal file
73
lib/src/api.dart
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
import 'package:tuuli_api/src/serializers.dart';
|
||||||
|
import 'package:tuuli_api/src/auth/api_key_auth.dart';
|
||||||
|
import 'package:tuuli_api/src/auth/basic_auth.dart';
|
||||||
|
import 'package:tuuli_api/src/auth/bearer_auth.dart';
|
||||||
|
import 'package:tuuli_api/src/auth/oauth.dart';
|
||||||
|
import 'package:tuuli_api/src/api/default_api.dart';
|
||||||
|
|
||||||
|
class TuuliApi {
|
||||||
|
static const String basePath = r'http://localhost';
|
||||||
|
|
||||||
|
final Dio dio;
|
||||||
|
final Serializers serializers;
|
||||||
|
|
||||||
|
TuuliApi({
|
||||||
|
Dio? dio,
|
||||||
|
Serializers? serializers,
|
||||||
|
String? basePathOverride,
|
||||||
|
List<Interceptor>? interceptors,
|
||||||
|
}) : this.serializers = serializers ?? standardSerializers,
|
||||||
|
this.dio = dio ??
|
||||||
|
Dio(BaseOptions(
|
||||||
|
baseUrl: basePathOverride ?? basePath,
|
||||||
|
connectTimeout: const Duration(milliseconds: 5000),
|
||||||
|
receiveTimeout: const Duration(milliseconds: 3000),
|
||||||
|
)) {
|
||||||
|
if (interceptors == null) {
|
||||||
|
this.dio.interceptors.addAll([
|
||||||
|
OAuthInterceptor(),
|
||||||
|
BasicAuthInterceptor(),
|
||||||
|
BearerAuthInterceptor(),
|
||||||
|
ApiKeyAuthInterceptor(),
|
||||||
|
]);
|
||||||
|
} else {
|
||||||
|
this.dio.interceptors.addAll(interceptors);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setOAuthToken(String name, String token) {
|
||||||
|
if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) {
|
||||||
|
(this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) as OAuthInterceptor).tokens[name] = token;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setBearerAuth(String name, String token) {
|
||||||
|
if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) {
|
||||||
|
(this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) as BearerAuthInterceptor).tokens[name] = token;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setBasicAuth(String name, String username, String password) {
|
||||||
|
if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) {
|
||||||
|
(this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setApiKey(String name, String apiKey) {
|
||||||
|
if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) {
|
||||||
|
(this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor) as ApiKeyAuthInterceptor).apiKeys[name] = apiKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get DefaultApi instance, base route and serializer can be overridden by a given but be careful,
|
||||||
|
/// by doing that all interceptors will not be executed
|
||||||
|
DefaultApi getDefaultApi() {
|
||||||
|
return DefaultApi(dio, serializers);
|
||||||
|
}
|
||||||
|
}
|
||||||
1409
lib/src/api/default_api.dart
Normal file
1409
lib/src/api/default_api.dart
Normal file
File diff suppressed because it is too large
Load diff
77
lib/src/api_util.dart
Normal file
77
lib/src/api_util.dart
Normal file
|
|
@ -0,0 +1,77 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
|
||||||
|
/// Format the given form parameter object into something that Dio can handle.
|
||||||
|
/// Returns primitive or String.
|
||||||
|
/// Returns List/Map if the value is BuildList/BuiltMap.
|
||||||
|
dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) {
|
||||||
|
if (value == null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
if (value is String || value is num || value is bool) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
final serialized = serializers.serialize(
|
||||||
|
value as Object,
|
||||||
|
specifiedType: type,
|
||||||
|
);
|
||||||
|
if (serialized is String) {
|
||||||
|
return serialized;
|
||||||
|
}
|
||||||
|
if (value is BuiltList || value is BuiltSet || value is BuiltMap) {
|
||||||
|
return serialized;
|
||||||
|
}
|
||||||
|
return json.encode(serialized);
|
||||||
|
}
|
||||||
|
|
||||||
|
dynamic encodeQueryParameter(
|
||||||
|
Serializers serializers,
|
||||||
|
dynamic value,
|
||||||
|
FullType type,
|
||||||
|
) {
|
||||||
|
if (value == null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
if (value is String || value is num || value is bool) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
if (value is Uint8List) {
|
||||||
|
// Currently not sure how to serialize this
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
final serialized = serializers.serialize(
|
||||||
|
value as Object,
|
||||||
|
specifiedType: type,
|
||||||
|
);
|
||||||
|
if (serialized == null) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
if (serialized is String) {
|
||||||
|
return serialized;
|
||||||
|
}
|
||||||
|
return serialized;
|
||||||
|
}
|
||||||
|
|
||||||
|
ListParam<Object?> encodeCollectionQueryParameter<T>(
|
||||||
|
Serializers serializers,
|
||||||
|
dynamic value,
|
||||||
|
FullType type, {
|
||||||
|
ListFormat format = ListFormat.multi,
|
||||||
|
}) {
|
||||||
|
final serialized = serializers.serialize(
|
||||||
|
value as Object,
|
||||||
|
specifiedType: type,
|
||||||
|
);
|
||||||
|
if (value is BuiltList<T> || value is BuiltSet<T>) {
|
||||||
|
return ListParam(List.of((serialized as Iterable<Object?>).cast()), format);
|
||||||
|
}
|
||||||
|
throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter');
|
||||||
|
}
|
||||||
30
lib/src/auth/api_key_auth.dart
Normal file
30
lib/src/auth/api_key_auth.dart
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:tuuli_api/src/auth/auth.dart';
|
||||||
|
|
||||||
|
class ApiKeyAuthInterceptor extends AuthInterceptor {
|
||||||
|
final Map<String, String> apiKeys = {};
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
|
||||||
|
final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'apiKey');
|
||||||
|
for (final info in authInfo) {
|
||||||
|
final authName = info['name'] as String;
|
||||||
|
final authKeyName = info['keyName'] as String;
|
||||||
|
final authWhere = info['where'] as String;
|
||||||
|
final apiKey = apiKeys[authName];
|
||||||
|
if (apiKey != null) {
|
||||||
|
if (authWhere == 'query') {
|
||||||
|
options.queryParameters[authKeyName] = apiKey;
|
||||||
|
} else {
|
||||||
|
options.headers[authKeyName] = apiKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.onRequest(options, handler);
|
||||||
|
}
|
||||||
|
}
|
||||||
18
lib/src/auth/auth.dart
Normal file
18
lib/src/auth/auth.dart
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
|
||||||
|
abstract class AuthInterceptor extends Interceptor {
|
||||||
|
/// Get auth information on given route for the given type.
|
||||||
|
/// Can return an empty list if type is not present on auth data or
|
||||||
|
/// if route doesn't need authentication.
|
||||||
|
List<Map<String, String>> getAuthInfo(RequestOptions route, bool Function(Map<String, String> secure) handles) {
|
||||||
|
if (route.extra.containsKey('secure')) {
|
||||||
|
final auth = route.extra['secure'] as List<Map<String, String>>;
|
||||||
|
return auth.where((secure) => handles(secure)).toList();
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
37
lib/src/auth/basic_auth.dart
Normal file
37
lib/src/auth/basic_auth.dart
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:tuuli_api/src/auth/auth.dart';
|
||||||
|
|
||||||
|
class BasicAuthInfo {
|
||||||
|
final String username;
|
||||||
|
final String password;
|
||||||
|
|
||||||
|
const BasicAuthInfo(this.username, this.password);
|
||||||
|
}
|
||||||
|
|
||||||
|
class BasicAuthInterceptor extends AuthInterceptor {
|
||||||
|
final Map<String, BasicAuthInfo> authInfo = {};
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onRequest(
|
||||||
|
RequestOptions options,
|
||||||
|
RequestInterceptorHandler handler,
|
||||||
|
) {
|
||||||
|
final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme'] == 'basic') || secure['type'] == 'basic');
|
||||||
|
for (final info in metadataAuthInfo) {
|
||||||
|
final authName = info['name'] as String;
|
||||||
|
final basicAuthInfo = authInfo[authName];
|
||||||
|
if (basicAuthInfo != null) {
|
||||||
|
final basicAuth = 'Basic ${base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'))}';
|
||||||
|
options.headers['Authorization'] = basicAuth;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.onRequest(options, handler);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
lib/src/auth/bearer_auth.dart
Normal file
26
lib/src/auth/bearer_auth.dart
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:tuuli_api/src/auth/auth.dart';
|
||||||
|
|
||||||
|
class BearerAuthInterceptor extends AuthInterceptor {
|
||||||
|
final Map<String, String> tokens = {};
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onRequest(
|
||||||
|
RequestOptions options,
|
||||||
|
RequestInterceptorHandler handler,
|
||||||
|
) {
|
||||||
|
final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme'] == 'bearer');
|
||||||
|
for (final info in authInfo) {
|
||||||
|
final token = tokens[info['name']];
|
||||||
|
if (token != null) {
|
||||||
|
options.headers['Authorization'] = 'Bearer ${token}';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.onRequest(options, handler);
|
||||||
|
}
|
||||||
|
}
|
||||||
26
lib/src/auth/oauth.dart
Normal file
26
lib/src/auth/oauth.dart
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:tuuli_api/src/auth/auth.dart';
|
||||||
|
|
||||||
|
class OAuthInterceptor extends AuthInterceptor {
|
||||||
|
final Map<String, String> tokens = {};
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onRequest(
|
||||||
|
RequestOptions options,
|
||||||
|
RequestInterceptorHandler handler,
|
||||||
|
) {
|
||||||
|
final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'oauth' || secure['type'] == 'oauth2');
|
||||||
|
for (final info in authInfo) {
|
||||||
|
final token = tokens[info['name']];
|
||||||
|
if (token != null) {
|
||||||
|
options.headers['Authorization'] = 'Bearer ${token}';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.onRequest(options, handler);
|
||||||
|
}
|
||||||
|
}
|
||||||
31
lib/src/date_serializer.dart
Normal file
31
lib/src/date_serializer.dart
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
import 'package:tuuli_api/src/model/date.dart';
|
||||||
|
|
||||||
|
class DateSerializer implements PrimitiveSerializer<Date> {
|
||||||
|
|
||||||
|
const DateSerializer();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Iterable<Type> get types => BuiltList.of([Date]);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get wireName => 'Date';
|
||||||
|
|
||||||
|
@override
|
||||||
|
Date deserialize(Serializers serializers, Object serialized,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) {
|
||||||
|
final parsed = DateTime.parse(serialized as String);
|
||||||
|
return Date(parsed.year, parsed.month, parsed.day);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(Serializers serializers, Date date,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) {
|
||||||
|
return date.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
106
lib/src/model/access_token_response.dart
Normal file
106
lib/src/model/access_token_response.dart
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'access_token_response.g.dart';
|
||||||
|
|
||||||
|
/// AccessTokenResponse
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [accessToken]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class AccessTokenResponse implements Built<AccessTokenResponse, AccessTokenResponseBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'access_token')
|
||||||
|
String get accessToken;
|
||||||
|
|
||||||
|
AccessTokenResponse._();
|
||||||
|
|
||||||
|
factory AccessTokenResponse([void updates(AccessTokenResponseBuilder b)]) = _$AccessTokenResponse;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(AccessTokenResponseBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<AccessTokenResponse> get serializer => _$AccessTokenResponseSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$AccessTokenResponseSerializer implements PrimitiveSerializer<AccessTokenResponse> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [AccessTokenResponse, _$AccessTokenResponse];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'AccessTokenResponse';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
AccessTokenResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'access_token';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.accessToken,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
AccessTokenResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required AccessTokenResponseBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'access_token':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.accessToken = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
AccessTokenResponse deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = AccessTokenResponseBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
98
lib/src/model/access_token_response.g.dart
Normal file
98
lib/src/model/access_token_response.g.dart
Normal file
|
|
@ -0,0 +1,98 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'access_token_response.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$AccessTokenResponse extends AccessTokenResponse {
|
||||||
|
@override
|
||||||
|
final String accessToken;
|
||||||
|
|
||||||
|
factory _$AccessTokenResponse(
|
||||||
|
[void Function(AccessTokenResponseBuilder)? updates]) =>
|
||||||
|
(new AccessTokenResponseBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$AccessTokenResponse._({required this.accessToken}) : super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
accessToken, r'AccessTokenResponse', 'accessToken');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
AccessTokenResponse rebuild(
|
||||||
|
void Function(AccessTokenResponseBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
AccessTokenResponseBuilder toBuilder() =>
|
||||||
|
new AccessTokenResponseBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is AccessTokenResponse && accessToken == other.accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, accessToken.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'AccessTokenResponse')
|
||||||
|
..add('accessToken', accessToken))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AccessTokenResponseBuilder
|
||||||
|
implements Builder<AccessTokenResponse, AccessTokenResponseBuilder> {
|
||||||
|
_$AccessTokenResponse? _$v;
|
||||||
|
|
||||||
|
String? _accessToken;
|
||||||
|
String? get accessToken => _$this._accessToken;
|
||||||
|
set accessToken(String? accessToken) => _$this._accessToken = accessToken;
|
||||||
|
|
||||||
|
AccessTokenResponseBuilder() {
|
||||||
|
AccessTokenResponse._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
AccessTokenResponseBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_accessToken = $v.accessToken;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(AccessTokenResponse other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$AccessTokenResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(AccessTokenResponseBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
AccessTokenResponse build() => _build();
|
||||||
|
|
||||||
|
_$AccessTokenResponse _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$AccessTokenResponse._(
|
||||||
|
accessToken: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
accessToken, r'AccessTokenResponse', 'accessToken'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
122
lib/src/model/auth_model.dart
Normal file
122
lib/src/model/auth_model.dart
Normal file
|
|
@ -0,0 +1,122 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'auth_model.g.dart';
|
||||||
|
|
||||||
|
/// AuthModel
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [username]
|
||||||
|
/// * [password]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class AuthModel implements Built<AuthModel, AuthModelBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'username')
|
||||||
|
String get username;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'password')
|
||||||
|
String get password;
|
||||||
|
|
||||||
|
AuthModel._();
|
||||||
|
|
||||||
|
factory AuthModel([void updates(AuthModelBuilder b)]) = _$AuthModel;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(AuthModelBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<AuthModel> get serializer => _$AuthModelSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$AuthModelSerializer implements PrimitiveSerializer<AuthModel> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [AuthModel, _$AuthModel];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'AuthModel';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
AuthModel object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'username';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.username,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
yield r'password';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.password,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
AuthModel object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required AuthModelBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'username':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.username = valueDes;
|
||||||
|
break;
|
||||||
|
case r'password':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.password = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
AuthModel deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = AuthModelBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
107
lib/src/model/auth_model.g.dart
Normal file
107
lib/src/model/auth_model.g.dart
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'auth_model.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$AuthModel extends AuthModel {
|
||||||
|
@override
|
||||||
|
final String username;
|
||||||
|
@override
|
||||||
|
final String password;
|
||||||
|
|
||||||
|
factory _$AuthModel([void Function(AuthModelBuilder)? updates]) =>
|
||||||
|
(new AuthModelBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$AuthModel._({required this.username, required this.password}) : super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(username, r'AuthModel', 'username');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(password, r'AuthModel', 'password');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
AuthModel rebuild(void Function(AuthModelBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
AuthModelBuilder toBuilder() => new AuthModelBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is AuthModel &&
|
||||||
|
username == other.username &&
|
||||||
|
password == other.password;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, username.hashCode);
|
||||||
|
_$hash = $jc(_$hash, password.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'AuthModel')
|
||||||
|
..add('username', username)
|
||||||
|
..add('password', password))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AuthModelBuilder implements Builder<AuthModel, AuthModelBuilder> {
|
||||||
|
_$AuthModel? _$v;
|
||||||
|
|
||||||
|
String? _username;
|
||||||
|
String? get username => _$this._username;
|
||||||
|
set username(String? username) => _$this._username = username;
|
||||||
|
|
||||||
|
String? _password;
|
||||||
|
String? get password => _$this._password;
|
||||||
|
set password(String? password) => _$this._password = password;
|
||||||
|
|
||||||
|
AuthModelBuilder() {
|
||||||
|
AuthModel._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
AuthModelBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_username = $v.username;
|
||||||
|
_password = $v.password;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(AuthModel other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$AuthModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(AuthModelBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
AuthModel build() => _build();
|
||||||
|
|
||||||
|
_$AuthModel _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$AuthModel._(
|
||||||
|
username: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
username, r'AuthModel', 'username'),
|
||||||
|
password: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
password, r'AuthModel', 'password'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
|
|
@ -0,0 +1,123 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'body_update_item_in_table_items_table_name_post.g.dart';
|
||||||
|
|
||||||
|
/// BodyUpdateItemInTableItemsTableNamePost
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [item]
|
||||||
|
/// * [oldItem]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class BodyUpdateItemInTableItemsTableNamePost implements Built<BodyUpdateItemInTableItemsTableNamePost, BodyUpdateItemInTableItemsTableNamePostBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'item')
|
||||||
|
BuiltMap<String, String> get item;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'oldItem')
|
||||||
|
BuiltMap<String, String> get oldItem;
|
||||||
|
|
||||||
|
BodyUpdateItemInTableItemsTableNamePost._();
|
||||||
|
|
||||||
|
factory BodyUpdateItemInTableItemsTableNamePost([void updates(BodyUpdateItemInTableItemsTableNamePostBuilder b)]) = _$BodyUpdateItemInTableItemsTableNamePost;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(BodyUpdateItemInTableItemsTableNamePostBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<BodyUpdateItemInTableItemsTableNamePost> get serializer => _$BodyUpdateItemInTableItemsTableNamePostSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$BodyUpdateItemInTableItemsTableNamePostSerializer implements PrimitiveSerializer<BodyUpdateItemInTableItemsTableNamePost> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [BodyUpdateItemInTableItemsTableNamePost, _$BodyUpdateItemInTableItemsTableNamePost];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'BodyUpdateItemInTableItemsTableNamePost';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
BodyUpdateItemInTableItemsTableNamePost object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'item';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.item,
|
||||||
|
specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]),
|
||||||
|
);
|
||||||
|
yield r'oldItem';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.oldItem,
|
||||||
|
specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
BodyUpdateItemInTableItemsTableNamePost object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required BodyUpdateItemInTableItemsTableNamePostBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'item':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]),
|
||||||
|
) as BuiltMap<String, String>;
|
||||||
|
result.item.replace(valueDes);
|
||||||
|
break;
|
||||||
|
case r'oldItem':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]),
|
||||||
|
) as BuiltMap<String, String>;
|
||||||
|
result.oldItem.replace(valueDes);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
BodyUpdateItemInTableItemsTableNamePost deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = BodyUpdateItemInTableItemsTableNamePostBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,139 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'body_update_item_in_table_items_table_name_post.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$BodyUpdateItemInTableItemsTableNamePost
|
||||||
|
extends BodyUpdateItemInTableItemsTableNamePost {
|
||||||
|
@override
|
||||||
|
final BuiltMap<String, String> item;
|
||||||
|
@override
|
||||||
|
final BuiltMap<String, String> oldItem;
|
||||||
|
|
||||||
|
factory _$BodyUpdateItemInTableItemsTableNamePost(
|
||||||
|
[void Function(BodyUpdateItemInTableItemsTableNamePostBuilder)?
|
||||||
|
updates]) =>
|
||||||
|
(new BodyUpdateItemInTableItemsTableNamePostBuilder()..update(updates))
|
||||||
|
._build();
|
||||||
|
|
||||||
|
_$BodyUpdateItemInTableItemsTableNamePost._(
|
||||||
|
{required this.item, required this.oldItem})
|
||||||
|
: super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
item, r'BodyUpdateItemInTableItemsTableNamePost', 'item');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
oldItem, r'BodyUpdateItemInTableItemsTableNamePost', 'oldItem');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
BodyUpdateItemInTableItemsTableNamePost rebuild(
|
||||||
|
void Function(BodyUpdateItemInTableItemsTableNamePostBuilder)
|
||||||
|
updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
BodyUpdateItemInTableItemsTableNamePostBuilder toBuilder() =>
|
||||||
|
new BodyUpdateItemInTableItemsTableNamePostBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is BodyUpdateItemInTableItemsTableNamePost &&
|
||||||
|
item == other.item &&
|
||||||
|
oldItem == other.oldItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, item.hashCode);
|
||||||
|
_$hash = $jc(_$hash, oldItem.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(
|
||||||
|
r'BodyUpdateItemInTableItemsTableNamePost')
|
||||||
|
..add('item', item)
|
||||||
|
..add('oldItem', oldItem))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BodyUpdateItemInTableItemsTableNamePostBuilder
|
||||||
|
implements
|
||||||
|
Builder<BodyUpdateItemInTableItemsTableNamePost,
|
||||||
|
BodyUpdateItemInTableItemsTableNamePostBuilder> {
|
||||||
|
_$BodyUpdateItemInTableItemsTableNamePost? _$v;
|
||||||
|
|
||||||
|
MapBuilder<String, String>? _item;
|
||||||
|
MapBuilder<String, String> get item =>
|
||||||
|
_$this._item ??= new MapBuilder<String, String>();
|
||||||
|
set item(MapBuilder<String, String>? item) => _$this._item = item;
|
||||||
|
|
||||||
|
MapBuilder<String, String>? _oldItem;
|
||||||
|
MapBuilder<String, String> get oldItem =>
|
||||||
|
_$this._oldItem ??= new MapBuilder<String, String>();
|
||||||
|
set oldItem(MapBuilder<String, String>? oldItem) => _$this._oldItem = oldItem;
|
||||||
|
|
||||||
|
BodyUpdateItemInTableItemsTableNamePostBuilder() {
|
||||||
|
BodyUpdateItemInTableItemsTableNamePost._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
BodyUpdateItemInTableItemsTableNamePostBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_item = $v.item.toBuilder();
|
||||||
|
_oldItem = $v.oldItem.toBuilder();
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(BodyUpdateItemInTableItemsTableNamePost other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$BodyUpdateItemInTableItemsTableNamePost;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(
|
||||||
|
void Function(BodyUpdateItemInTableItemsTableNamePostBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
BodyUpdateItemInTableItemsTableNamePost build() => _build();
|
||||||
|
|
||||||
|
_$BodyUpdateItemInTableItemsTableNamePost _build() {
|
||||||
|
_$BodyUpdateItemInTableItemsTableNamePost _$result;
|
||||||
|
try {
|
||||||
|
_$result = _$v ??
|
||||||
|
new _$BodyUpdateItemInTableItemsTableNamePost._(
|
||||||
|
item: item.build(), oldItem: oldItem.build());
|
||||||
|
} catch (_) {
|
||||||
|
late String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'item';
|
||||||
|
item.build();
|
||||||
|
_$failedField = 'oldItem';
|
||||||
|
oldItem.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
r'BodyUpdateItemInTableItemsTableNamePost',
|
||||||
|
_$failedField,
|
||||||
|
e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
179
lib/src/model/column_condition_compat.dart
Normal file
179
lib/src/model/column_condition_compat.dart
Normal file
|
|
@ -0,0 +1,179 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:built_value/json_object.dart';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'column_condition_compat.g.dart';
|
||||||
|
|
||||||
|
/// ColumnConditionCompat
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [column]
|
||||||
|
/// * [operator_]
|
||||||
|
/// * [value]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class ColumnConditionCompat implements Built<ColumnConditionCompat, ColumnConditionCompatBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'column')
|
||||||
|
String get column;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'operator')
|
||||||
|
ColumnConditionCompatOperator_Enum get operator_;
|
||||||
|
// enum operator_Enum { eq, ne, gt, lt, ge, le, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, };
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'value')
|
||||||
|
JsonObject? get value;
|
||||||
|
|
||||||
|
ColumnConditionCompat._();
|
||||||
|
|
||||||
|
factory ColumnConditionCompat([void updates(ColumnConditionCompatBuilder b)]) = _$ColumnConditionCompat;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(ColumnConditionCompatBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<ColumnConditionCompat> get serializer => _$ColumnConditionCompatSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$ColumnConditionCompatSerializer implements PrimitiveSerializer<ColumnConditionCompat> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [ColumnConditionCompat, _$ColumnConditionCompat];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'ColumnConditionCompat';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
ColumnConditionCompat object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'column';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.column,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
yield r'operator';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.operator_,
|
||||||
|
specifiedType: const FullType(ColumnConditionCompatOperator_Enum),
|
||||||
|
);
|
||||||
|
if (object.value != null) {
|
||||||
|
yield r'value';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.value,
|
||||||
|
specifiedType: const FullType.nullable(JsonObject),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
ColumnConditionCompat object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required ColumnConditionCompatBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'column':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.column = valueDes;
|
||||||
|
break;
|
||||||
|
case r'operator':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(ColumnConditionCompatOperator_Enum),
|
||||||
|
) as ColumnConditionCompatOperator_Enum;
|
||||||
|
result.operator_ = valueDes;
|
||||||
|
break;
|
||||||
|
case r'value':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType.nullable(JsonObject),
|
||||||
|
) as JsonObject?;
|
||||||
|
if (valueDes == null) continue;
|
||||||
|
result.value = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ColumnConditionCompat deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = ColumnConditionCompatBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ColumnConditionCompatOperator_Enum extends EnumClass {
|
||||||
|
|
||||||
|
@BuiltValueEnumConst(wireName: r'eq')
|
||||||
|
static const ColumnConditionCompatOperator_Enum eq = _$columnConditionCompatOperatorEnum_eq;
|
||||||
|
@BuiltValueEnumConst(wireName: r'ne')
|
||||||
|
static const ColumnConditionCompatOperator_Enum ne = _$columnConditionCompatOperatorEnum_ne;
|
||||||
|
@BuiltValueEnumConst(wireName: r'gt')
|
||||||
|
static const ColumnConditionCompatOperator_Enum gt = _$columnConditionCompatOperatorEnum_gt;
|
||||||
|
@BuiltValueEnumConst(wireName: r'lt')
|
||||||
|
static const ColumnConditionCompatOperator_Enum lt = _$columnConditionCompatOperatorEnum_lt;
|
||||||
|
@BuiltValueEnumConst(wireName: r'ge')
|
||||||
|
static const ColumnConditionCompatOperator_Enum ge = _$columnConditionCompatOperatorEnum_ge;
|
||||||
|
@BuiltValueEnumConst(wireName: r'le')
|
||||||
|
static const ColumnConditionCompatOperator_Enum le = _$columnConditionCompatOperatorEnum_le;
|
||||||
|
@BuiltValueEnumConst(wireName: r'contains')
|
||||||
|
static const ColumnConditionCompatOperator_Enum contains = _$columnConditionCompatOperatorEnum_contains;
|
||||||
|
@BuiltValueEnumConst(wireName: r'not_contains')
|
||||||
|
static const ColumnConditionCompatOperator_Enum notContains = _$columnConditionCompatOperatorEnum_notContains;
|
||||||
|
@BuiltValueEnumConst(wireName: r'starts_with')
|
||||||
|
static const ColumnConditionCompatOperator_Enum startsWith = _$columnConditionCompatOperatorEnum_startsWith;
|
||||||
|
@BuiltValueEnumConst(wireName: r'not_starts_with')
|
||||||
|
static const ColumnConditionCompatOperator_Enum notStartsWith = _$columnConditionCompatOperatorEnum_notStartsWith;
|
||||||
|
@BuiltValueEnumConst(wireName: r'ends_with')
|
||||||
|
static const ColumnConditionCompatOperator_Enum endsWith = _$columnConditionCompatOperatorEnum_endsWith;
|
||||||
|
@BuiltValueEnumConst(wireName: r'not_ends_with')
|
||||||
|
static const ColumnConditionCompatOperator_Enum notEndsWith = _$columnConditionCompatOperatorEnum_notEndsWith;
|
||||||
|
|
||||||
|
static Serializer<ColumnConditionCompatOperator_Enum> get serializer => _$columnConditionCompatOperatorEnumSerializer;
|
||||||
|
|
||||||
|
const ColumnConditionCompatOperator_Enum._(String name): super(name);
|
||||||
|
|
||||||
|
static BuiltSet<ColumnConditionCompatOperator_Enum> get values => _$columnConditionCompatOperatorEnumValues;
|
||||||
|
static ColumnConditionCompatOperator_Enum valueOf(String name) => _$columnConditionCompatOperatorEnumValueOf(name);
|
||||||
|
}
|
||||||
|
|
||||||
267
lib/src/model/column_condition_compat.g.dart
Normal file
267
lib/src/model/column_condition_compat.g.dart
Normal file
|
|
@ -0,0 +1,267 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'column_condition_compat.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_eq =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('eq');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_ne =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('ne');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_gt =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('gt');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_lt =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('lt');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_ge =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('ge');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_le =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('le');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_contains =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('contains');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_notContains =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('notContains');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_startsWith =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('startsWith');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_notStartsWith =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('notStartsWith');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_endsWith =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('endsWith');
|
||||||
|
const ColumnConditionCompatOperator_Enum
|
||||||
|
_$columnConditionCompatOperatorEnum_notEndsWith =
|
||||||
|
const ColumnConditionCompatOperator_Enum._('notEndsWith');
|
||||||
|
|
||||||
|
ColumnConditionCompatOperator_Enum _$columnConditionCompatOperatorEnumValueOf(
|
||||||
|
String name) {
|
||||||
|
switch (name) {
|
||||||
|
case 'eq':
|
||||||
|
return _$columnConditionCompatOperatorEnum_eq;
|
||||||
|
case 'ne':
|
||||||
|
return _$columnConditionCompatOperatorEnum_ne;
|
||||||
|
case 'gt':
|
||||||
|
return _$columnConditionCompatOperatorEnum_gt;
|
||||||
|
case 'lt':
|
||||||
|
return _$columnConditionCompatOperatorEnum_lt;
|
||||||
|
case 'ge':
|
||||||
|
return _$columnConditionCompatOperatorEnum_ge;
|
||||||
|
case 'le':
|
||||||
|
return _$columnConditionCompatOperatorEnum_le;
|
||||||
|
case 'contains':
|
||||||
|
return _$columnConditionCompatOperatorEnum_contains;
|
||||||
|
case 'notContains':
|
||||||
|
return _$columnConditionCompatOperatorEnum_notContains;
|
||||||
|
case 'startsWith':
|
||||||
|
return _$columnConditionCompatOperatorEnum_startsWith;
|
||||||
|
case 'notStartsWith':
|
||||||
|
return _$columnConditionCompatOperatorEnum_notStartsWith;
|
||||||
|
case 'endsWith':
|
||||||
|
return _$columnConditionCompatOperatorEnum_endsWith;
|
||||||
|
case 'notEndsWith':
|
||||||
|
return _$columnConditionCompatOperatorEnum_notEndsWith;
|
||||||
|
default:
|
||||||
|
throw new ArgumentError(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final BuiltSet<ColumnConditionCompatOperator_Enum>
|
||||||
|
_$columnConditionCompatOperatorEnumValues = new BuiltSet<
|
||||||
|
ColumnConditionCompatOperator_Enum>(const <ColumnConditionCompatOperator_Enum>[
|
||||||
|
_$columnConditionCompatOperatorEnum_eq,
|
||||||
|
_$columnConditionCompatOperatorEnum_ne,
|
||||||
|
_$columnConditionCompatOperatorEnum_gt,
|
||||||
|
_$columnConditionCompatOperatorEnum_lt,
|
||||||
|
_$columnConditionCompatOperatorEnum_ge,
|
||||||
|
_$columnConditionCompatOperatorEnum_le,
|
||||||
|
_$columnConditionCompatOperatorEnum_contains,
|
||||||
|
_$columnConditionCompatOperatorEnum_notContains,
|
||||||
|
_$columnConditionCompatOperatorEnum_startsWith,
|
||||||
|
_$columnConditionCompatOperatorEnum_notStartsWith,
|
||||||
|
_$columnConditionCompatOperatorEnum_endsWith,
|
||||||
|
_$columnConditionCompatOperatorEnum_notEndsWith,
|
||||||
|
]);
|
||||||
|
|
||||||
|
Serializer<ColumnConditionCompatOperator_Enum>
|
||||||
|
_$columnConditionCompatOperatorEnumSerializer =
|
||||||
|
new _$ColumnConditionCompatOperator_EnumSerializer();
|
||||||
|
|
||||||
|
class _$ColumnConditionCompatOperator_EnumSerializer
|
||||||
|
implements PrimitiveSerializer<ColumnConditionCompatOperator_Enum> {
|
||||||
|
static const Map<String, Object> _toWire = const <String, Object>{
|
||||||
|
'eq': 'eq',
|
||||||
|
'ne': 'ne',
|
||||||
|
'gt': 'gt',
|
||||||
|
'lt': 'lt',
|
||||||
|
'ge': 'ge',
|
||||||
|
'le': 'le',
|
||||||
|
'contains': 'contains',
|
||||||
|
'notContains': 'not_contains',
|
||||||
|
'startsWith': 'starts_with',
|
||||||
|
'notStartsWith': 'not_starts_with',
|
||||||
|
'endsWith': 'ends_with',
|
||||||
|
'notEndsWith': 'not_ends_with',
|
||||||
|
};
|
||||||
|
static const Map<Object, String> _fromWire = const <Object, String>{
|
||||||
|
'eq': 'eq',
|
||||||
|
'ne': 'ne',
|
||||||
|
'gt': 'gt',
|
||||||
|
'lt': 'lt',
|
||||||
|
'ge': 'ge',
|
||||||
|
'le': 'le',
|
||||||
|
'contains': 'contains',
|
||||||
|
'not_contains': 'notContains',
|
||||||
|
'starts_with': 'startsWith',
|
||||||
|
'not_starts_with': 'notStartsWith',
|
||||||
|
'ends_with': 'endsWith',
|
||||||
|
'not_ends_with': 'notEndsWith',
|
||||||
|
};
|
||||||
|
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const <Type>[ColumnConditionCompatOperator_Enum];
|
||||||
|
@override
|
||||||
|
final String wireName = 'ColumnConditionCompatOperator_Enum';
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers, ColumnConditionCompatOperator_Enum object,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) =>
|
||||||
|
_toWire[object.name] ?? object.name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
ColumnConditionCompatOperator_Enum deserialize(
|
||||||
|
Serializers serializers, Object serialized,
|
||||||
|
{FullType specifiedType = FullType.unspecified}) =>
|
||||||
|
ColumnConditionCompatOperator_Enum.valueOf(
|
||||||
|
_fromWire[serialized] ?? (serialized is String ? serialized : ''));
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$ColumnConditionCompat extends ColumnConditionCompat {
|
||||||
|
@override
|
||||||
|
final String column;
|
||||||
|
@override
|
||||||
|
final ColumnConditionCompatOperator_Enum operator_;
|
||||||
|
@override
|
||||||
|
final JsonObject? value;
|
||||||
|
|
||||||
|
factory _$ColumnConditionCompat(
|
||||||
|
[void Function(ColumnConditionCompatBuilder)? updates]) =>
|
||||||
|
(new ColumnConditionCompatBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$ColumnConditionCompat._(
|
||||||
|
{required this.column, required this.operator_, this.value})
|
||||||
|
: super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
column, r'ColumnConditionCompat', 'column');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
operator_, r'ColumnConditionCompat', 'operator_');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ColumnConditionCompat rebuild(
|
||||||
|
void Function(ColumnConditionCompatBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
ColumnConditionCompatBuilder toBuilder() =>
|
||||||
|
new ColumnConditionCompatBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is ColumnConditionCompat &&
|
||||||
|
column == other.column &&
|
||||||
|
operator_ == other.operator_ &&
|
||||||
|
value == other.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, column.hashCode);
|
||||||
|
_$hash = $jc(_$hash, operator_.hashCode);
|
||||||
|
_$hash = $jc(_$hash, value.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'ColumnConditionCompat')
|
||||||
|
..add('column', column)
|
||||||
|
..add('operator_', operator_)
|
||||||
|
..add('value', value))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ColumnConditionCompatBuilder
|
||||||
|
implements Builder<ColumnConditionCompat, ColumnConditionCompatBuilder> {
|
||||||
|
_$ColumnConditionCompat? _$v;
|
||||||
|
|
||||||
|
String? _column;
|
||||||
|
String? get column => _$this._column;
|
||||||
|
set column(String? column) => _$this._column = column;
|
||||||
|
|
||||||
|
ColumnConditionCompatOperator_Enum? _operator_;
|
||||||
|
ColumnConditionCompatOperator_Enum? get operator_ => _$this._operator_;
|
||||||
|
set operator_(ColumnConditionCompatOperator_Enum? operator_) =>
|
||||||
|
_$this._operator_ = operator_;
|
||||||
|
|
||||||
|
JsonObject? _value;
|
||||||
|
JsonObject? get value => _$this._value;
|
||||||
|
set value(JsonObject? value) => _$this._value = value;
|
||||||
|
|
||||||
|
ColumnConditionCompatBuilder() {
|
||||||
|
ColumnConditionCompat._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnConditionCompatBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_column = $v.column;
|
||||||
|
_operator_ = $v.operator_;
|
||||||
|
_value = $v.value;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(ColumnConditionCompat other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$ColumnConditionCompat;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(ColumnConditionCompatBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ColumnConditionCompat build() => _build();
|
||||||
|
|
||||||
|
_$ColumnConditionCompat _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$ColumnConditionCompat._(
|
||||||
|
column: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
column, r'ColumnConditionCompat', 'column'),
|
||||||
|
operator_: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
operator_, r'ColumnConditionCompat', 'operator_'),
|
||||||
|
value: value);
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
125
lib/src/model/create_asset_response.dart
Normal file
125
lib/src/model/create_asset_response.dart
Normal file
|
|
@ -0,0 +1,125 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'create_asset_response.g.dart';
|
||||||
|
|
||||||
|
/// CreateAssetResponse
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [ok]
|
||||||
|
/// * [fid]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class CreateAssetResponse implements Built<CreateAssetResponse, CreateAssetResponseBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'ok')
|
||||||
|
bool? get ok;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'fid')
|
||||||
|
String get fid;
|
||||||
|
|
||||||
|
CreateAssetResponse._();
|
||||||
|
|
||||||
|
factory CreateAssetResponse([void updates(CreateAssetResponseBuilder b)]) = _$CreateAssetResponse;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(CreateAssetResponseBuilder b) => b
|
||||||
|
..ok = true;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<CreateAssetResponse> get serializer => _$CreateAssetResponseSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$CreateAssetResponseSerializer implements PrimitiveSerializer<CreateAssetResponse> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [CreateAssetResponse, _$CreateAssetResponse];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'CreateAssetResponse';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
CreateAssetResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
if (object.ok != null) {
|
||||||
|
yield r'ok';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.ok,
|
||||||
|
specifiedType: const FullType(bool),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
yield r'fid';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.fid,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
CreateAssetResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required CreateAssetResponseBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'ok':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(bool),
|
||||||
|
) as bool;
|
||||||
|
result.ok = valueDes;
|
||||||
|
break;
|
||||||
|
case r'fid':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.fid = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
CreateAssetResponse deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = CreateAssetResponseBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
107
lib/src/model/create_asset_response.g.dart
Normal file
107
lib/src/model/create_asset_response.g.dart
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'create_asset_response.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$CreateAssetResponse extends CreateAssetResponse {
|
||||||
|
@override
|
||||||
|
final bool? ok;
|
||||||
|
@override
|
||||||
|
final String fid;
|
||||||
|
|
||||||
|
factory _$CreateAssetResponse(
|
||||||
|
[void Function(CreateAssetResponseBuilder)? updates]) =>
|
||||||
|
(new CreateAssetResponseBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$CreateAssetResponse._({this.ok, required this.fid}) : super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(fid, r'CreateAssetResponse', 'fid');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
CreateAssetResponse rebuild(
|
||||||
|
void Function(CreateAssetResponseBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
CreateAssetResponseBuilder toBuilder() =>
|
||||||
|
new CreateAssetResponseBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is CreateAssetResponse && ok == other.ok && fid == other.fid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, ok.hashCode);
|
||||||
|
_$hash = $jc(_$hash, fid.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'CreateAssetResponse')
|
||||||
|
..add('ok', ok)
|
||||||
|
..add('fid', fid))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CreateAssetResponseBuilder
|
||||||
|
implements Builder<CreateAssetResponse, CreateAssetResponseBuilder> {
|
||||||
|
_$CreateAssetResponse? _$v;
|
||||||
|
|
||||||
|
bool? _ok;
|
||||||
|
bool? get ok => _$this._ok;
|
||||||
|
set ok(bool? ok) => _$this._ok = ok;
|
||||||
|
|
||||||
|
String? _fid;
|
||||||
|
String? get fid => _$this._fid;
|
||||||
|
set fid(String? fid) => _$this._fid = fid;
|
||||||
|
|
||||||
|
CreateAssetResponseBuilder() {
|
||||||
|
CreateAssetResponse._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
CreateAssetResponseBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_ok = $v.ok;
|
||||||
|
_fid = $v.fid;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(CreateAssetResponse other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$CreateAssetResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(CreateAssetResponseBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
CreateAssetResponse build() => _build();
|
||||||
|
|
||||||
|
_$CreateAssetResponse _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$CreateAssetResponse._(
|
||||||
|
ok: ok,
|
||||||
|
fid: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
fid, r'CreateAssetResponse', 'fid'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
122
lib/src/model/create_user_definition.dart
Normal file
122
lib/src/model/create_user_definition.dart
Normal file
|
|
@ -0,0 +1,122 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'create_user_definition.g.dart';
|
||||||
|
|
||||||
|
/// CreateUserDefinition
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [username]
|
||||||
|
/// * [password]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class CreateUserDefinition implements Built<CreateUserDefinition, CreateUserDefinitionBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'username')
|
||||||
|
String get username;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'password')
|
||||||
|
String get password;
|
||||||
|
|
||||||
|
CreateUserDefinition._();
|
||||||
|
|
||||||
|
factory CreateUserDefinition([void updates(CreateUserDefinitionBuilder b)]) = _$CreateUserDefinition;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(CreateUserDefinitionBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<CreateUserDefinition> get serializer => _$CreateUserDefinitionSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$CreateUserDefinitionSerializer implements PrimitiveSerializer<CreateUserDefinition> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [CreateUserDefinition, _$CreateUserDefinition];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'CreateUserDefinition';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
CreateUserDefinition object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'username';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.username,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
yield r'password';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.password,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
CreateUserDefinition object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required CreateUserDefinitionBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'username':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.username = valueDes;
|
||||||
|
break;
|
||||||
|
case r'password':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.password = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
CreateUserDefinition deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = CreateUserDefinitionBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
114
lib/src/model/create_user_definition.g.dart
Normal file
114
lib/src/model/create_user_definition.g.dart
Normal file
|
|
@ -0,0 +1,114 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'create_user_definition.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$CreateUserDefinition extends CreateUserDefinition {
|
||||||
|
@override
|
||||||
|
final String username;
|
||||||
|
@override
|
||||||
|
final String password;
|
||||||
|
|
||||||
|
factory _$CreateUserDefinition(
|
||||||
|
[void Function(CreateUserDefinitionBuilder)? updates]) =>
|
||||||
|
(new CreateUserDefinitionBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$CreateUserDefinition._({required this.username, required this.password})
|
||||||
|
: super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
username, r'CreateUserDefinition', 'username');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
password, r'CreateUserDefinition', 'password');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
CreateUserDefinition rebuild(
|
||||||
|
void Function(CreateUserDefinitionBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
CreateUserDefinitionBuilder toBuilder() =>
|
||||||
|
new CreateUserDefinitionBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is CreateUserDefinition &&
|
||||||
|
username == other.username &&
|
||||||
|
password == other.password;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, username.hashCode);
|
||||||
|
_$hash = $jc(_$hash, password.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'CreateUserDefinition')
|
||||||
|
..add('username', username)
|
||||||
|
..add('password', password))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class CreateUserDefinitionBuilder
|
||||||
|
implements Builder<CreateUserDefinition, CreateUserDefinitionBuilder> {
|
||||||
|
_$CreateUserDefinition? _$v;
|
||||||
|
|
||||||
|
String? _username;
|
||||||
|
String? get username => _$this._username;
|
||||||
|
set username(String? username) => _$this._username = username;
|
||||||
|
|
||||||
|
String? _password;
|
||||||
|
String? get password => _$this._password;
|
||||||
|
set password(String? password) => _$this._password = password;
|
||||||
|
|
||||||
|
CreateUserDefinitionBuilder() {
|
||||||
|
CreateUserDefinition._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
CreateUserDefinitionBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_username = $v.username;
|
||||||
|
_password = $v.password;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(CreateUserDefinition other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$CreateUserDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(CreateUserDefinitionBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
CreateUserDefinition build() => _build();
|
||||||
|
|
||||||
|
_$CreateUserDefinition _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$CreateUserDefinition._(
|
||||||
|
username: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
username, r'CreateUserDefinition', 'username'),
|
||||||
|
password: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
password, r'CreateUserDefinition', 'password'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
70
lib/src/model/date.dart
Normal file
70
lib/src/model/date.dart
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
/// A gregorian calendar date generated by
|
||||||
|
/// OpenAPI generator to differentiate
|
||||||
|
/// between [DateTime] and [Date] formats.
|
||||||
|
class Date implements Comparable<Date> {
|
||||||
|
final int year;
|
||||||
|
|
||||||
|
/// January is 1.
|
||||||
|
final int month;
|
||||||
|
|
||||||
|
/// First day is 1.
|
||||||
|
final int day;
|
||||||
|
|
||||||
|
Date(this.year, this.month, this.day);
|
||||||
|
|
||||||
|
/// The current date
|
||||||
|
static Date now({bool utc = false}) {
|
||||||
|
var now = DateTime.now();
|
||||||
|
if (utc) {
|
||||||
|
now = now.toUtc();
|
||||||
|
}
|
||||||
|
return now.toDate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Convert to a [DateTime].
|
||||||
|
DateTime toDateTime({bool utc = false}) {
|
||||||
|
if (utc) {
|
||||||
|
return DateTime.utc(year, month, day);
|
||||||
|
} else {
|
||||||
|
return DateTime(year, month, day);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int compareTo(Date other) {
|
||||||
|
int d = year.compareTo(other.year);
|
||||||
|
if (d != 0) {
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
d = month.compareTo(other.month);
|
||||||
|
if (d != 0) {
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
return day.compareTo(other.day);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) =>
|
||||||
|
identical(this, other) ||
|
||||||
|
other is Date &&
|
||||||
|
runtimeType == other.runtimeType &&
|
||||||
|
year == other.year &&
|
||||||
|
month == other.month &&
|
||||||
|
day == other.day;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode => year.hashCode ^ month.hashCode ^ day.hashCode;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
final yyyy = year.toString();
|
||||||
|
final mm = month.toString().padLeft(2, '0');
|
||||||
|
final dd = day.toString().padLeft(2, '0');
|
||||||
|
|
||||||
|
return '$yyyy-$mm-$dd';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension DateTimeToDate on DateTime {
|
||||||
|
Date toDate() => Date(year, month, day);
|
||||||
|
}
|
||||||
106
lib/src/model/error_response.dart
Normal file
106
lib/src/model/error_response.dart
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'error_response.g.dart';
|
||||||
|
|
||||||
|
/// ErrorResponse
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [error]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class ErrorResponse implements Built<ErrorResponse, ErrorResponseBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'error')
|
||||||
|
String get error;
|
||||||
|
|
||||||
|
ErrorResponse._();
|
||||||
|
|
||||||
|
factory ErrorResponse([void updates(ErrorResponseBuilder b)]) = _$ErrorResponse;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(ErrorResponseBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<ErrorResponse> get serializer => _$ErrorResponseSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$ErrorResponseSerializer implements PrimitiveSerializer<ErrorResponse> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [ErrorResponse, _$ErrorResponse];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'ErrorResponse';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
ErrorResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'error';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.error,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
ErrorResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required ErrorResponseBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'error':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.error = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ErrorResponse deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = ErrorResponseBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
93
lib/src/model/error_response.g.dart
Normal file
93
lib/src/model/error_response.g.dart
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'error_response.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$ErrorResponse extends ErrorResponse {
|
||||||
|
@override
|
||||||
|
final String error;
|
||||||
|
|
||||||
|
factory _$ErrorResponse([void Function(ErrorResponseBuilder)? updates]) =>
|
||||||
|
(new ErrorResponseBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$ErrorResponse._({required this.error}) : super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(error, r'ErrorResponse', 'error');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ErrorResponse rebuild(void Function(ErrorResponseBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
ErrorResponseBuilder toBuilder() => new ErrorResponseBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is ErrorResponse && error == other.error;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, error.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'ErrorResponse')..add('error', error))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ErrorResponseBuilder
|
||||||
|
implements Builder<ErrorResponse, ErrorResponseBuilder> {
|
||||||
|
_$ErrorResponse? _$v;
|
||||||
|
|
||||||
|
String? _error;
|
||||||
|
String? get error => _$this._error;
|
||||||
|
set error(String? error) => _$this._error = error;
|
||||||
|
|
||||||
|
ErrorResponseBuilder() {
|
||||||
|
ErrorResponse._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ErrorResponseBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_error = $v.error;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(ErrorResponse other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$ErrorResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(ErrorResponseBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ErrorResponse build() => _build();
|
||||||
|
|
||||||
|
_$ErrorResponse _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$ErrorResponse._(
|
||||||
|
error: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
error, r'ErrorResponse', 'error'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
110
lib/src/model/http_validation_error.dart
Normal file
110
lib/src/model/http_validation_error.dart
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:tuuli_api/src/model/validation_error.dart';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'http_validation_error.g.dart';
|
||||||
|
|
||||||
|
/// HTTPValidationError
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [detail]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class HTTPValidationError implements Built<HTTPValidationError, HTTPValidationErrorBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'detail')
|
||||||
|
BuiltList<ValidationError>? get detail;
|
||||||
|
|
||||||
|
HTTPValidationError._();
|
||||||
|
|
||||||
|
factory HTTPValidationError([void updates(HTTPValidationErrorBuilder b)]) = _$HTTPValidationError;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(HTTPValidationErrorBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<HTTPValidationError> get serializer => _$HTTPValidationErrorSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$HTTPValidationErrorSerializer implements PrimitiveSerializer<HTTPValidationError> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [HTTPValidationError, _$HTTPValidationError];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'HTTPValidationError';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
HTTPValidationError object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
if (object.detail != null) {
|
||||||
|
yield r'detail';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.detail,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(ValidationError)]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
HTTPValidationError object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required HTTPValidationErrorBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'detail':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(ValidationError)]),
|
||||||
|
) as BuiltList<ValidationError>;
|
||||||
|
result.detail.replace(valueDes);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
HTTPValidationError deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = HTTPValidationErrorBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
106
lib/src/model/http_validation_error.g.dart
Normal file
106
lib/src/model/http_validation_error.g.dart
Normal file
|
|
@ -0,0 +1,106 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'http_validation_error.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$HTTPValidationError extends HTTPValidationError {
|
||||||
|
@override
|
||||||
|
final BuiltList<ValidationError>? detail;
|
||||||
|
|
||||||
|
factory _$HTTPValidationError(
|
||||||
|
[void Function(HTTPValidationErrorBuilder)? updates]) =>
|
||||||
|
(new HTTPValidationErrorBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$HTTPValidationError._({this.detail}) : super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
HTTPValidationError rebuild(
|
||||||
|
void Function(HTTPValidationErrorBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
HTTPValidationErrorBuilder toBuilder() =>
|
||||||
|
new HTTPValidationErrorBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is HTTPValidationError && detail == other.detail;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, detail.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'HTTPValidationError')
|
||||||
|
..add('detail', detail))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class HTTPValidationErrorBuilder
|
||||||
|
implements Builder<HTTPValidationError, HTTPValidationErrorBuilder> {
|
||||||
|
_$HTTPValidationError? _$v;
|
||||||
|
|
||||||
|
ListBuilder<ValidationError>? _detail;
|
||||||
|
ListBuilder<ValidationError> get detail =>
|
||||||
|
_$this._detail ??= new ListBuilder<ValidationError>();
|
||||||
|
set detail(ListBuilder<ValidationError>? detail) => _$this._detail = detail;
|
||||||
|
|
||||||
|
HTTPValidationErrorBuilder() {
|
||||||
|
HTTPValidationError._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
HTTPValidationErrorBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_detail = $v.detail?.toBuilder();
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(HTTPValidationError other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$HTTPValidationError;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(HTTPValidationErrorBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
HTTPValidationError build() => _build();
|
||||||
|
|
||||||
|
_$HTTPValidationError _build() {
|
||||||
|
_$HTTPValidationError _$result;
|
||||||
|
try {
|
||||||
|
_$result = _$v ?? new _$HTTPValidationError._(detail: _detail?.build());
|
||||||
|
} catch (_) {
|
||||||
|
late String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'detail';
|
||||||
|
_detail?.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
r'HTTPValidationError', _$failedField, e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
110
lib/src/model/items_field_selector_list.dart
Normal file
110
lib/src/model/items_field_selector_list.dart
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'items_field_selector_list.g.dart';
|
||||||
|
|
||||||
|
/// ItemsFieldSelectorList
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [fields]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class ItemsFieldSelectorList implements Built<ItemsFieldSelectorList, ItemsFieldSelectorListBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'fields')
|
||||||
|
BuiltList<String>? get fields;
|
||||||
|
|
||||||
|
ItemsFieldSelectorList._();
|
||||||
|
|
||||||
|
factory ItemsFieldSelectorList([void updates(ItemsFieldSelectorListBuilder b)]) = _$ItemsFieldSelectorList;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(ItemsFieldSelectorListBuilder b) => b
|
||||||
|
..fields = ListBuilder();
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<ItemsFieldSelectorList> get serializer => _$ItemsFieldSelectorListSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$ItemsFieldSelectorListSerializer implements PrimitiveSerializer<ItemsFieldSelectorList> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [ItemsFieldSelectorList, _$ItemsFieldSelectorList];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'ItemsFieldSelectorList';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
ItemsFieldSelectorList object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
if (object.fields != null) {
|
||||||
|
yield r'fields';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.fields,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
ItemsFieldSelectorList object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required ItemsFieldSelectorListBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'fields':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||||
|
) as BuiltList<String>;
|
||||||
|
result.fields.replace(valueDes);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ItemsFieldSelectorList deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = ItemsFieldSelectorListBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
107
lib/src/model/items_field_selector_list.g.dart
Normal file
107
lib/src/model/items_field_selector_list.g.dart
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'items_field_selector_list.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$ItemsFieldSelectorList extends ItemsFieldSelectorList {
|
||||||
|
@override
|
||||||
|
final BuiltList<String>? fields;
|
||||||
|
|
||||||
|
factory _$ItemsFieldSelectorList(
|
||||||
|
[void Function(ItemsFieldSelectorListBuilder)? updates]) =>
|
||||||
|
(new ItemsFieldSelectorListBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$ItemsFieldSelectorList._({this.fields}) : super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
ItemsFieldSelectorList rebuild(
|
||||||
|
void Function(ItemsFieldSelectorListBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
ItemsFieldSelectorListBuilder toBuilder() =>
|
||||||
|
new ItemsFieldSelectorListBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is ItemsFieldSelectorList && fields == other.fields;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, fields.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'ItemsFieldSelectorList')
|
||||||
|
..add('fields', fields))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ItemsFieldSelectorListBuilder
|
||||||
|
implements Builder<ItemsFieldSelectorList, ItemsFieldSelectorListBuilder> {
|
||||||
|
_$ItemsFieldSelectorList? _$v;
|
||||||
|
|
||||||
|
ListBuilder<String>? _fields;
|
||||||
|
ListBuilder<String> get fields =>
|
||||||
|
_$this._fields ??= new ListBuilder<String>();
|
||||||
|
set fields(ListBuilder<String>? fields) => _$this._fields = fields;
|
||||||
|
|
||||||
|
ItemsFieldSelectorListBuilder() {
|
||||||
|
ItemsFieldSelectorList._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemsFieldSelectorListBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_fields = $v.fields?.toBuilder();
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(ItemsFieldSelectorList other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$ItemsFieldSelectorList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(ItemsFieldSelectorListBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ItemsFieldSelectorList build() => _build();
|
||||||
|
|
||||||
|
_$ItemsFieldSelectorList _build() {
|
||||||
|
_$ItemsFieldSelectorList _$result;
|
||||||
|
try {
|
||||||
|
_$result =
|
||||||
|
_$v ?? new _$ItemsFieldSelectorList._(fields: _fields?.build());
|
||||||
|
} catch (_) {
|
||||||
|
late String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'fields';
|
||||||
|
_fields?.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
r'ItemsFieldSelectorList', _$failedField, e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
68
lib/src/model/location_inner.dart
Normal file
68
lib/src/model/location_inner.dart
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'dart:core';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
import 'package:one_of/any_of.dart';
|
||||||
|
|
||||||
|
part 'location_inner.g.dart';
|
||||||
|
|
||||||
|
/// LocationInner
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class LocationInner implements Built<LocationInner, LocationInnerBuilder> {
|
||||||
|
/// Any Of [String], [int]
|
||||||
|
AnyOf get anyOf;
|
||||||
|
|
||||||
|
LocationInner._();
|
||||||
|
|
||||||
|
factory LocationInner([void updates(LocationInnerBuilder b)]) = _$LocationInner;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(LocationInnerBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<LocationInner> get serializer => _$LocationInnerSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$LocationInnerSerializer implements PrimitiveSerializer<LocationInner> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [LocationInner, _$LocationInner];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'LocationInner';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
LocationInner object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
LocationInner object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final anyOf = object.anyOf;
|
||||||
|
return serializers.serialize(anyOf, specifiedType: FullType(AnyOf, anyOf.valueTypes.map((type) => FullType(type)).toList()))!;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
LocationInner deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = LocationInnerBuilder();
|
||||||
|
Object? anyOfDataSrc;
|
||||||
|
final targetType = const FullType(AnyOf, [FullType(String), FullType(int), ]);
|
||||||
|
anyOfDataSrc = serialized;
|
||||||
|
result.anyOf = serializers.deserialize(anyOfDataSrc, specifiedType: targetType) as AnyOf;
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
93
lib/src/model/location_inner.g.dart
Normal file
93
lib/src/model/location_inner.g.dart
Normal file
|
|
@ -0,0 +1,93 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'location_inner.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$LocationInner extends LocationInner {
|
||||||
|
@override
|
||||||
|
final AnyOf anyOf;
|
||||||
|
|
||||||
|
factory _$LocationInner([void Function(LocationInnerBuilder)? updates]) =>
|
||||||
|
(new LocationInnerBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$LocationInner._({required this.anyOf}) : super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(anyOf, r'LocationInner', 'anyOf');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
LocationInner rebuild(void Function(LocationInnerBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
LocationInnerBuilder toBuilder() => new LocationInnerBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is LocationInner && anyOf == other.anyOf;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, anyOf.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'LocationInner')..add('anyOf', anyOf))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LocationInnerBuilder
|
||||||
|
implements Builder<LocationInner, LocationInnerBuilder> {
|
||||||
|
_$LocationInner? _$v;
|
||||||
|
|
||||||
|
AnyOf? _anyOf;
|
||||||
|
AnyOf? get anyOf => _$this._anyOf;
|
||||||
|
set anyOf(AnyOf? anyOf) => _$this._anyOf = anyOf;
|
||||||
|
|
||||||
|
LocationInnerBuilder() {
|
||||||
|
LocationInner._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
LocationInnerBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_anyOf = $v.anyOf;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(LocationInner other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$LocationInner;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(LocationInnerBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
LocationInner build() => _build();
|
||||||
|
|
||||||
|
_$LocationInner _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$LocationInner._(
|
||||||
|
anyOf: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
anyOf, r'LocationInner', 'anyOf'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
109
lib/src/model/ok_response.dart
Normal file
109
lib/src/model/ok_response.dart
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'ok_response.g.dart';
|
||||||
|
|
||||||
|
/// OkResponse
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [ok]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class OkResponse implements Built<OkResponse, OkResponseBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'ok')
|
||||||
|
bool? get ok;
|
||||||
|
|
||||||
|
OkResponse._();
|
||||||
|
|
||||||
|
factory OkResponse([void updates(OkResponseBuilder b)]) = _$OkResponse;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(OkResponseBuilder b) => b
|
||||||
|
..ok = true;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<OkResponse> get serializer => _$OkResponseSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$OkResponseSerializer implements PrimitiveSerializer<OkResponse> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [OkResponse, _$OkResponse];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'OkResponse';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
OkResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
if (object.ok != null) {
|
||||||
|
yield r'ok';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.ok,
|
||||||
|
specifiedType: const FullType(bool),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
OkResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required OkResponseBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'ok':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(bool),
|
||||||
|
) as bool;
|
||||||
|
result.ok = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
OkResponse deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = OkResponseBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
87
lib/src/model/ok_response.g.dart
Normal file
87
lib/src/model/ok_response.g.dart
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'ok_response.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$OkResponse extends OkResponse {
|
||||||
|
@override
|
||||||
|
final bool? ok;
|
||||||
|
|
||||||
|
factory _$OkResponse([void Function(OkResponseBuilder)? updates]) =>
|
||||||
|
(new OkResponseBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$OkResponse._({this.ok}) : super._();
|
||||||
|
|
||||||
|
@override
|
||||||
|
OkResponse rebuild(void Function(OkResponseBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
OkResponseBuilder toBuilder() => new OkResponseBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is OkResponse && ok == other.ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, ok.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'OkResponse')..add('ok', ok))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OkResponseBuilder implements Builder<OkResponse, OkResponseBuilder> {
|
||||||
|
_$OkResponse? _$v;
|
||||||
|
|
||||||
|
bool? _ok;
|
||||||
|
bool? get ok => _$this._ok;
|
||||||
|
set ok(bool? ok) => _$this._ok = ok;
|
||||||
|
|
||||||
|
OkResponseBuilder() {
|
||||||
|
OkResponse._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
OkResponseBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_ok = $v.ok;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(OkResponse other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$OkResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(OkResponseBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
OkResponse build() => _build();
|
||||||
|
|
||||||
|
_$OkResponse _build() {
|
||||||
|
final _$result = _$v ?? new _$OkResponse._(ok: ok);
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
170
lib/src/model/table_definition.dart
Normal file
170
lib/src/model/table_definition.dart
Normal file
|
|
@ -0,0 +1,170 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'table_definition.g.dart';
|
||||||
|
|
||||||
|
/// TableDefinition
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [tableId]
|
||||||
|
/// * [tableName]
|
||||||
|
/// * [columns]
|
||||||
|
/// * [system]
|
||||||
|
/// * [hidden]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class TableDefinition implements Built<TableDefinition, TableDefinitionBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'table_id')
|
||||||
|
String get tableId;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'table_name')
|
||||||
|
String get tableName;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'columns')
|
||||||
|
String get columns;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'system')
|
||||||
|
bool get system;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'hidden')
|
||||||
|
bool get hidden;
|
||||||
|
|
||||||
|
TableDefinition._();
|
||||||
|
|
||||||
|
factory TableDefinition([void updates(TableDefinitionBuilder b)]) = _$TableDefinition;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(TableDefinitionBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<TableDefinition> get serializer => _$TableDefinitionSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$TableDefinitionSerializer implements PrimitiveSerializer<TableDefinition> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [TableDefinition, _$TableDefinition];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'TableDefinition';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
TableDefinition object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'table_id';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.tableId,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
yield r'table_name';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.tableName,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
yield r'columns';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.columns,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
yield r'system';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.system,
|
||||||
|
specifiedType: const FullType(bool),
|
||||||
|
);
|
||||||
|
yield r'hidden';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.hidden,
|
||||||
|
specifiedType: const FullType(bool),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
TableDefinition object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required TableDefinitionBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'table_id':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.tableId = valueDes;
|
||||||
|
break;
|
||||||
|
case r'table_name':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.tableName = valueDes;
|
||||||
|
break;
|
||||||
|
case r'columns':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.columns = valueDes;
|
||||||
|
break;
|
||||||
|
case r'system':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(bool),
|
||||||
|
) as bool;
|
||||||
|
result.system = valueDes;
|
||||||
|
break;
|
||||||
|
case r'hidden':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(bool),
|
||||||
|
) as bool;
|
||||||
|
result.hidden = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
TableDefinition deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = TableDefinitionBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
157
lib/src/model/table_definition.g.dart
Normal file
157
lib/src/model/table_definition.g.dart
Normal file
|
|
@ -0,0 +1,157 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'table_definition.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$TableDefinition extends TableDefinition {
|
||||||
|
@override
|
||||||
|
final String tableId;
|
||||||
|
@override
|
||||||
|
final String tableName;
|
||||||
|
@override
|
||||||
|
final String columns;
|
||||||
|
@override
|
||||||
|
final bool system;
|
||||||
|
@override
|
||||||
|
final bool hidden;
|
||||||
|
|
||||||
|
factory _$TableDefinition([void Function(TableDefinitionBuilder)? updates]) =>
|
||||||
|
(new TableDefinitionBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$TableDefinition._(
|
||||||
|
{required this.tableId,
|
||||||
|
required this.tableName,
|
||||||
|
required this.columns,
|
||||||
|
required this.system,
|
||||||
|
required this.hidden})
|
||||||
|
: super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
tableId, r'TableDefinition', 'tableId');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
tableName, r'TableDefinition', 'tableName');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
columns, r'TableDefinition', 'columns');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(system, r'TableDefinition', 'system');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(hidden, r'TableDefinition', 'hidden');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
TableDefinition rebuild(void Function(TableDefinitionBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
TableDefinitionBuilder toBuilder() =>
|
||||||
|
new TableDefinitionBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is TableDefinition &&
|
||||||
|
tableId == other.tableId &&
|
||||||
|
tableName == other.tableName &&
|
||||||
|
columns == other.columns &&
|
||||||
|
system == other.system &&
|
||||||
|
hidden == other.hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, tableId.hashCode);
|
||||||
|
_$hash = $jc(_$hash, tableName.hashCode);
|
||||||
|
_$hash = $jc(_$hash, columns.hashCode);
|
||||||
|
_$hash = $jc(_$hash, system.hashCode);
|
||||||
|
_$hash = $jc(_$hash, hidden.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'TableDefinition')
|
||||||
|
..add('tableId', tableId)
|
||||||
|
..add('tableName', tableName)
|
||||||
|
..add('columns', columns)
|
||||||
|
..add('system', system)
|
||||||
|
..add('hidden', hidden))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TableDefinitionBuilder
|
||||||
|
implements Builder<TableDefinition, TableDefinitionBuilder> {
|
||||||
|
_$TableDefinition? _$v;
|
||||||
|
|
||||||
|
String? _tableId;
|
||||||
|
String? get tableId => _$this._tableId;
|
||||||
|
set tableId(String? tableId) => _$this._tableId = tableId;
|
||||||
|
|
||||||
|
String? _tableName;
|
||||||
|
String? get tableName => _$this._tableName;
|
||||||
|
set tableName(String? tableName) => _$this._tableName = tableName;
|
||||||
|
|
||||||
|
String? _columns;
|
||||||
|
String? get columns => _$this._columns;
|
||||||
|
set columns(String? columns) => _$this._columns = columns;
|
||||||
|
|
||||||
|
bool? _system;
|
||||||
|
bool? get system => _$this._system;
|
||||||
|
set system(bool? system) => _$this._system = system;
|
||||||
|
|
||||||
|
bool? _hidden;
|
||||||
|
bool? get hidden => _$this._hidden;
|
||||||
|
set hidden(bool? hidden) => _$this._hidden = hidden;
|
||||||
|
|
||||||
|
TableDefinitionBuilder() {
|
||||||
|
TableDefinition._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
TableDefinitionBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_tableId = $v.tableId;
|
||||||
|
_tableName = $v.tableName;
|
||||||
|
_columns = $v.columns;
|
||||||
|
_system = $v.system;
|
||||||
|
_hidden = $v.hidden;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(TableDefinition other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$TableDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(TableDefinitionBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
TableDefinition build() => _build();
|
||||||
|
|
||||||
|
_$TableDefinition _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$TableDefinition._(
|
||||||
|
tableId: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
tableId, r'TableDefinition', 'tableId'),
|
||||||
|
tableName: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
tableName, r'TableDefinition', 'tableName'),
|
||||||
|
columns: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
columns, r'TableDefinition', 'columns'),
|
||||||
|
system: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
system, r'TableDefinition', 'system'),
|
||||||
|
hidden: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
hidden, r'TableDefinition', 'hidden'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
108
lib/src/model/table_items_response.dart
Normal file
108
lib/src/model/table_items_response.dart
Normal file
|
|
@ -0,0 +1,108 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:built_value/json_object.dart';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'table_items_response.g.dart';
|
||||||
|
|
||||||
|
/// TableItemsResponse
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [items]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class TableItemsResponse implements Built<TableItemsResponse, TableItemsResponseBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'items')
|
||||||
|
BuiltList<JsonObject> get items;
|
||||||
|
|
||||||
|
TableItemsResponse._();
|
||||||
|
|
||||||
|
factory TableItemsResponse([void updates(TableItemsResponseBuilder b)]) = _$TableItemsResponse;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(TableItemsResponseBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<TableItemsResponse> get serializer => _$TableItemsResponseSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$TableItemsResponseSerializer implements PrimitiveSerializer<TableItemsResponse> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [TableItemsResponse, _$TableItemsResponse];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'TableItemsResponse';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
TableItemsResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'items';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.items,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(JsonObject)]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
TableItemsResponse object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required TableItemsResponseBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'items':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(JsonObject)]),
|
||||||
|
) as BuiltList<JsonObject>;
|
||||||
|
result.items.replace(valueDes);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
TableItemsResponse deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = TableItemsResponseBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
109
lib/src/model/table_items_response.g.dart
Normal file
109
lib/src/model/table_items_response.g.dart
Normal file
|
|
@ -0,0 +1,109 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'table_items_response.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$TableItemsResponse extends TableItemsResponse {
|
||||||
|
@override
|
||||||
|
final BuiltList<JsonObject> items;
|
||||||
|
|
||||||
|
factory _$TableItemsResponse(
|
||||||
|
[void Function(TableItemsResponseBuilder)? updates]) =>
|
||||||
|
(new TableItemsResponseBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$TableItemsResponse._({required this.items}) : super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
items, r'TableItemsResponse', 'items');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
TableItemsResponse rebuild(
|
||||||
|
void Function(TableItemsResponseBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
TableItemsResponseBuilder toBuilder() =>
|
||||||
|
new TableItemsResponseBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is TableItemsResponse && items == other.items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, items.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'TableItemsResponse')
|
||||||
|
..add('items', items))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TableItemsResponseBuilder
|
||||||
|
implements Builder<TableItemsResponse, TableItemsResponseBuilder> {
|
||||||
|
_$TableItemsResponse? _$v;
|
||||||
|
|
||||||
|
ListBuilder<JsonObject>? _items;
|
||||||
|
ListBuilder<JsonObject> get items =>
|
||||||
|
_$this._items ??= new ListBuilder<JsonObject>();
|
||||||
|
set items(ListBuilder<JsonObject>? items) => _$this._items = items;
|
||||||
|
|
||||||
|
TableItemsResponseBuilder() {
|
||||||
|
TableItemsResponse._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
TableItemsResponseBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_items = $v.items.toBuilder();
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(TableItemsResponse other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$TableItemsResponse;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(TableItemsResponseBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
TableItemsResponse build() => _build();
|
||||||
|
|
||||||
|
_$TableItemsResponse _build() {
|
||||||
|
_$TableItemsResponse _$result;
|
||||||
|
try {
|
||||||
|
_$result = _$v ?? new _$TableItemsResponse._(items: items.build());
|
||||||
|
} catch (_) {
|
||||||
|
late String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'items';
|
||||||
|
items.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
r'TableItemsResponse', _$failedField, e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
138
lib/src/model/user_update_definition.dart
Normal file
138
lib/src/model/user_update_definition.dart
Normal file
|
|
@ -0,0 +1,138 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'user_update_definition.g.dart';
|
||||||
|
|
||||||
|
/// UserUpdateDefinition
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [userId]
|
||||||
|
/// * [password]
|
||||||
|
/// * [accessToken]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class UserUpdateDefinition implements Built<UserUpdateDefinition, UserUpdateDefinitionBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'user_id')
|
||||||
|
int get userId;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'password')
|
||||||
|
String get password;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'access_token')
|
||||||
|
String get accessToken;
|
||||||
|
|
||||||
|
UserUpdateDefinition._();
|
||||||
|
|
||||||
|
factory UserUpdateDefinition([void updates(UserUpdateDefinitionBuilder b)]) = _$UserUpdateDefinition;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(UserUpdateDefinitionBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<UserUpdateDefinition> get serializer => _$UserUpdateDefinitionSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$UserUpdateDefinitionSerializer implements PrimitiveSerializer<UserUpdateDefinition> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [UserUpdateDefinition, _$UserUpdateDefinition];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'UserUpdateDefinition';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
UserUpdateDefinition object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'user_id';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.userId,
|
||||||
|
specifiedType: const FullType(int),
|
||||||
|
);
|
||||||
|
yield r'password';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.password,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
yield r'access_token';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.accessToken,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
UserUpdateDefinition object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required UserUpdateDefinitionBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'user_id':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(int),
|
||||||
|
) as int;
|
||||||
|
result.userId = valueDes;
|
||||||
|
break;
|
||||||
|
case r'password':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.password = valueDes;
|
||||||
|
break;
|
||||||
|
case r'access_token':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.accessToken = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
UserUpdateDefinition deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = UserUpdateDefinitionBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
129
lib/src/model/user_update_definition.g.dart
Normal file
129
lib/src/model/user_update_definition.g.dart
Normal file
|
|
@ -0,0 +1,129 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'user_update_definition.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$UserUpdateDefinition extends UserUpdateDefinition {
|
||||||
|
@override
|
||||||
|
final int userId;
|
||||||
|
@override
|
||||||
|
final String password;
|
||||||
|
@override
|
||||||
|
final String accessToken;
|
||||||
|
|
||||||
|
factory _$UserUpdateDefinition(
|
||||||
|
[void Function(UserUpdateDefinitionBuilder)? updates]) =>
|
||||||
|
(new UserUpdateDefinitionBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$UserUpdateDefinition._(
|
||||||
|
{required this.userId, required this.password, required this.accessToken})
|
||||||
|
: super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
userId, r'UserUpdateDefinition', 'userId');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
password, r'UserUpdateDefinition', 'password');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
accessToken, r'UserUpdateDefinition', 'accessToken');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
UserUpdateDefinition rebuild(
|
||||||
|
void Function(UserUpdateDefinitionBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
UserUpdateDefinitionBuilder toBuilder() =>
|
||||||
|
new UserUpdateDefinitionBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is UserUpdateDefinition &&
|
||||||
|
userId == other.userId &&
|
||||||
|
password == other.password &&
|
||||||
|
accessToken == other.accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, userId.hashCode);
|
||||||
|
_$hash = $jc(_$hash, password.hashCode);
|
||||||
|
_$hash = $jc(_$hash, accessToken.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'UserUpdateDefinition')
|
||||||
|
..add('userId', userId)
|
||||||
|
..add('password', password)
|
||||||
|
..add('accessToken', accessToken))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserUpdateDefinitionBuilder
|
||||||
|
implements Builder<UserUpdateDefinition, UserUpdateDefinitionBuilder> {
|
||||||
|
_$UserUpdateDefinition? _$v;
|
||||||
|
|
||||||
|
int? _userId;
|
||||||
|
int? get userId => _$this._userId;
|
||||||
|
set userId(int? userId) => _$this._userId = userId;
|
||||||
|
|
||||||
|
String? _password;
|
||||||
|
String? get password => _$this._password;
|
||||||
|
set password(String? password) => _$this._password = password;
|
||||||
|
|
||||||
|
String? _accessToken;
|
||||||
|
String? get accessToken => _$this._accessToken;
|
||||||
|
set accessToken(String? accessToken) => _$this._accessToken = accessToken;
|
||||||
|
|
||||||
|
UserUpdateDefinitionBuilder() {
|
||||||
|
UserUpdateDefinition._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
UserUpdateDefinitionBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_userId = $v.userId;
|
||||||
|
_password = $v.password;
|
||||||
|
_accessToken = $v.accessToken;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(UserUpdateDefinition other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$UserUpdateDefinition;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(UserUpdateDefinitionBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
UserUpdateDefinition build() => _build();
|
||||||
|
|
||||||
|
_$UserUpdateDefinition _build() {
|
||||||
|
final _$result = _$v ??
|
||||||
|
new _$UserUpdateDefinition._(
|
||||||
|
userId: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
userId, r'UserUpdateDefinition', 'userId'),
|
||||||
|
password: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
password, r'UserUpdateDefinition', 'password'),
|
||||||
|
accessToken: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
accessToken, r'UserUpdateDefinition', 'accessToken'));
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
140
lib/src/model/validation_error.dart
Normal file
140
lib/src/model/validation_error.dart
Normal file
|
|
@ -0,0 +1,140 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_element
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:tuuli_api/src/model/location_inner.dart';
|
||||||
|
import 'package:built_value/built_value.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
|
||||||
|
part 'validation_error.g.dart';
|
||||||
|
|
||||||
|
/// ValidationError
|
||||||
|
///
|
||||||
|
/// Properties:
|
||||||
|
/// * [loc]
|
||||||
|
/// * [msg]
|
||||||
|
/// * [type]
|
||||||
|
@BuiltValue()
|
||||||
|
abstract class ValidationError implements Built<ValidationError, ValidationErrorBuilder> {
|
||||||
|
@BuiltValueField(wireName: r'loc')
|
||||||
|
BuiltList<LocationInner> get loc;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'msg')
|
||||||
|
String get msg;
|
||||||
|
|
||||||
|
@BuiltValueField(wireName: r'type')
|
||||||
|
String get type;
|
||||||
|
|
||||||
|
ValidationError._();
|
||||||
|
|
||||||
|
factory ValidationError([void updates(ValidationErrorBuilder b)]) = _$ValidationError;
|
||||||
|
|
||||||
|
@BuiltValueHook(initializeBuilder: true)
|
||||||
|
static void _defaults(ValidationErrorBuilder b) => b;
|
||||||
|
|
||||||
|
@BuiltValueSerializer(custom: true)
|
||||||
|
static Serializer<ValidationError> get serializer => _$ValidationErrorSerializer();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _$ValidationErrorSerializer implements PrimitiveSerializer<ValidationError> {
|
||||||
|
@override
|
||||||
|
final Iterable<Type> types = const [ValidationError, _$ValidationError];
|
||||||
|
|
||||||
|
@override
|
||||||
|
final String wireName = r'ValidationError';
|
||||||
|
|
||||||
|
Iterable<Object?> _serializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
ValidationError object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) sync* {
|
||||||
|
yield r'loc';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.loc,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(LocationInner)]),
|
||||||
|
);
|
||||||
|
yield r'msg';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.msg,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
yield r'type';
|
||||||
|
yield serializers.serialize(
|
||||||
|
object.type,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Object serialize(
|
||||||
|
Serializers serializers,
|
||||||
|
ValidationError object, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _deserializeProperties(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
required List<Object?> serializedList,
|
||||||
|
required ValidationErrorBuilder result,
|
||||||
|
required List<Object?> unhandled,
|
||||||
|
}) {
|
||||||
|
for (var i = 0; i < serializedList.length; i += 2) {
|
||||||
|
final key = serializedList[i] as String;
|
||||||
|
final value = serializedList[i + 1];
|
||||||
|
switch (key) {
|
||||||
|
case r'loc':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(BuiltList, [FullType(LocationInner)]),
|
||||||
|
) as BuiltList<LocationInner>;
|
||||||
|
result.loc.replace(valueDes);
|
||||||
|
break;
|
||||||
|
case r'msg':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.msg = valueDes;
|
||||||
|
break;
|
||||||
|
case r'type':
|
||||||
|
final valueDes = serializers.deserialize(
|
||||||
|
value,
|
||||||
|
specifiedType: const FullType(String),
|
||||||
|
) as String;
|
||||||
|
result.type = valueDes;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
unhandled.add(key);
|
||||||
|
unhandled.add(value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ValidationError deserialize(
|
||||||
|
Serializers serializers,
|
||||||
|
Object serialized, {
|
||||||
|
FullType specifiedType = FullType.unspecified,
|
||||||
|
}) {
|
||||||
|
final result = ValidationErrorBuilder();
|
||||||
|
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||||
|
final unhandled = <Object?>[];
|
||||||
|
_deserializeProperties(
|
||||||
|
serializers,
|
||||||
|
serialized,
|
||||||
|
specifiedType: specifiedType,
|
||||||
|
serializedList: serializedList,
|
||||||
|
unhandled: unhandled,
|
||||||
|
result: result,
|
||||||
|
);
|
||||||
|
return result.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
137
lib/src/model/validation_error.g.dart
Normal file
137
lib/src/model/validation_error.g.dart
Normal file
|
|
@ -0,0 +1,137 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'validation_error.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
class _$ValidationError extends ValidationError {
|
||||||
|
@override
|
||||||
|
final BuiltList<LocationInner> loc;
|
||||||
|
@override
|
||||||
|
final String msg;
|
||||||
|
@override
|
||||||
|
final String type;
|
||||||
|
|
||||||
|
factory _$ValidationError([void Function(ValidationErrorBuilder)? updates]) =>
|
||||||
|
(new ValidationErrorBuilder()..update(updates))._build();
|
||||||
|
|
||||||
|
_$ValidationError._(
|
||||||
|
{required this.loc, required this.msg, required this.type})
|
||||||
|
: super._() {
|
||||||
|
BuiltValueNullFieldError.checkNotNull(loc, r'ValidationError', 'loc');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(msg, r'ValidationError', 'msg');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(type, r'ValidationError', 'type');
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ValidationError rebuild(void Function(ValidationErrorBuilder) updates) =>
|
||||||
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
|
@override
|
||||||
|
ValidationErrorBuilder toBuilder() =>
|
||||||
|
new ValidationErrorBuilder()..replace(this);
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) {
|
||||||
|
if (identical(other, this)) return true;
|
||||||
|
return other is ValidationError &&
|
||||||
|
loc == other.loc &&
|
||||||
|
msg == other.msg &&
|
||||||
|
type == other.type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode {
|
||||||
|
var _$hash = 0;
|
||||||
|
_$hash = $jc(_$hash, loc.hashCode);
|
||||||
|
_$hash = $jc(_$hash, msg.hashCode);
|
||||||
|
_$hash = $jc(_$hash, type.hashCode);
|
||||||
|
_$hash = $jf(_$hash);
|
||||||
|
return _$hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() {
|
||||||
|
return (newBuiltValueToStringHelper(r'ValidationError')
|
||||||
|
..add('loc', loc)
|
||||||
|
..add('msg', msg)
|
||||||
|
..add('type', type))
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ValidationErrorBuilder
|
||||||
|
implements Builder<ValidationError, ValidationErrorBuilder> {
|
||||||
|
_$ValidationError? _$v;
|
||||||
|
|
||||||
|
ListBuilder<LocationInner>? _loc;
|
||||||
|
ListBuilder<LocationInner> get loc =>
|
||||||
|
_$this._loc ??= new ListBuilder<LocationInner>();
|
||||||
|
set loc(ListBuilder<LocationInner>? loc) => _$this._loc = loc;
|
||||||
|
|
||||||
|
String? _msg;
|
||||||
|
String? get msg => _$this._msg;
|
||||||
|
set msg(String? msg) => _$this._msg = msg;
|
||||||
|
|
||||||
|
String? _type;
|
||||||
|
String? get type => _$this._type;
|
||||||
|
set type(String? type) => _$this._type = type;
|
||||||
|
|
||||||
|
ValidationErrorBuilder() {
|
||||||
|
ValidationError._defaults(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
ValidationErrorBuilder get _$this {
|
||||||
|
final $v = _$v;
|
||||||
|
if ($v != null) {
|
||||||
|
_loc = $v.loc.toBuilder();
|
||||||
|
_msg = $v.msg;
|
||||||
|
_type = $v.type;
|
||||||
|
_$v = null;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void replace(ValidationError other) {
|
||||||
|
ArgumentError.checkNotNull(other, 'other');
|
||||||
|
_$v = other as _$ValidationError;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void update(void Function(ValidationErrorBuilder)? updates) {
|
||||||
|
if (updates != null) updates(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
ValidationError build() => _build();
|
||||||
|
|
||||||
|
_$ValidationError _build() {
|
||||||
|
_$ValidationError _$result;
|
||||||
|
try {
|
||||||
|
_$result = _$v ??
|
||||||
|
new _$ValidationError._(
|
||||||
|
loc: loc.build(),
|
||||||
|
msg: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
msg, r'ValidationError', 'msg'),
|
||||||
|
type: BuiltValueNullFieldError.checkNotNull(
|
||||||
|
type, r'ValidationError', 'type'));
|
||||||
|
} catch (_) {
|
||||||
|
late String _$failedField;
|
||||||
|
try {
|
||||||
|
_$failedField = 'loc';
|
||||||
|
loc.build();
|
||||||
|
} catch (e) {
|
||||||
|
throw new BuiltValueNestedFieldError(
|
||||||
|
r'ValidationError', _$failedField, e.toString());
|
||||||
|
}
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
replace(_$result);
|
||||||
|
return _$result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
72
lib/src/serializers.dart
Normal file
72
lib/src/serializers.dart
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
// ignore_for_file: unused_import
|
||||||
|
|
||||||
|
import 'package:one_of_serializer/any_of_serializer.dart';
|
||||||
|
import 'package:one_of_serializer/one_of_serializer.dart';
|
||||||
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
import 'package:built_value/json_object.dart';
|
||||||
|
import 'package:built_value/serializer.dart';
|
||||||
|
import 'package:built_value/standard_json_plugin.dart';
|
||||||
|
import 'package:built_value/iso_8601_date_time_serializer.dart';
|
||||||
|
import 'package:tuuli_api/src/date_serializer.dart';
|
||||||
|
import 'package:tuuli_api/src/model/date.dart';
|
||||||
|
|
||||||
|
import 'package:tuuli_api/src/model/access_token_response.dart';
|
||||||
|
import 'package:tuuli_api/src/model/auth_model.dart';
|
||||||
|
import 'package:tuuli_api/src/model/body_update_item_in_table_items_table_name_post.dart';
|
||||||
|
import 'package:tuuli_api/src/model/column_condition_compat.dart';
|
||||||
|
import 'package:tuuli_api/src/model/create_asset_response.dart';
|
||||||
|
import 'package:tuuli_api/src/model/create_user_definition.dart';
|
||||||
|
import 'package:tuuli_api/src/model/error_response.dart';
|
||||||
|
import 'package:tuuli_api/src/model/http_validation_error.dart';
|
||||||
|
import 'package:tuuli_api/src/model/items_field_selector_list.dart';
|
||||||
|
import 'package:tuuli_api/src/model/location_inner.dart';
|
||||||
|
import 'package:tuuli_api/src/model/ok_response.dart';
|
||||||
|
import 'package:tuuli_api/src/model/table_definition.dart';
|
||||||
|
import 'package:tuuli_api/src/model/table_items_response.dart';
|
||||||
|
import 'package:tuuli_api/src/model/user_update_definition.dart';
|
||||||
|
import 'package:tuuli_api/src/model/validation_error.dart';
|
||||||
|
|
||||||
|
part 'serializers.g.dart';
|
||||||
|
|
||||||
|
@SerializersFor([
|
||||||
|
AccessTokenResponse,
|
||||||
|
AuthModel,
|
||||||
|
BodyUpdateItemInTableItemsTableNamePost,
|
||||||
|
ColumnConditionCompat,
|
||||||
|
CreateAssetResponse,
|
||||||
|
CreateUserDefinition,
|
||||||
|
ErrorResponse,
|
||||||
|
HTTPValidationError,
|
||||||
|
ItemsFieldSelectorList,
|
||||||
|
LocationInner,
|
||||||
|
OkResponse,
|
||||||
|
TableDefinition,
|
||||||
|
TableItemsResponse,
|
||||||
|
UserUpdateDefinition,
|
||||||
|
ValidationError,
|
||||||
|
])
|
||||||
|
Serializers serializers = (_$serializers.toBuilder()
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, [FullType(ColumnConditionCompat)]),
|
||||||
|
() => ListBuilder<ColumnConditionCompat>(),
|
||||||
|
)
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, [FullType(String)]),
|
||||||
|
() => ListBuilder<String>(),
|
||||||
|
)
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, [FullType(TableDefinition)]),
|
||||||
|
() => ListBuilder<TableDefinition>(),
|
||||||
|
)
|
||||||
|
..add(const OneOfSerializer())
|
||||||
|
..add(const AnyOfSerializer())
|
||||||
|
..add(const DateSerializer())
|
||||||
|
..add(Iso8601DateTimeSerializer()))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
Serializers standardSerializers =
|
||||||
|
(serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build();
|
||||||
48
lib/src/serializers.g.dart
Normal file
48
lib/src/serializers.g.dart
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'serializers.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// BuiltValueGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
|
..add(AccessTokenResponse.serializer)
|
||||||
|
..add(AuthModel.serializer)
|
||||||
|
..add(BodyUpdateItemInTableItemsTableNamePost.serializer)
|
||||||
|
..add(ColumnConditionCompat.serializer)
|
||||||
|
..add(ColumnConditionCompatOperator_Enum.serializer)
|
||||||
|
..add(CreateAssetResponse.serializer)
|
||||||
|
..add(CreateUserDefinition.serializer)
|
||||||
|
..add(ErrorResponse.serializer)
|
||||||
|
..add(HTTPValidationError.serializer)
|
||||||
|
..add(ItemsFieldSelectorList.serializer)
|
||||||
|
..add(LocationInner.serializer)
|
||||||
|
..add(OkResponse.serializer)
|
||||||
|
..add(TableDefinition.serializer)
|
||||||
|
..add(TableItemsResponse.serializer)
|
||||||
|
..add(UserUpdateDefinition.serializer)
|
||||||
|
..add(ValidationError.serializer)
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(JsonObject)]),
|
||||||
|
() => new ListBuilder<JsonObject>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(LocationInner)]),
|
||||||
|
() => new ListBuilder<LocationInner>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(String)]),
|
||||||
|
() => new ListBuilder<String>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(ValidationError)]),
|
||||||
|
() => new ListBuilder<ValidationError>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(
|
||||||
|
BuiltMap, const [const FullType(String), const FullType(String)]),
|
||||||
|
() => new MapBuilder<String, String>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(
|
||||||
|
BuiltMap, const [const FullType(String), const FullType(String)]),
|
||||||
|
() => new MapBuilder<String, String>()))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||||
28
lib/tuuli_api.dart
Normal file
28
lib/tuuli_api.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
|
||||||
|
export 'package:tuuli_api/src/api.dart';
|
||||||
|
export 'package:tuuli_api/src/auth/api_key_auth.dart';
|
||||||
|
export 'package:tuuli_api/src/auth/basic_auth.dart';
|
||||||
|
export 'package:tuuli_api/src/auth/oauth.dart';
|
||||||
|
export 'package:tuuli_api/src/serializers.dart';
|
||||||
|
export 'package:tuuli_api/src/model/date.dart';
|
||||||
|
|
||||||
|
export 'package:tuuli_api/src/api/default_api.dart';
|
||||||
|
|
||||||
|
export 'package:tuuli_api/src/model/access_token_response.dart';
|
||||||
|
export 'package:tuuli_api/src/model/auth_model.dart';
|
||||||
|
export 'package:tuuli_api/src/model/body_update_item_in_table_items_table_name_post.dart';
|
||||||
|
export 'package:tuuli_api/src/model/column_condition_compat.dart';
|
||||||
|
export 'package:tuuli_api/src/model/create_asset_response.dart';
|
||||||
|
export 'package:tuuli_api/src/model/create_user_definition.dart';
|
||||||
|
export 'package:tuuli_api/src/model/error_response.dart';
|
||||||
|
export 'package:tuuli_api/src/model/http_validation_error.dart';
|
||||||
|
export 'package:tuuli_api/src/model/items_field_selector_list.dart';
|
||||||
|
export 'package:tuuli_api/src/model/location_inner.dart';
|
||||||
|
export 'package:tuuli_api/src/model/ok_response.dart';
|
||||||
|
export 'package:tuuli_api/src/model/table_definition.dart';
|
||||||
|
export 'package:tuuli_api/src/model/table_items_response.dart';
|
||||||
|
export 'package:tuuli_api/src/model/user_update_definition.dart';
|
||||||
|
export 'package:tuuli_api/src/model/validation_error.dart';
|
||||||
19
pubspec.yaml
Normal file
19
pubspec.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
name: tuuli_api
|
||||||
|
version: 1.0.0
|
||||||
|
description: OpenAPI API client
|
||||||
|
homepage: homepage
|
||||||
|
|
||||||
|
environment:
|
||||||
|
sdk: '>=2.15.0 <3.0.0'
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
dio: '^5.0.0'
|
||||||
|
one_of: '>=1.5.0 <2.0.0'
|
||||||
|
one_of_serializer: '>=1.5.0 <2.0.0'
|
||||||
|
built_value: '>=8.4.0 <9.0.0'
|
||||||
|
built_collection: '>=5.1.1 <6.0.0'
|
||||||
|
|
||||||
|
dev_dependencies:
|
||||||
|
built_value_generator: '>=8.4.0 <9.0.0'
|
||||||
|
build_runner: any
|
||||||
|
test: ^1.16.0
|
||||||
16
test/access_token_response_test.dart
Normal file
16
test/access_token_response_test.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for AccessTokenResponse
|
||||||
|
void main() {
|
||||||
|
final instance = AccessTokenResponseBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(AccessTokenResponse, () {
|
||||||
|
// String accessToken
|
||||||
|
test('to test the property `accessToken`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
21
test/auth_model_test.dart
Normal file
21
test/auth_model_test.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for AuthModel
|
||||||
|
void main() {
|
||||||
|
final instance = AuthModelBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(AuthModel, () {
|
||||||
|
// String username
|
||||||
|
test('to test the property `username`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String password
|
||||||
|
test('to test the property `password`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for BodyUpdateItemInTableItemsTableNamePost
|
||||||
|
void main() {
|
||||||
|
final instance = BodyUpdateItemInTableItemsTableNamePostBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(BodyUpdateItemInTableItemsTableNamePost, () {
|
||||||
|
// BuiltMap<String, String> item
|
||||||
|
test('to test the property `item`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// BuiltMap<String, String> oldItem
|
||||||
|
test('to test the property `oldItem`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
26
test/column_condition_compat_test.dart
Normal file
26
test/column_condition_compat_test.dart
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for ColumnConditionCompat
|
||||||
|
void main() {
|
||||||
|
final instance = ColumnConditionCompatBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(ColumnConditionCompat, () {
|
||||||
|
// String column
|
||||||
|
test('to test the property `column`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String operator_
|
||||||
|
test('to test the property `operator_`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// JsonObject value
|
||||||
|
test('to test the property `value`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
21
test/create_asset_response_test.dart
Normal file
21
test/create_asset_response_test.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for CreateAssetResponse
|
||||||
|
void main() {
|
||||||
|
final instance = CreateAssetResponseBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(CreateAssetResponse, () {
|
||||||
|
// bool ok (default value: true)
|
||||||
|
test('to test the property `ok`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String fid
|
||||||
|
test('to test the property `fid`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
21
test/create_user_definition_test.dart
Normal file
21
test/create_user_definition_test.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for CreateUserDefinition
|
||||||
|
void main() {
|
||||||
|
final instance = CreateUserDefinitionBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(CreateUserDefinition, () {
|
||||||
|
// String username
|
||||||
|
test('to test the property `username`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String password
|
||||||
|
test('to test the property `password`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
118
test/default_api_test.dart
Normal file
118
test/default_api_test.dart
Normal file
|
|
@ -0,0 +1,118 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
|
||||||
|
/// tests for DefaultApi
|
||||||
|
void main() {
|
||||||
|
final instance = TuuliApi().getDefaultApi();
|
||||||
|
|
||||||
|
group(DefaultApi, () {
|
||||||
|
// Create Item
|
||||||
|
//
|
||||||
|
//Future<OkResponse> createItemItemsTableNamePost(String tableName, JsonObject body, { String accessToken }) async
|
||||||
|
test('test createItemItemsTableNamePost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create Table
|
||||||
|
//
|
||||||
|
// Parameter `columns` should be a list of strings Each string should be in a following format: `column_name:column_type[:column_options]` Where *column_type* should be one of the following: - serial - str - bool - datetime - float - int - int:asset - int:user Also *column_options* can be one of the following: - unique - default Example: ```json [ \"id:serial:primary\", \"name:str:unique\", \"description:str\", \"is_active:bool\", \"price:float\", \"quantity:int\", \"creator_id:int:user\", \"asset_id:int:asset\" ] ``` Notes: 1. you cannot use *unique* and *default* at the same time 2. in current implementation you cannot use *default*, because there is no way to specify default value
|
||||||
|
//
|
||||||
|
//Future<OkResponse> createTableApiCreateTableTableNamePost(String tableName, BuiltList<String> requestBody, { String accessToken }) async
|
||||||
|
test('test createTableApiCreateTableTableNamePost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create User
|
||||||
|
//
|
||||||
|
//Future<OkResponse> createUserApiUsersPost(CreateUserDefinition createUserDefinition, { String accessToken }) async
|
||||||
|
test('test createUserApiUsersPost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Delete Item From Table
|
||||||
|
//
|
||||||
|
//Future<OkResponse> deleteItemFromTableItemsTableNamePost(String tableName, BuiltList<ColumnConditionCompat> columnConditionCompat, { String accessToken }) async
|
||||||
|
test('test deleteItemFromTableItemsTableNamePost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Drop Table
|
||||||
|
//
|
||||||
|
//Future<OkResponse> dropTableApiDropTableTableNamePost(String tableName, { String accessToken }) async
|
||||||
|
test('test dropTableApiDropTableTableNamePost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Get Access Token
|
||||||
|
//
|
||||||
|
//Future<AccessTokenResponse> getAccessTokenApiGetAccessTokenPost(AuthModel authModel) async
|
||||||
|
test('test getAccessTokenApiGetAccessTokenPost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Get Asset
|
||||||
|
//
|
||||||
|
//Future<JsonObject> getAssetAssetsFidGet(String fid) async
|
||||||
|
test('test getAssetAssetsFidGet', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Get Items From Table
|
||||||
|
//
|
||||||
|
//Future<TableItemsResponse> getItemsFromTableItemsTableNamePost(String tableName, ItemsFieldSelectorList itemsFieldSelectorList, { String accessToken }) async
|
||||||
|
test('test getItemsFromTableItemsTableNamePost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// List Tables
|
||||||
|
//
|
||||||
|
//Future<BuiltList<TableDefinition>> listTablesApiListTablesGet({ String accessToken }) async
|
||||||
|
test('test listTablesApiListTablesGet', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Put Asset
|
||||||
|
//
|
||||||
|
//Future<CreateAssetResponse> putAssetAssetsPost(MultipartFile asset, { String accessToken }) async
|
||||||
|
test('test putAssetAssetsPost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Remove Asset
|
||||||
|
//
|
||||||
|
//Future<OkResponse> removeAssetAssetsAssetIdPost(int assetId, { bool checkReferences, bool deleteReferencing, String accessToken }) async
|
||||||
|
test('test removeAssetAssetsAssetIdPost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Remove User
|
||||||
|
//
|
||||||
|
//Future<OkResponse> removeUserApiUsersPost(int userId, { String accessToken }) async
|
||||||
|
test('test removeUserApiUsersPost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update Asset Description
|
||||||
|
//
|
||||||
|
//Future<OkResponse> updateAssetDescriptionAssetsAssetIdPost(int assetId, String assetDescription, { String accessToken }) async
|
||||||
|
test('test updateAssetDescriptionAssetsAssetIdPost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update Item In Table
|
||||||
|
//
|
||||||
|
//Future<OkResponse> updateItemInTableItemsTableNamePost(String tableName, BodyUpdateItemInTableItemsTableNamePost bodyUpdateItemInTableItemsTableNamePost, { String accessToken }) async
|
||||||
|
test('test updateItemInTableItemsTableNamePost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// Update User
|
||||||
|
//
|
||||||
|
//Future<OkResponse> updateUserApiUsersPost(UserUpdateDefinition userUpdateDefinition, { String accessToken }) async
|
||||||
|
test('test updateUserApiUsersPost', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
16
test/error_response_test.dart
Normal file
16
test/error_response_test.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for ErrorResponse
|
||||||
|
void main() {
|
||||||
|
final instance = ErrorResponseBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(ErrorResponse, () {
|
||||||
|
// String error
|
||||||
|
test('to test the property `error`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
16
test/http_validation_error_test.dart
Normal file
16
test/http_validation_error_test.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for HTTPValidationError
|
||||||
|
void main() {
|
||||||
|
final instance = HTTPValidationErrorBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(HTTPValidationError, () {
|
||||||
|
// BuiltList<ValidationError> detail
|
||||||
|
test('to test the property `detail`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
16
test/items_field_selector_list_test.dart
Normal file
16
test/items_field_selector_list_test.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for ItemsFieldSelectorList
|
||||||
|
void main() {
|
||||||
|
final instance = ItemsFieldSelectorListBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(ItemsFieldSelectorList, () {
|
||||||
|
// BuiltList<String> fields (default value: ListBuilder())
|
||||||
|
test('to test the property `fields`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
11
test/location_inner_test.dart
Normal file
11
test/location_inner_test.dart
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for LocationInner
|
||||||
|
void main() {
|
||||||
|
final instance = LocationInnerBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(LocationInner, () {
|
||||||
|
});
|
||||||
|
}
|
||||||
16
test/ok_response_test.dart
Normal file
16
test/ok_response_test.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for OkResponse
|
||||||
|
void main() {
|
||||||
|
final instance = OkResponseBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(OkResponse, () {
|
||||||
|
// bool ok (default value: true)
|
||||||
|
test('to test the property `ok`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
36
test/table_definition_test.dart
Normal file
36
test/table_definition_test.dart
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for TableDefinition
|
||||||
|
void main() {
|
||||||
|
final instance = TableDefinitionBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(TableDefinition, () {
|
||||||
|
// String tableId
|
||||||
|
test('to test the property `tableId`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String tableName
|
||||||
|
test('to test the property `tableName`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String columns
|
||||||
|
test('to test the property `columns`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// bool system
|
||||||
|
test('to test the property `system`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// bool hidden
|
||||||
|
test('to test the property `hidden`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
16
test/table_items_response_test.dart
Normal file
16
test/table_items_response_test.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for TableItemsResponse
|
||||||
|
void main() {
|
||||||
|
final instance = TableItemsResponseBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(TableItemsResponse, () {
|
||||||
|
// BuiltList<JsonObject> items
|
||||||
|
test('to test the property `items`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
26
test/user_update_definition_test.dart
Normal file
26
test/user_update_definition_test.dart
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for UserUpdateDefinition
|
||||||
|
void main() {
|
||||||
|
final instance = UserUpdateDefinitionBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(UserUpdateDefinition, () {
|
||||||
|
// int userId
|
||||||
|
test('to test the property `userId`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String password
|
||||||
|
test('to test the property `password`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String accessToken
|
||||||
|
test('to test the property `accessToken`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
26
test/validation_error_test.dart
Normal file
26
test/validation_error_test.dart
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
import 'package:tuuli_api/tuuli_api.dart';
|
||||||
|
|
||||||
|
// tests for ValidationError
|
||||||
|
void main() {
|
||||||
|
final instance = ValidationErrorBuilder();
|
||||||
|
// TODO add properties to the builder and call build()
|
||||||
|
|
||||||
|
group(ValidationError, () {
|
||||||
|
// BuiltList<LocationInner> loc
|
||||||
|
test('to test the property `loc`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String msg
|
||||||
|
test('to test the property `msg`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
// String type
|
||||||
|
test('to test the property `type`', () async {
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue