Wow, fuck autogenerators
This commit is contained in:
parent
ebfafea617
commit
2d44d22f5f
46 changed files with 630 additions and 3139 deletions
|
|
@ -1,29 +1,17 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:tuuli_api/src/serializers.dart';
|
||||
import 'package:tuuli_api/src/auth/api_key_auth.dart';
|
||||
import 'package:tuuli_api/src/auth/basic_auth.dart';
|
||||
import 'package:tuuli_api/src/auth/bearer_auth.dart';
|
||||
import 'package:tuuli_api/src/auth/oauth.dart';
|
||||
import 'package:tuuli_api/src/api/default_api.dart';
|
||||
|
||||
class TuuliApi {
|
||||
static const String basePath = r'http://localhost';
|
||||
|
||||
final Dio dio;
|
||||
final Serializers serializers;
|
||||
|
||||
TuuliApi({
|
||||
Dio? dio,
|
||||
Serializers? serializers,
|
||||
String? basePathOverride,
|
||||
List<Interceptor>? interceptors,
|
||||
}) : this.serializers = serializers ?? standardSerializers,
|
||||
this.dio = dio ??
|
||||
}) : this.dio = dio ??
|
||||
Dio(BaseOptions(
|
||||
baseUrl: basePathOverride ?? basePath,
|
||||
connectTimeout: const Duration(milliseconds: 5000),
|
||||
|
|
@ -31,9 +19,6 @@ class TuuliApi {
|
|||
)) {
|
||||
if (interceptors == null) {
|
||||
this.dio.interceptors.addAll([
|
||||
OAuthInterceptor(),
|
||||
BasicAuthInterceptor(),
|
||||
BearerAuthInterceptor(),
|
||||
ApiKeyAuthInterceptor(),
|
||||
]);
|
||||
} else {
|
||||
|
|
@ -41,33 +26,20 @@ class TuuliApi {
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
(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);
|
||||
return DefaultApi(dio);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,77 +0,0 @@
|
|||
//
|
||||
// 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');
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:tuuli_api/src/auth/auth.dart';
|
||||
|
||||
class BasicAuthInfo {
|
||||
final String username;
|
||||
final String password;
|
||||
|
||||
const BasicAuthInfo(this.username, this.password);
|
||||
}
|
||||
|
||||
class BasicAuthInterceptor extends AuthInterceptor {
|
||||
final Map<String, BasicAuthInfo> authInfo = {};
|
||||
|
||||
@override
|
||||
void onRequest(
|
||||
RequestOptions options,
|
||||
RequestInterceptorHandler handler,
|
||||
) {
|
||||
final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme'] == 'basic') || secure['type'] == 'basic');
|
||||
for (final info in metadataAuthInfo) {
|
||||
final authName = info['name'] as String;
|
||||
final basicAuthInfo = authInfo[authName];
|
||||
if (basicAuthInfo != null) {
|
||||
final basicAuth = 'Basic ${base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'))}';
|
||||
options.headers['Authorization'] = basicAuth;
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:tuuli_api/src/auth/auth.dart';
|
||||
|
||||
class BearerAuthInterceptor extends AuthInterceptor {
|
||||
final Map<String, String> tokens = {};
|
||||
|
||||
@override
|
||||
void onRequest(
|
||||
RequestOptions options,
|
||||
RequestInterceptorHandler handler,
|
||||
) {
|
||||
final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme'] == 'bearer');
|
||||
for (final info in authInfo) {
|
||||
final token = tokens[info['name']];
|
||||
if (token != null) {
|
||||
options.headers['Authorization'] = 'Bearer ${token}';
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:tuuli_api/src/auth/auth.dart';
|
||||
|
||||
class OAuthInterceptor extends AuthInterceptor {
|
||||
final Map<String, String> tokens = {};
|
||||
|
||||
@override
|
||||
void onRequest(
|
||||
RequestOptions options,
|
||||
RequestInterceptorHandler handler,
|
||||
) {
|
||||
final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'oauth' || secure['type'] == 'oauth2');
|
||||
for (final info in authInfo) {
|
||||
final token = tokens[info['name']];
|
||||
if (token != null) {
|
||||
options.headers['Authorization'] = 'Bearer ${token}';
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:tuuli_api/src/model/date.dart';
|
||||
|
||||
class DateSerializer implements PrimitiveSerializer<Date> {
|
||||
|
||||
const DateSerializer();
|
||||
|
||||
@override
|
||||
Iterable<Type> get types => BuiltList.of([Date]);
|
||||
|
||||
@override
|
||||
String get wireName => 'Date';
|
||||
|
||||
@override
|
||||
Date deserialize(Serializers serializers, Object serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final parsed = DateTime.parse(serialized as String);
|
||||
return Date(parsed.year, parsed.month, parsed.day);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(Serializers serializers, Date date,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
return date.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,4 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'access_token_response.g.dart';
|
||||
|
||||
|
|
@ -12,95 +6,13 @@ part 'access_token_response.g.dart';
|
|||
///
|
||||
/// Properties:
|
||||
/// * [accessToken]
|
||||
@BuiltValue()
|
||||
abstract class AccessTokenResponse implements Built<AccessTokenResponse, AccessTokenResponseBuilder> {
|
||||
@BuiltValueField(wireName: r'access_token')
|
||||
String get accessToken;
|
||||
@JsonSerializable()
|
||||
class AccessTokenResponse {
|
||||
final String accessToken;
|
||||
|
||||
AccessTokenResponse._();
|
||||
const AccessTokenResponse({required this.accessToken});
|
||||
|
||||
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();
|
||||
factory AccessTokenResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$AccessTokenResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$AccessTokenResponseToJson(this);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,96 +3,16 @@
|
|||
part of 'access_token_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$AccessTokenResponse extends AccessTokenResponse {
|
||||
@override
|
||||
final String accessToken;
|
||||
AccessTokenResponse _$AccessTokenResponseFromJson(Map<String, dynamic> json) =>
|
||||
AccessTokenResponse(
|
||||
accessToken: json['accessToken'] as String,
|
||||
);
|
||||
|
||||
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
|
||||
Map<String, dynamic> _$AccessTokenResponseToJson(
|
||||
AccessTokenResponse instance) =>
|
||||
<String, dynamic>{
|
||||
'accessToken': instance.accessToken,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'auth_model.g.dart';
|
||||
|
||||
/// AuthModel
|
||||
///
|
||||
/// Properties:
|
||||
/// * [username]
|
||||
/// * [password]
|
||||
@JsonSerializable()
|
||||
class AuthModel {
|
||||
final String username;
|
||||
final String password;
|
||||
|
||||
const AuthModel(this.username, this.password);
|
||||
const AuthModel({required this.username, required this.password});
|
||||
|
||||
Map<String, String> toJson() {
|
||||
return <String, String>{
|
||||
'username': username,
|
||||
'password': password,
|
||||
};
|
||||
}
|
||||
factory AuthModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AuthModelFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$AuthModelToJson(this);
|
||||
}
|
||||
|
|
|
|||
17
lib/src/model/auth_model.g.dart
Normal file
17
lib/src/model/auth_model.g.dart
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'auth_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
AuthModel _$AuthModelFromJson(Map<String, dynamic> json) => AuthModel(
|
||||
username: json['username'] as String,
|
||||
password: json['password'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AuthModelToJson(AuthModel instance) => <String, dynamic>{
|
||||
'username': instance.username,
|
||||
'password': instance.password,
|
||||
};
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
import 'package:tuuli_api/src/model/column_condition_compat.dart';
|
||||
|
||||
/// BodyGetItemsFromTableItemsTableNamePost
|
||||
///
|
||||
/// Properties:
|
||||
/// * [fields]
|
||||
/// * [where]
|
||||
class BodyGetItemsFromTableItemsTableNamePost {
|
||||
final List<String> fields;
|
||||
final List<ColumnConditionCompat> where;
|
||||
|
||||
const BodyGetItemsFromTableItemsTableNamePost({
|
||||
required this.fields,
|
||||
required this.where,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return <String, dynamic>{
|
||||
'fields': fields,
|
||||
'where': where.map((e) => e.toJson()).toList(growable: false),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/// BodyUpdateItemInTableItemsTableNamePost
|
||||
///
|
||||
/// Properties:
|
||||
/// * [item]
|
||||
/// * [oldItem]
|
||||
class BodyUpdateItemInTableItemsTableNamePost {
|
||||
final Map<String, String> item;
|
||||
final Map<String, String> oldItem;
|
||||
|
||||
const BodyUpdateItemInTableItemsTableNamePost({
|
||||
required this.item,
|
||||
required this.oldItem,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return <String, dynamic>{
|
||||
'item': item,
|
||||
'oldItem': oldItem,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'column_condition_compat.g.dart';
|
||||
|
||||
enum ColumnConditionCompatOperator {
|
||||
eq,
|
||||
ne,
|
||||
|
|
@ -19,18 +23,19 @@ enum ColumnConditionCompatOperator {
|
|||
/// * [column]
|
||||
/// * [operator_]
|
||||
/// * [value]
|
||||
@JsonSerializable()
|
||||
class ColumnConditionCompat {
|
||||
final String column;
|
||||
final ColumnConditionCompatOperator operator_;
|
||||
final dynamic value;
|
||||
|
||||
const ColumnConditionCompat(this.column, this.operator_, this.value);
|
||||
const ColumnConditionCompat({
|
||||
required this.column,
|
||||
required this.operator_,
|
||||
required this.value,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return <String, dynamic>{
|
||||
'column': column,
|
||||
'operator': operator_.name,
|
||||
'value': value,
|
||||
};
|
||||
}
|
||||
factory ColumnConditionCompat.fromJson(Map<String, dynamic> json) =>
|
||||
_$ColumnConditionCompatFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ColumnConditionCompatToJson(this);
|
||||
}
|
||||
|
|
|
|||
39
lib/src/model/column_condition_compat.g.dart
Normal file
39
lib/src/model/column_condition_compat.g.dart
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'column_condition_compat.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ColumnConditionCompat _$ColumnConditionCompatFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
ColumnConditionCompat(
|
||||
column: json['column'] as String,
|
||||
operator_: $enumDecode(
|
||||
_$ColumnConditionCompatOperatorEnumMap, json['operator_']),
|
||||
value: json['value'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ColumnConditionCompatToJson(
|
||||
ColumnConditionCompat instance) =>
|
||||
<String, dynamic>{
|
||||
'column': instance.column,
|
||||
'operator_': _$ColumnConditionCompatOperatorEnumMap[instance.operator_]!,
|
||||
'value': instance.value,
|
||||
};
|
||||
|
||||
const _$ColumnConditionCompatOperatorEnumMap = {
|
||||
ColumnConditionCompatOperator.eq: 'eq',
|
||||
ColumnConditionCompatOperator.ne: 'ne',
|
||||
ColumnConditionCompatOperator.gt: 'gt',
|
||||
ColumnConditionCompatOperator.lt: 'lt',
|
||||
ColumnConditionCompatOperator.ge: 'ge',
|
||||
ColumnConditionCompatOperator.le: 'le',
|
||||
ColumnConditionCompatOperator.contains: 'contains',
|
||||
ColumnConditionCompatOperator.not_contains: 'not_contains',
|
||||
ColumnConditionCompatOperator.starts_with: 'starts_with',
|
||||
ColumnConditionCompatOperator.not_starts_with: 'not_starts_with',
|
||||
ColumnConditionCompatOperator.ends_with: 'ends_with',
|
||||
ColumnConditionCompatOperator.not_ends_with: 'not_ends_with',
|
||||
};
|
||||
|
|
@ -1,10 +1,4 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'create_asset_response.g.dart';
|
||||
|
||||
|
|
@ -13,113 +7,17 @@ part 'create_asset_response.g.dart';
|
|||
/// Properties:
|
||||
/// * [ok]
|
||||
/// * [fid]
|
||||
@BuiltValue()
|
||||
abstract class CreateAssetResponse implements Built<CreateAssetResponse, CreateAssetResponseBuilder> {
|
||||
@BuiltValueField(wireName: r'ok')
|
||||
bool? get ok;
|
||||
@JsonSerializable()
|
||||
class CreateAssetResponse {
|
||||
final bool ok;
|
||||
final String fid;
|
||||
|
||||
@BuiltValueField(wireName: r'fid')
|
||||
String get fid;
|
||||
const CreateAssetResponse({
|
||||
required this.ok,
|
||||
required this.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();
|
||||
factory CreateAssetResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$CreateAssetResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$CreateAssetResponseToJson(this);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,105 +3,18 @@
|
|||
part of 'create_asset_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$CreateAssetResponse extends CreateAssetResponse {
|
||||
@override
|
||||
final bool? ok;
|
||||
@override
|
||||
final String fid;
|
||||
CreateAssetResponse _$CreateAssetResponseFromJson(Map<String, dynamic> json) =>
|
||||
CreateAssetResponse(
|
||||
ok: json['ok'] as bool,
|
||||
fid: json['fid'] as String,
|
||||
);
|
||||
|
||||
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
|
||||
Map<String, dynamic> _$CreateAssetResponseToJson(
|
||||
CreateAssetResponse instance) =>
|
||||
<String, dynamic>{
|
||||
'ok': instance.ok,
|
||||
'fid': instance.fid,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'create_user_definition.g.dart';
|
||||
|
||||
/// CreateUserDefinition
|
||||
///
|
||||
/// Properties:
|
||||
/// * [username]
|
||||
/// * [password]
|
||||
@JsonSerializable()
|
||||
class CreateUserDefinition {
|
||||
final String username;
|
||||
final String password;
|
||||
|
||||
const CreateUserDefinition(this.username, this.password);
|
||||
const CreateUserDefinition({required this.username, required this.password});
|
||||
|
||||
Map<String, String> toJson() {
|
||||
return <String, String>{
|
||||
'username': username,
|
||||
'password': password,
|
||||
};
|
||||
}
|
||||
factory CreateUserDefinition.fromJson(Map<String, dynamic> json) =>
|
||||
_$CreateUserDefinitionFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$CreateUserDefinitionToJson(this);
|
||||
}
|
||||
|
|
|
|||
21
lib/src/model/create_user_definition.g.dart
Normal file
21
lib/src/model/create_user_definition.g.dart
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'create_user_definition.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
CreateUserDefinition _$CreateUserDefinitionFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
CreateUserDefinition(
|
||||
username: json['username'] as String,
|
||||
password: json['password'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CreateUserDefinitionToJson(
|
||||
CreateUserDefinition instance) =>
|
||||
<String, dynamic>{
|
||||
'username': instance.username,
|
||||
'password': instance.password,
|
||||
};
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/// 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);
|
||||
}
|
||||
|
|
@ -1,10 +1,4 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'error_response.g.dart';
|
||||
|
||||
|
|
@ -12,95 +6,15 @@ part 'error_response.g.dart';
|
|||
///
|
||||
/// Properties:
|
||||
/// * [error]
|
||||
@BuiltValue()
|
||||
abstract class ErrorResponse implements Built<ErrorResponse, ErrorResponseBuilder> {
|
||||
@BuiltValueField(wireName: r'error')
|
||||
String get error;
|
||||
@JsonSerializable()
|
||||
class ErrorResponse {
|
||||
final String error;
|
||||
|
||||
ErrorResponse._();
|
||||
const ErrorResponse({
|
||||
required this.error,
|
||||
});
|
||||
|
||||
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();
|
||||
factory ErrorResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$ErrorResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ErrorResponseToJson(this);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,91 +3,15 @@
|
|||
part of 'error_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$ErrorResponse extends ErrorResponse {
|
||||
@override
|
||||
final String error;
|
||||
ErrorResponse _$ErrorResponseFromJson(Map<String, dynamic> json) =>
|
||||
ErrorResponse(
|
||||
error: json['error'] as String,
|
||||
);
|
||||
|
||||
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
|
||||
Map<String, dynamic> _$ErrorResponseToJson(ErrorResponse instance) =>
|
||||
<String, dynamic>{
|
||||
'error': instance.error,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:tuuli_api/src/model/validation_error.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'http_validation_error.g.dart';
|
||||
|
||||
|
|
@ -14,97 +7,15 @@ part 'http_validation_error.g.dart';
|
|||
///
|
||||
/// Properties:
|
||||
/// * [detail]
|
||||
@BuiltValue()
|
||||
abstract class HTTPValidationError implements Built<HTTPValidationError, HTTPValidationErrorBuilder> {
|
||||
@BuiltValueField(wireName: r'detail')
|
||||
BuiltList<ValidationError>? get detail;
|
||||
@JsonSerializable()
|
||||
class HTTPValidationError {
|
||||
final List<ValidationError> detail;
|
||||
|
||||
HTTPValidationError._();
|
||||
const HTTPValidationError({
|
||||
required this.detail,
|
||||
});
|
||||
|
||||
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();
|
||||
factory HTTPValidationError.fromJson(Map<String, dynamic> json) =>
|
||||
_$HTTPValidationErrorFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$HTTPValidationErrorToJson(this);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,104 +3,19 @@
|
|||
part of 'http_validation_error.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$HTTPValidationError extends HTTPValidationError {
|
||||
@override
|
||||
final BuiltList<ValidationError>? detail;
|
||||
HTTPValidationError _$HTTPValidationErrorFromJson(Map<String, dynamic> json) =>
|
||||
HTTPValidationError(
|
||||
detail: (json['detail'] as List<dynamic>)
|
||||
.map((dynamic e) =>
|
||||
ValidationError.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
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
|
||||
Map<String, dynamic> _$HTTPValidationErrorToJson(
|
||||
HTTPValidationError instance) =>
|
||||
<String, dynamic>{
|
||||
'detail': instance.detail,
|
||||
};
|
||||
|
|
|
|||
23
lib/src/model/item_update.dart
Normal file
23
lib/src/model/item_update.dart
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'item_update.g.dart';
|
||||
|
||||
/// ItemUpdate
|
||||
///
|
||||
/// Properties:
|
||||
/// * [item]
|
||||
/// * [oldItem]
|
||||
@JsonSerializable()
|
||||
class ItemUpdate {
|
||||
final Map<String, String> item;
|
||||
final Map<String, String> oldItem;
|
||||
|
||||
const ItemUpdate({
|
||||
required this.item,
|
||||
required this.oldItem,
|
||||
});
|
||||
|
||||
factory ItemUpdate.fromJson(Map<String, dynamic> json) =>
|
||||
_$ItemUpdateFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ItemUpdateToJson(this);
|
||||
}
|
||||
18
lib/src/model/item_update.g.dart
Normal file
18
lib/src/model/item_update.g.dart
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'item_update.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ItemUpdate _$ItemUpdateFromJson(Map<String, dynamic> json) => ItemUpdate(
|
||||
item: Map<String, String>.from(json['item'] as Map),
|
||||
oldItem: Map<String, String>.from(json['oldItem'] as Map),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ItemUpdateToJson(ItemUpdate instance) =>
|
||||
<String, dynamic>{
|
||||
'item': instance.item,
|
||||
'oldItem': instance.oldItem,
|
||||
};
|
||||
|
|
@ -1,11 +1,4 @@
|
|||
//
|
||||
// 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';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'items_field_selector_list.g.dart';
|
||||
|
||||
|
|
@ -13,98 +6,15 @@ part 'items_field_selector_list.g.dart';
|
|||
///
|
||||
/// Properties:
|
||||
/// * [fields]
|
||||
@BuiltValue()
|
||||
abstract class ItemsFieldSelectorList implements Built<ItemsFieldSelectorList, ItemsFieldSelectorListBuilder> {
|
||||
@BuiltValueField(wireName: r'fields')
|
||||
BuiltList<String>? get fields;
|
||||
@JsonSerializable()
|
||||
class ItemsFieldSelectorList {
|
||||
final List<String> fields;
|
||||
|
||||
ItemsFieldSelectorList._();
|
||||
const ItemsFieldSelectorList({
|
||||
required this.fields,
|
||||
});
|
||||
|
||||
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();
|
||||
factory ItemsFieldSelectorList.fromJson(Map<String, dynamic> json) =>
|
||||
_$ItemsFieldSelectorListFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ItemsFieldSelectorListToJson(this);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,105 +3,19 @@
|
|||
part of 'items_field_selector_list.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$ItemsFieldSelectorList extends ItemsFieldSelectorList {
|
||||
@override
|
||||
final BuiltList<String>? fields;
|
||||
ItemsFieldSelectorList _$ItemsFieldSelectorListFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
ItemsFieldSelectorList(
|
||||
fields: (json['fields'] as List<dynamic>)
|
||||
.map((dynamic e) => e as String)
|
||||
.toList(),
|
||||
);
|
||||
|
||||
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
|
||||
Map<String, dynamic> _$ItemsFieldSelectorListToJson(
|
||||
ItemsFieldSelectorList instance) =>
|
||||
<String, dynamic>{
|
||||
'fields': instance.fields,
|
||||
};
|
||||
|
|
|
|||
24
lib/src/model/items_selector.dart
Normal file
24
lib/src/model/items_selector.dart
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:tuuli_api/src/model/column_condition_compat.dart';
|
||||
|
||||
part 'items_selector.g.dart';
|
||||
|
||||
/// BodyGetItemsFromTableItemsTableNamePost
|
||||
///
|
||||
/// Properties:
|
||||
/// * [fields]
|
||||
/// * [where]
|
||||
@JsonSerializable()
|
||||
class ItemsSelector {
|
||||
final List<String> fields;
|
||||
final List<ColumnConditionCompat> where;
|
||||
|
||||
const ItemsSelector({
|
||||
required this.fields,
|
||||
required this.where,
|
||||
});
|
||||
|
||||
factory ItemsSelector.fromJson(Map<String, dynamic> json) =>
|
||||
_$ItemsSelectorFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ItemsSelectorToJson(this);
|
||||
}
|
||||
24
lib/src/model/items_selector.g.dart
Normal file
24
lib/src/model/items_selector.g.dart
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'items_selector.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
ItemsSelector _$ItemsSelectorFromJson(Map<String, dynamic> json) =>
|
||||
ItemsSelector(
|
||||
fields: (json['fields'] as List<dynamic>)
|
||||
.map((dynamic e) => e as String)
|
||||
.toList(),
|
||||
where: (json['where'] as List<dynamic>)
|
||||
.map((dynamic e) =>
|
||||
ColumnConditionCompat.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ItemsSelectorToJson(ItemsSelector instance) =>
|
||||
<String, dynamic>{
|
||||
'fields': instance.fields,
|
||||
'where': instance.where,
|
||||
};
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
//
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
// 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
|
||||
|
|
@ -1,10 +1,4 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'ok_response.g.dart';
|
||||
|
||||
|
|
@ -12,98 +6,13 @@ part 'ok_response.g.dart';
|
|||
///
|
||||
/// Properties:
|
||||
/// * [ok]
|
||||
@BuiltValue()
|
||||
abstract class OkResponse implements Built<OkResponse, OkResponseBuilder> {
|
||||
@BuiltValueField(wireName: r'ok')
|
||||
bool? get ok;
|
||||
@JsonSerializable()
|
||||
class OkResponse {
|
||||
final bool ok;
|
||||
|
||||
OkResponse._();
|
||||
const OkResponse({required this.ok});
|
||||
|
||||
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();
|
||||
factory OkResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$OkResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$OkResponseToJson(this);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,85 +3,14 @@
|
|||
part of 'ok_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$OkResponse extends OkResponse {
|
||||
@override
|
||||
final bool? ok;
|
||||
OkResponse _$OkResponseFromJson(Map<String, dynamic> json) => OkResponse(
|
||||
ok: json['ok'] as bool,
|
||||
);
|
||||
|
||||
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
|
||||
Map<String, dynamic> _$OkResponseToJson(OkResponse instance) =>
|
||||
<String, dynamic>{
|
||||
'ok': instance.ok,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,4 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'table_definition.g.dart';
|
||||
|
||||
|
|
@ -16,155 +10,23 @@ part 'table_definition.g.dart';
|
|||
/// * [columns]
|
||||
/// * [system]
|
||||
/// * [hidden]
|
||||
@BuiltValue()
|
||||
abstract class TableDefinition implements Built<TableDefinition, TableDefinitionBuilder> {
|
||||
@BuiltValueField(wireName: r'table_id')
|
||||
String get tableId;
|
||||
@JsonSerializable()
|
||||
class TableDefinition {
|
||||
final String tableId;
|
||||
final String tableName;
|
||||
final String columns;
|
||||
final bool system;
|
||||
final bool hidden;
|
||||
|
||||
@BuiltValueField(wireName: r'table_name')
|
||||
String get tableName;
|
||||
const TableDefinition({
|
||||
required this.tableId,
|
||||
required this.tableName,
|
||||
required this.columns,
|
||||
required this.system,
|
||||
required this.hidden,
|
||||
});
|
||||
|
||||
@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();
|
||||
factory TableDefinition.fromJson(Map<String, dynamic> json) =>
|
||||
_$TableDefinitionFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$TableDefinitionToJson(this);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,155 +3,23 @@
|
|||
part of 'table_definition.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$TableDefinition extends TableDefinition {
|
||||
@override
|
||||
final String tableId;
|
||||
@override
|
||||
final String tableName;
|
||||
@override
|
||||
final String columns;
|
||||
@override
|
||||
final bool system;
|
||||
@override
|
||||
final bool hidden;
|
||||
TableDefinition _$TableDefinitionFromJson(Map<String, dynamic> json) =>
|
||||
TableDefinition(
|
||||
tableId: json['tableId'] as String,
|
||||
tableName: json['tableName'] as String,
|
||||
columns: json['columns'] as String,
|
||||
system: json['system'] as bool,
|
||||
hidden: json['hidden'] as bool,
|
||||
);
|
||||
|
||||
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
|
||||
Map<String, dynamic> _$TableDefinitionToJson(TableDefinition instance) =>
|
||||
<String, dynamic>{
|
||||
'tableId': instance.tableId,
|
||||
'tableName': instance.tableName,
|
||||
'columns': instance.columns,
|
||||
'system': instance.system,
|
||||
'hidden': instance.hidden,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,108 +0,0 @@
|
|||
//
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
// 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
|
||||
|
|
@ -1,9 +1,14 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'user_update_definition.g.dart';
|
||||
|
||||
/// UserUpdateDefinition
|
||||
///
|
||||
/// Properties:
|
||||
/// * [userId]
|
||||
/// * [password]
|
||||
/// * [accessToken]
|
||||
@JsonSerializable()
|
||||
class UserUpdateDefinition {
|
||||
final int userId;
|
||||
final String password;
|
||||
|
|
@ -15,11 +20,7 @@ class UserUpdateDefinition {
|
|||
required this.accessToken,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return <String, dynamic>{
|
||||
'userId': userId,
|
||||
'password': password,
|
||||
'accessToken': accessToken,
|
||||
};
|
||||
}
|
||||
factory UserUpdateDefinition.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserUpdateDefinitionFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$UserUpdateDefinitionToJson(this);
|
||||
}
|
||||
|
|
|
|||
23
lib/src/model/user_update_definition.g.dart
Normal file
23
lib/src/model/user_update_definition.g.dart
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'user_update_definition.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
UserUpdateDefinition _$UserUpdateDefinitionFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
UserUpdateDefinition(
|
||||
userId: json['userId'] as int,
|
||||
password: json['password'] as String,
|
||||
accessToken: json['accessToken'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserUpdateDefinitionToJson(
|
||||
UserUpdateDefinition instance) =>
|
||||
<String, dynamic>{
|
||||
'userId': instance.userId,
|
||||
'password': instance.password,
|
||||
'accessToken': instance.accessToken,
|
||||
};
|
||||
|
|
@ -1,12 +1,4 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:tuuli_api/src/model/location_inner.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'validation_error.g.dart';
|
||||
|
||||
|
|
@ -16,125 +8,19 @@ part 'validation_error.g.dart';
|
|||
/// * [loc]
|
||||
/// * [msg]
|
||||
/// * [type]
|
||||
@BuiltValue()
|
||||
abstract class ValidationError implements Built<ValidationError, ValidationErrorBuilder> {
|
||||
@BuiltValueField(wireName: r'loc')
|
||||
BuiltList<LocationInner> get loc;
|
||||
@JsonSerializable()
|
||||
class ValidationError {
|
||||
final List<dynamic> loc;
|
||||
final String msg;
|
||||
final String type;
|
||||
|
||||
@BuiltValueField(wireName: r'msg')
|
||||
String get msg;
|
||||
const ValidationError({
|
||||
required this.loc,
|
||||
required this.msg,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
@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();
|
||||
factory ValidationError.fromJson(Map<String, dynamic> json) =>
|
||||
_$ValidationErrorFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ValidationErrorToJson(this);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,135 +3,19 @@
|
|||
part of 'validation_error.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
class _$ValidationError extends ValidationError {
|
||||
@override
|
||||
final BuiltList<LocationInner> loc;
|
||||
@override
|
||||
final String msg;
|
||||
@override
|
||||
final String type;
|
||||
ValidationError _$ValidationErrorFromJson(Map<String, dynamic> json) =>
|
||||
ValidationError(
|
||||
loc: json['loc'] as List<dynamic>,
|
||||
msg: json['msg'] as String,
|
||||
type: json['type'] as String,
|
||||
);
|
||||
|
||||
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
|
||||
Map<String, dynamic> _$ValidationErrorToJson(ValidationError instance) =>
|
||||
<String, dynamic>{
|
||||
'loc': instance.loc,
|
||||
'msg': instance.msg,
|
||||
'type': instance.type,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,74 +0,0 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_import
|
||||
|
||||
import 'package:one_of_serializer/any_of_serializer.dart';
|
||||
import 'package:one_of_serializer/one_of_serializer.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/json_object.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:built_value/standard_json_plugin.dart';
|
||||
import 'package:built_value/iso_8601_date_time_serializer.dart';
|
||||
import 'package:tuuli_api/src/date_serializer.dart';
|
||||
import 'package:tuuli_api/src/model/date.dart';
|
||||
|
||||
import 'package:tuuli_api/src/model/access_token_response.dart';
|
||||
import 'package:tuuli_api/src/model/auth_model.dart';
|
||||
import 'package:tuuli_api/src/model/body_get_items_from_table_items_table_name_post.dart';
|
||||
import 'package:tuuli_api/src/model/body_update_item_in_table_items_table_name_post.dart';
|
||||
import 'package:tuuli_api/src/model/column_condition_compat.dart';
|
||||
import 'package:tuuli_api/src/model/create_asset_response.dart';
|
||||
import 'package:tuuli_api/src/model/create_user_definition.dart';
|
||||
import 'package:tuuli_api/src/model/error_response.dart';
|
||||
import 'package:tuuli_api/src/model/http_validation_error.dart';
|
||||
import 'package:tuuli_api/src/model/location_inner.dart';
|
||||
import 'package:tuuli_api/src/model/ok_response.dart';
|
||||
import 'package:tuuli_api/src/model/table_definition.dart';
|
||||
import 'package:tuuli_api/src/model/user_update_definition.dart';
|
||||
import 'package:tuuli_api/src/model/validation_error.dart';
|
||||
|
||||
part 'serializers.g.dart';
|
||||
|
||||
@SerializersFor([
|
||||
AccessTokenResponse,
|
||||
AuthModel,
|
||||
BodyGetItemsFromTableItemsTableNamePost,
|
||||
BodyUpdateItemInTableItemsTableNamePost,
|
||||
ColumnConditionCompat,
|
||||
CreateAssetResponse,
|
||||
CreateUserDefinition,
|
||||
ErrorResponse,
|
||||
HTTPValidationError,
|
||||
LocationInner,
|
||||
OkResponse,
|
||||
TableDefinition,
|
||||
UserUpdateDefinition,
|
||||
ValidationError,
|
||||
])
|
||||
Serializers serializers = (_$serializers.toBuilder()
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, [FullType(ColumnConditionCompat)]),
|
||||
() => ListBuilder<ColumnConditionCompat>(),
|
||||
)
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, [FullType(JsonObject)]),
|
||||
() => ListBuilder<JsonObject>(),
|
||||
)
|
||||
..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();
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'serializers.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// BuiltValueGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Serializers _$serializers = (new Serializers().toBuilder()
|
||||
..add(AccessTokenResponse.serializer)
|
||||
..add(CreateAssetResponse.serializer)
|
||||
..add(ErrorResponse.serializer)
|
||||
..add(HTTPValidationError.serializer)
|
||||
..add(LocationInner.serializer)
|
||||
..add(OkResponse.serializer)
|
||||
..add(TableDefinition.serializer)
|
||||
..add(ValidationError.serializer)
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(LocationInner)]),
|
||||
() => new ListBuilder<LocationInner>())
|
||||
..addBuilderFactory(
|
||||
const FullType(BuiltList, const [const FullType(ValidationError)]),
|
||||
() => new ListBuilder<ValidationError>()))
|
||||
.build();
|
||||
|
||||
// ignore_for_file: deprecated_member_use_from_same_package,type=lint
|
||||
|
|
@ -1,26 +1,17 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
export 'package:tuuli_api/src/api.dart';
|
||||
export 'package:tuuli_api/src/auth/api_key_auth.dart';
|
||||
export 'package:tuuli_api/src/auth/basic_auth.dart';
|
||||
export 'package:tuuli_api/src/auth/oauth.dart';
|
||||
export 'package:tuuli_api/src/serializers.dart';
|
||||
export 'package:tuuli_api/src/model/date.dart';
|
||||
|
||||
export 'package:tuuli_api/src/api/default_api.dart';
|
||||
|
||||
export 'package:tuuli_api/src/model/access_token_response.dart';
|
||||
export 'package:tuuli_api/src/model/auth_model.dart';
|
||||
export 'package:tuuli_api/src/model/body_get_items_from_table_items_table_name_post.dart';
|
||||
export 'package:tuuli_api/src/model/body_update_item_in_table_items_table_name_post.dart';
|
||||
export 'package:tuuli_api/src/model/items_selector.dart';
|
||||
export 'package:tuuli_api/src/model/item_update.dart';
|
||||
export 'package:tuuli_api/src/model/column_condition_compat.dart';
|
||||
export 'package:tuuli_api/src/model/create_asset_response.dart';
|
||||
export 'package:tuuli_api/src/model/create_user_definition.dart';
|
||||
export 'package:tuuli_api/src/model/error_response.dart';
|
||||
export 'package:tuuli_api/src/model/http_validation_error.dart';
|
||||
export 'package:tuuli_api/src/model/location_inner.dart';
|
||||
export 'package:tuuli_api/src/model/ok_response.dart';
|
||||
export 'package:tuuli_api/src/model/table_definition.dart';
|
||||
export 'package:tuuli_api/src/model/user_update_definition.dart';
|
||||
|
|
|
|||
14
pubspec.yaml
14
pubspec.yaml
|
|
@ -4,16 +4,12 @@ description: OpenAPI API client
|
|||
homepage: homepage
|
||||
|
||||
environment:
|
||||
sdk: '>=2.15.0 <3.0.0'
|
||||
sdk: ">=2.15.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
dio: '^5.0.0'
|
||||
one_of: '>=1.5.0 <2.0.0'
|
||||
one_of_serializer: '>=1.5.0 <2.0.0'
|
||||
built_value: '>=8.4.0 <9.0.0'
|
||||
built_collection: '>=5.1.1 <6.0.0'
|
||||
dio: "^5.0.0"
|
||||
|
||||
dev_dependencies:
|
||||
built_value_generator: '>=8.4.0 <9.0.0'
|
||||
build_runner: any
|
||||
test: ^1.16.0
|
||||
build_runner: any
|
||||
json_serializable: ^6.6.1
|
||||
test: ^1.16.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue