Switching to autogenerated client for TuuliAPI
This commit is contained in:
parent
45be2c80ff
commit
a63f6b02a6
50 changed files with 5992 additions and 598 deletions
|
|
@ -1,395 +0,0 @@
|
|||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tuuli_app/api/model/access_token_model.dart';
|
||||
import 'package:http/browser_client.dart';
|
||||
import 'package:http/http.dart';
|
||||
import 'package:tuuli_app/api/model/table_field_model.dart';
|
||||
import 'package:tuuli_app/api/model/tables_list_model.dart';
|
||||
import 'package:tuuli_app/api/model/user_model.dart';
|
||||
|
||||
class ErrorOrData<T> {
|
||||
final T? data;
|
||||
final Exception? error;
|
||||
|
||||
ErrorOrData(this.data, this.error);
|
||||
|
||||
void unfold(
|
||||
void Function(T data) onData, void Function(Exception error) onError) {
|
||||
if (data != null) {
|
||||
onData(data as T);
|
||||
} else {
|
||||
onError(error!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
typedef FutureErrorOrData<T> = Future<ErrorOrData<T>>;
|
||||
typedef TableItemsData = Map<String, dynamic>;
|
||||
typedef TableItemsDataList = List<TableItemsData>;
|
||||
|
||||
class ApiClient {
|
||||
final BrowserClient _client = BrowserClient();
|
||||
var _accessToken = '';
|
||||
|
||||
final Uri baseUrl;
|
||||
|
||||
ApiClient(this.baseUrl);
|
||||
|
||||
ApiClient.fromString(String baseUrl) : this(Uri.parse(baseUrl));
|
||||
|
||||
void setAccessToken(String accessToken) {
|
||||
_accessToken = accessToken;
|
||||
}
|
||||
|
||||
FutureErrorOrData<AccessTokenModel> login(
|
||||
String username,
|
||||
String password,
|
||||
) async {
|
||||
AccessTokenModel? data;
|
||||
Exception? error;
|
||||
|
||||
final response = await post('/api/getAccessToken', body: {
|
||||
'username': username,
|
||||
'password': password,
|
||||
}, headers: {
|
||||
'Content-Type': 'application/json',
|
||||
});
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else if (body['access_token'] == null) {
|
||||
error = Exception('No access token');
|
||||
} else {
|
||||
data = AccessTokenModel(accessToken: body['access_token']);
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(data, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<TablesListModel> tablesList() async {
|
||||
TablesListModel? data;
|
||||
Exception? error;
|
||||
|
||||
final response = await get('/api/listTables');
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else if (body['tables'] == null) {
|
||||
error = Exception('Server error');
|
||||
} else {
|
||||
data = TablesListModel.fromJson(body);
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(data, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<bool> createTable(
|
||||
String tableName, List<TableField> columns) async {
|
||||
bool? ignored;
|
||||
Exception? error;
|
||||
|
||||
final response =
|
||||
await post('/api/createTable/${Uri.encodeComponent(tableName)}', body: {
|
||||
'columns':
|
||||
columns.map((e) => e.toColumnDefinition()).toList(growable: false),
|
||||
}, headers: {
|
||||
'Content-Type': 'application/json',
|
||||
});
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else {
|
||||
ignored = true;
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(ignored, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<bool> dropTable(String tableName) async {
|
||||
bool? ignored;
|
||||
Exception? error;
|
||||
|
||||
final response =
|
||||
await post('/api/dropTable/${Uri.encodeComponent(tableName)}');
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else {
|
||||
ignored = true;
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(ignored, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<TableItemsDataList> getTableItems(TableModel table) async {
|
||||
TableItemsDataList? data;
|
||||
Exception? error;
|
||||
|
||||
final response = await post(
|
||||
'/items/${Uri.encodeComponent(table.tableName)}',
|
||||
body: {
|
||||
"fields": ["*"]
|
||||
},
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString())
|
||||
as Map<String, dynamic>;
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else if (body['items'] == null) {
|
||||
error = Exception('Server error');
|
||||
} else {
|
||||
data = (body['items'] as List)
|
||||
.map((e) => e as TableItemsData)
|
||||
.toList(growable: false);
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(data, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<bool> insertItem(
|
||||
TableModel table, TableItemsData newItem) async {
|
||||
bool? ignored;
|
||||
Exception? error;
|
||||
|
||||
final response = await post(
|
||||
'/items/${Uri.encodeComponent(table.tableName)}/+',
|
||||
body: newItem.map((key, value) =>
|
||||
MapEntry(key, value is DateTime ? value.toIso8601String() : value)),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else {
|
||||
ignored = true;
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(ignored, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<bool> updateItem(
|
||||
TableModel table, TableItemsData newItem, TableItemsData oldItem) async {
|
||||
bool? ignored;
|
||||
Exception? error;
|
||||
|
||||
final response = await post(
|
||||
'/items/${Uri.encodeComponent(table.tableName)}/*',
|
||||
body: {
|
||||
"item": newItem.map((key, value) =>
|
||||
MapEntry(key, value is DateTime ? value.toIso8601String() : value)),
|
||||
"oldItem": oldItem.map((key, value) =>
|
||||
MapEntry(key, value is DateTime ? value.toIso8601String() : value)),
|
||||
},
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else {
|
||||
ignored = true;
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(ignored, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<bool> deleteItem(TableModel table, TableItemsData e) async {
|
||||
bool? ignored;
|
||||
Exception? error;
|
||||
|
||||
TableField? primaryField =
|
||||
table.columns.firstWhereOrNull((el) => el.isPrimary);
|
||||
TableField? uniqueField =
|
||||
table.columns.firstWhereOrNull((el) => el.isUnique);
|
||||
|
||||
final response = await post(
|
||||
'/items/${Uri.encodeComponent(table.tableName)}/-',
|
||||
body: {
|
||||
"defs": [
|
||||
if (primaryField != null)
|
||||
{
|
||||
"name": primaryField.fieldName,
|
||||
"value": e[primaryField.fieldName],
|
||||
}
|
||||
else if (uniqueField != null)
|
||||
{
|
||||
"name": uniqueField.fieldName,
|
||||
"value": e[uniqueField.fieldName],
|
||||
}
|
||||
else
|
||||
for (final field in table.columns)
|
||||
{
|
||||
"name": field.fieldName,
|
||||
"value": e[field.fieldName],
|
||||
}
|
||||
],
|
||||
},
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else {
|
||||
ignored = true;
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(ignored, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<bool> createUser(
|
||||
TableModel table, String username, String password) async {
|
||||
bool? ignored;
|
||||
Exception? error;
|
||||
|
||||
final response = await post(
|
||||
'/api/createUser',
|
||||
body: {
|
||||
"username": username,
|
||||
"password": password,
|
||||
},
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else {
|
||||
ignored = true;
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(ignored, error);
|
||||
}
|
||||
|
||||
FutureErrorOrData<bool> updateUser(
|
||||
TableModel table, int userId, String password, String accessToken) async {
|
||||
bool? ignored;
|
||||
Exception? error;
|
||||
|
||||
final response = await post(
|
||||
'/api/updateUser',
|
||||
body: {
|
||||
"user_id": userId,
|
||||
"password": password,
|
||||
"access_token": accessToken,
|
||||
},
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
);
|
||||
if (response.statusCode == 200) {
|
||||
final body = json.decode(await response.stream.bytesToString());
|
||||
if (body['error'] != null) {
|
||||
error = Exception(body['error']);
|
||||
} else {
|
||||
ignored = true;
|
||||
}
|
||||
} else if (response.statusCode == 422) {
|
||||
error = Exception('Invalid request parameters');
|
||||
} else {
|
||||
error = Exception('HTTP ${response.statusCode}');
|
||||
}
|
||||
|
||||
return ErrorOrData(ignored, error);
|
||||
}
|
||||
|
||||
// REGION: HTTP Methods implementation
|
||||
|
||||
Future<StreamedResponse> get(
|
||||
String path, {
|
||||
Map<String, String>? headers,
|
||||
}) {
|
||||
return _request(path, 'GET', headers: headers);
|
||||
}
|
||||
|
||||
Future<StreamedResponse> post(
|
||||
String path, {
|
||||
Map<String, String>? headers,
|
||||
dynamic body,
|
||||
}) {
|
||||
return _request(path, 'POST', headers: headers, body: body);
|
||||
}
|
||||
|
||||
Future<StreamedResponse> _request(
|
||||
String path,
|
||||
String method, {
|
||||
Map<String, String>? headers,
|
||||
dynamic body,
|
||||
}) async {
|
||||
final uri = baseUrl.resolve(path);
|
||||
final request = Request(method, uri);
|
||||
if (headers != null) {
|
||||
request.headers.addAll(headers);
|
||||
}
|
||||
if (_accessToken.isNotEmpty) {
|
||||
request.headers["Access-Token"] = _accessToken;
|
||||
}
|
||||
if (body != null) {
|
||||
request.body = json.encode(body);
|
||||
}
|
||||
return _client.send(request);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
class AccessTokenModel {
|
||||
final String accessToken;
|
||||
|
||||
const AccessTokenModel({
|
||||
required this.accessToken,
|
||||
});
|
||||
}
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
import 'package:uuid/uuid.dart';
|
||||
|
||||
typedef SerialTableField = TableField<int>;
|
||||
typedef UUIDTableField = TableField<UuidValue>;
|
||||
typedef StringTableField = TableField<String>;
|
||||
typedef BigIntTableField = TableField<BigInt>;
|
||||
typedef BoolTableField = TableField<bool>;
|
||||
typedef DateTableField = TableField<DateTime>;
|
||||
typedef DateTimeTableField = TableField<DateTime>;
|
||||
typedef FloatTableField = TableField<double>;
|
||||
typedef IntTableField = TableField<int>;
|
||||
|
||||
final possibleFieldTypes = {
|
||||
"serial": SerialTableField,
|
||||
"uuid": UUIDTableField,
|
||||
"str": StringTableField,
|
||||
"bigint": BigIntTableField,
|
||||
"bool": BoolTableField,
|
||||
"date": DateTableField,
|
||||
"datetime": DateTimeTableField,
|
||||
"float": FloatTableField,
|
||||
"int": IntTableField,
|
||||
};
|
||||
|
||||
class TableField<T> {
|
||||
final String fieldName;
|
||||
final String fieldType;
|
||||
final bool isUnique;
|
||||
final bool isPrimary;
|
||||
final Type type = T;
|
||||
|
||||
TableField({
|
||||
required this.fieldName,
|
||||
required this.fieldType,
|
||||
required this.isUnique,
|
||||
required this.isPrimary,
|
||||
});
|
||||
|
||||
bool canBePrimary() {
|
||||
return fieldType == "serial" || fieldType == "uuid";
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return "TableField<$T>(fieldName: $fieldName, fieldType: $fieldType, isUnique: $isUnique, isPrimary: $isPrimary)";
|
||||
}
|
||||
|
||||
String toColumnDefinition() {
|
||||
return "$fieldName:$fieldType${isPrimary ? ":primary" : ""}${isUnique ? ":unique" : ""}";
|
||||
}
|
||||
|
||||
static TableField parseTableField(String definition) {
|
||||
final parts = definition.split(":");
|
||||
final fieldName = parts[0];
|
||||
final fieldType = parts[1];
|
||||
final isUnique = parts.contains("unique");
|
||||
final isPrimary = parts.contains("primary");
|
||||
|
||||
switch (fieldType) {
|
||||
case "serial":
|
||||
return SerialTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
case "uuid":
|
||||
return UUIDTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
case "str":
|
||||
return StringTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
case "bigint":
|
||||
return BigIntTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
case "bool":
|
||||
return BoolTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
case "date":
|
||||
return DateTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
case "datetime":
|
||||
return DateTimeTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
case "float":
|
||||
return FloatTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
case "int":
|
||||
return IntTableField(
|
||||
fieldName: fieldName,
|
||||
fieldType: fieldType,
|
||||
isUnique: isUnique,
|
||||
isPrimary: isPrimary,
|
||||
);
|
||||
default:
|
||||
throw Exception("Unknown field type: $fieldType");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
import 'package:tuuli_app/api/model/table_field_model.dart';
|
||||
|
||||
class TablesListModel {
|
||||
final List<TableModel> tables;
|
||||
|
||||
TablesListModel(this.tables);
|
||||
|
||||
factory TablesListModel.fromJson(Map<String, dynamic> json) =>
|
||||
TablesListModel(
|
||||
List<TableModel>.from(
|
||||
json["tables"].map((x) => TableModel.fromJson(x)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class TableModel {
|
||||
final String tableId;
|
||||
final String tableName;
|
||||
final String columnsDefinition;
|
||||
final List<TableField> columns;
|
||||
final bool system;
|
||||
final bool hidden;
|
||||
|
||||
TableModel({
|
||||
required this.tableId,
|
||||
required this.tableName,
|
||||
required this.columnsDefinition,
|
||||
required this.system,
|
||||
required this.hidden,
|
||||
}) : columns = columnsDefinition
|
||||
.split(",")
|
||||
.map(TableField.parseTableField)
|
||||
.toList(growable: false);
|
||||
|
||||
factory TableModel.fromJson(Map<String, dynamic> json) => TableModel(
|
||||
tableId: json["table_id"],
|
||||
tableName: json["table_name"],
|
||||
columnsDefinition: json["columns"],
|
||||
system: json["system"],
|
||||
hidden: json["hidden"],
|
||||
);
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
class UserModel {
|
||||
final int id;
|
||||
final String username;
|
||||
final String? password;
|
||||
final String? accessToken;
|
||||
|
||||
UserModel({
|
||||
required this.id,
|
||||
required this.username,
|
||||
this.password,
|
||||
this.accessToken,
|
||||
});
|
||||
|
||||
factory UserModel.fromJson(Map<String, dynamic> json) => UserModel(
|
||||
id: json["id"],
|
||||
username: json["username"],
|
||||
password: json["password"],
|
||||
accessToken: json["access_token"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"username": username,
|
||||
"password": password,
|
||||
"access_token": accessToken,
|
||||
};
|
||||
}
|
||||
84
lib/api_sub_project/src/api.dart
Normal file
84
lib/api_sub_project/src/api.dart
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/serializers.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/auth/api_key_auth.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/auth/basic_auth.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/auth/bearer_auth.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/auth/oauth.dart';
|
||||
import 'package:tuuli_app/api_sub_project/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);
|
||||
}
|
||||
}
|
||||
1404
lib/api_sub_project/src/api/default_api.dart
Normal file
1404
lib/api_sub_project/src/api/default_api.dart
Normal file
File diff suppressed because it is too large
Load diff
77
lib/api_sub_project/src/api_util.dart
Normal file
77
lib/api_sub_project/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/api_sub_project/src/auth/api_key_auth.dart
Normal file
30
lib/api_sub_project/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_app/api_sub_project/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/api_sub_project/src/auth/auth.dart
Normal file
18
lib/api_sub_project/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 [];
|
||||
}
|
||||
}
|
||||
42
lib/api_sub_project/src/auth/basic_auth.dart
Normal file
42
lib/api_sub_project/src/auth/basic_auth.dart
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:tuuli_app/api_sub_project/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);
|
||||
}
|
||||
}
|
||||
27
lib/api_sub_project/src/auth/bearer_auth.dart
Normal file
27
lib/api_sub_project/src/auth/bearer_auth.dart
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:tuuli_app/api_sub_project/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);
|
||||
}
|
||||
}
|
||||
27
lib/api_sub_project/src/auth/oauth.dart
Normal file
27
lib/api_sub_project/src/auth/oauth.dart
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:tuuli_app/api_sub_project/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);
|
||||
}
|
||||
}
|
||||
30
lib/api_sub_project/src/date_serializer.dart
Normal file
30
lib/api_sub_project/src/date_serializer.dart
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:tuuli_app/api_sub_project/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/api_sub_project/src/model/access_token_response.dart
Normal file
106
lib/api_sub_project/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/api_sub_project/src/model/access_token_response.g.dart
Normal file
98
lib/api_sub_project/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/api_sub_project/src/model/auth_model.dart
Normal file
122
lib/api_sub_project/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/api_sub_project/src/model/auth_model.g.dart
Normal file
107
lib/api_sub_project/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/api_sub_project/src/model/column_condition_compat.dart
Normal file
179
lib/api_sub_project/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/api_sub_project/src/model/column_condition_compat.g.dart
Normal file
267
lib/api_sub_project/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/api_sub_project/src/model/create_asset_response.dart
Normal file
125
lib/api_sub_project/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/api_sub_project/src/model/create_asset_response.g.dart
Normal file
107
lib/api_sub_project/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/api_sub_project/src/model/create_user_definition.dart
Normal file
122
lib/api_sub_project/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/api_sub_project/src/model/create_user_definition.g.dart
Normal file
114
lib/api_sub_project/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/api_sub_project/src/model/date.dart
Normal file
70
lib/api_sub_project/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/api_sub_project/src/model/error_response.dart
Normal file
106
lib/api_sub_project/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/api_sub_project/src/model/error_response.g.dart
Normal file
93
lib/api_sub_project/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
|
||||
119
lib/api_sub_project/src/model/http_validation_error.dart
Normal file
119
lib/api_sub_project/src/model/http_validation_error.dart
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:tuuli_app/api_sub_project/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/api_sub_project/src/model/http_validation_error.g.dart
Normal file
106
lib/api_sub_project/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/api_sub_project/src/model/items_field_selector_list.dart
Normal file
110
lib/api_sub_project/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/api_sub_project/src/model/items_field_selector_list.g.dart
Normal file
107
lib/api_sub_project/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/api_sub_project/src/model/location_inner.dart
Normal file
68
lib/api_sub_project/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/api_sub_project/src/model/location_inner.g.dart
Normal file
93
lib/api_sub_project/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/api_sub_project/src/model/ok_response.dart
Normal file
109
lib/api_sub_project/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/api_sub_project/src/model/ok_response.g.dart
Normal file
87
lib/api_sub_project/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/api_sub_project/src/model/table_definition.dart
Normal file
170
lib/api_sub_project/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/api_sub_project/src/model/table_definition.g.dart
Normal file
157
lib/api_sub_project/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/api_sub_project/src/model/table_items_response.dart
Normal file
108
lib/api_sub_project/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/api_sub_project/src/model/table_items_response.g.dart
Normal file
109
lib/api_sub_project/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/api_sub_project/src/model/user_update_definition.dart
Normal file
138
lib/api_sub_project/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/api_sub_project/src/model/user_update_definition.g.dart
Normal file
129
lib/api_sub_project/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
|
||||
145
lib/api_sub_project/src/model/validation_error.dart
Normal file
145
lib/api_sub_project/src/model/validation_error.dart
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:tuuli_app/api_sub_project/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/api_sub_project/src/model/validation_error.g.dart
Normal file
137
lib/api_sub_project/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/api_sub_project/src/serializers.dart
Normal file
72
lib/api_sub_project/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_app/api_sub_project/src/date_serializer.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/date.dart';
|
||||
|
||||
import 'package:tuuli_app/api_sub_project/src/model/access_token_response.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/auth_model.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/column_condition_compat.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/create_asset_response.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/create_user_definition.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/error_response.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/http_validation_error.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/items_field_selector_list.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/location_inner.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/ok_response.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/table_definition.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/table_items_response.dart';
|
||||
import 'package:tuuli_app/api_sub_project/src/model/user_update_definition.dart';
|
||||
import 'package:tuuli_app/api_sub_project/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/api_sub_project/src/serializers.g.dart
Normal file
48
lib/api_sub_project/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/api_sub_project/tuuli_api.dart
Normal file
28
lib/api_sub_project/tuuli_api.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
export 'package:tuuli_app/api_sub_project/src/api.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/auth/api_key_auth.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/auth/basic_auth.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/auth/oauth.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/serializers.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/date.dart';
|
||||
|
||||
export 'package:tuuli_app/api_sub_project/src/api/default_api.dart';
|
||||
|
||||
export 'package:tuuli_app/api_sub_project/src/model/access_token_response.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/auth_model.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/column_condition_compat.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/create_asset_response.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/create_user_definition.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/error_response.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/http_validation_error.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/items_field_selector_list.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/location_inner.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/ok_response.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/table_definition.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/table_items_response.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/user_update_definition.dart';
|
||||
export 'package:tuuli_app/api_sub_project/src/model/validation_error.dart';
|
||||
328
pubspec.lock
328
pubspec.lock
|
|
@ -1,6 +1,22 @@
|
|||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
_fe_analyzer_shared:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
sha256: a36ec4843dc30ea6bf652bf25e3448db6c5e8bcf4aa55f063a5d1dad216d8214
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "58.0.0"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
sha256: cc4242565347e98424ce9945c819c192ec0838cb9d1f6aa4a97cc96becbc5b27
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.10.0"
|
||||
animated_background:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -9,6 +25,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -41,6 +65,78 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.2"
|
||||
build:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build
|
||||
sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
build_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build_config
|
||||
sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
build_daemon:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build_daemon
|
||||
sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
build_resolvers:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build_resolvers
|
||||
sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
build_runner:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: build_runner
|
||||
sha256: "7b25ba738bc74c94187cebeb9cc29d38a32e8279ce950eabd821d3b454a5f03d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
build_runner_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build_runner_core
|
||||
sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.2.7"
|
||||
built_collection:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: built_collection
|
||||
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.1.1"
|
||||
built_value:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: built_value
|
||||
sha256: "31b7c748fd4b9adf8d25d72a4c4a59ef119f12876cf414f94f8af5131d5fa2b0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.4.4"
|
||||
built_value_generator:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: built_value_generator
|
||||
sha256: "6c7d31060667a309889e45fd86fcaec6477750d767cf32a7f7ce4b1578d3440c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.4.4"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -49,6 +145,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
checked_yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: checked_yaml
|
||||
sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.2"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -57,6 +161,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
code_builder:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: code_builder
|
||||
sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.4.0"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -65,6 +177,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.17.1"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -73,6 +193,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
dart_style:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dart_style
|
||||
sha256: "6d691edde054969f0e0f26abb1b30834b5138b963793e56f69d3a9a4435e6352"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
data_table_2:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -81,6 +209,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.2"
|
||||
dio:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: dio
|
||||
sha256: "0894a098594263fe1caaba3520e3016d8a855caeb010a882273189cca10f11e9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.1.1"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -105,6 +241,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.1.4"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fixnum
|
||||
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
|
@ -131,6 +275,14 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
frontend_server_client:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: frontend_server_client
|
||||
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
get:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -147,6 +299,22 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: glob
|
||||
sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
graphs:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: graphs
|
||||
sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -155,6 +323,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.13.5"
|
||||
http_multi_server:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_multi_server
|
||||
sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.1"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -171,6 +347,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.18.0"
|
||||
io:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: io
|
||||
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -179,6 +363,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
json_annotation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: json_annotation
|
||||
sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.8.0"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -187,6 +379,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging
|
||||
sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -211,6 +411,38 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: mime
|
||||
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
one_of:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: one_of
|
||||
sha256: "25fe0fcf181e761c6fcd604caf9d5fdf952321be17584ba81c72c06bdaa511f0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
one_of_serializer:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: one_of_serializer
|
||||
sha256: "3f3dfb5c1578ba3afef1cb47fcc49e585e797af3f2b6c2cc7ed90aad0c5e7b83"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
package_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_config
|
||||
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -283,6 +515,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pool
|
||||
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.5.1"
|
||||
process:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -291,6 +531,30 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.2.4"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pub_semver
|
||||
sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.3"
|
||||
pubspec_parse:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pubspec_parse
|
||||
sha256: ec85d7d55339d85f44ec2b682a82fea340071e8978257e5a43e69f79e98ef50c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
quiver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: quiver
|
||||
sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.2.1"
|
||||
recase:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
@ -299,11 +563,35 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.1.0"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf
|
||||
sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.4.0"
|
||||
shelf_web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_web_socket
|
||||
sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
source_gen:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_gen
|
||||
sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.7"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -328,6 +616,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
stream_transform:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_transform
|
||||
sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -352,6 +648,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.18"
|
||||
timing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: timing
|
||||
sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -376,6 +680,22 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: watcher
|
||||
sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket_channel
|
||||
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
win32:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -392,6 +712,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
sdks:
|
||||
dart: ">=3.0.0-322.0.dev <4.0.0"
|
||||
flutter: ">=3.7.0"
|
||||
|
|
|
|||
|
|
@ -12,17 +12,24 @@ dependencies:
|
|||
|
||||
animated_background: ^2.0.0
|
||||
bottom_sheet: ^3.1.2
|
||||
built_collection: ^5.1.1
|
||||
built_value: ^8.4.4
|
||||
data_table_2: ^2.4.2
|
||||
dio: ^5.1.1
|
||||
flutter_fast_forms: ^10.0.0
|
||||
get: ^4.6.5
|
||||
get_storage: ^2.1.1
|
||||
http: ^0.13.5
|
||||
one_of_serializer: ^1.5.0
|
||||
recase: ^4.1.0
|
||||
uuid: ^3.0.7
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
build_runner: ^2.3.3
|
||||
built_value_generator: ^8.4.4
|
||||
flutter_lints: ^2.0.0
|
||||
|
||||
flutter:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue