diff --git a/lib/api_sub_project/src/api.dart b/lib/api_sub_project/src/api.dart deleted file mode 100644 index 791949e..0000000 --- a/lib/api_sub_project/src/api.dart +++ /dev/null @@ -1,84 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio/dio.dart'; -import 'package:built_value/serializer.dart'; -import 'package:tuuli_app/api_sub_project/src/serializers.dart'; -import 'package:tuuli_app/api_sub_project/src/auth/api_key_auth.dart'; -import 'package:tuuli_app/api_sub_project/src/auth/basic_auth.dart'; -import 'package:tuuli_app/api_sub_project/src/auth/bearer_auth.dart'; -import 'package:tuuli_app/api_sub_project/src/auth/oauth.dart'; -import 'package:tuuli_app/api_sub_project/src/api/default_api.dart'; - -class TuuliApi { - static const String basePath = r'http://localhost'; - - final Dio dio; - final Serializers serializers; - - TuuliApi({ - Dio? dio, - Serializers? serializers, - String? basePathOverride, - List? interceptors, - }) : this.serializers = serializers ?? standardSerializers, - this.dio = dio ?? - Dio(BaseOptions( - baseUrl: basePathOverride ?? basePath, - connectTimeout: const Duration(milliseconds: 5000), - receiveTimeout: const Duration(milliseconds: 3000), - )) { - if (interceptors == null) { - this.dio.interceptors.addAll([ - OAuthInterceptor(), - BasicAuthInterceptor(), - BearerAuthInterceptor(), - ApiKeyAuthInterceptor(), - ]); - } else { - this.dio.interceptors.addAll(interceptors); - } - } - - void setOAuthToken(String name, String token) { - if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) { - (this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) - as OAuthInterceptor) - .tokens[name] = token; - } - } - - void setBearerAuth(String name, String token) { - if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) { - (this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) - as BearerAuthInterceptor) - .tokens[name] = token; - } - } - - void setBasicAuth(String name, String username, String password) { - if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) { - (this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) - as BasicAuthInterceptor) - .authInfo[name] = BasicAuthInfo(username, password); - } - } - - void setApiKey(String name, String apiKey) { - if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) { - (this - .dio - .interceptors - .firstWhere((element) => element is ApiKeyAuthInterceptor) - as ApiKeyAuthInterceptor) - .apiKeys[name] = apiKey; - } - } - - /// Get DefaultApi instance, base route and serializer can be overridden by a given but be careful, - /// by doing that all interceptors will not be executed - DefaultApi getDefaultApi() { - return DefaultApi(dio, serializers); - } -} diff --git a/lib/api_sub_project/src/api/default_api.dart b/lib/api_sub_project/src/api/default_api.dart deleted file mode 100644 index fa09278..0000000 --- a/lib/api_sub_project/src/api/default_api.dart +++ /dev/null @@ -1,1404 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:async'; - -import 'package:built_value/serializer.dart'; -import 'package:dio/dio.dart'; - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/json_object.dart'; -import 'package:tuuli_app/api_sub_project/src/api_util.dart'; -import 'package:tuuli_app/api_sub_project/src/model/access_token_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/auth_model.dart'; -import 'package:tuuli_app/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.dart'; -import 'package:tuuli_app/api_sub_project/src/model/column_condition_compat.dart'; -import 'package:tuuli_app/api_sub_project/src/model/create_asset_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/create_user_definition.dart'; -import 'package:tuuli_app/api_sub_project/src/model/error_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/http_validation_error.dart'; -import 'package:tuuli_app/api_sub_project/src/model/items_field_selector_list.dart'; -import 'package:tuuli_app/api_sub_project/src/model/ok_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/table_definition.dart'; -import 'package:tuuli_app/api_sub_project/src/model/table_items_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/user_update_definition.dart'; - -class DefaultApi { - final Dio _dio; - - final Serializers _serializers; - - const DefaultApi(this._dio, this._serializers); - - /// Create Item - /// - /// - /// Parameters: - /// * [tableName] - /// * [body] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> createItemItemsTableNamePost({ - required String tableName, - required JsonObject body, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/items/{tableName}/+' - .replaceAll('{' r'tableName' '}', tableName.toString()); - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = body; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Create Table - /// Parameter `columns` should be a list of strings Each string should be in a following format: `column_name:column_type[:column_options]` Where *column_type* should be one of the following: - serial - str - bool - datetime - float - int - int:asset - int:user Also *column_options* can be one of the following: - unique - default Example: ```json [ \"id:serial:primary\", \"name:str:unique\", \"description:str\", \"is_active:bool\", \"price:float\", \"quantity:int\", \"creator_id:int:user\", \"asset_id:int:asset\" ] ``` Notes: 1. you cannot use *unique* and *default* at the same time 2. in current implementation you cannot use *default*, because there is no way to specify default value - /// - /// Parameters: - /// * [tableName] - /// * [requestBody] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> createTableApiCreateTableTableNamePost({ - required String tableName, - required BuiltList requestBody, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/api/createTable/{tableName}' - .replaceAll('{' r'tableName' '}', tableName.toString()); - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(BuiltList, [FullType(String)]); - _bodyData = _serializers.serialize(requestBody, specifiedType: _type); - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Create User - /// - /// - /// Parameters: - /// * [createUserDefinition] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> createUserApiUsersPost({ - required CreateUserDefinition createUserDefinition, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/api/users/+'; - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(CreateUserDefinition); - _bodyData = - _serializers.serialize(createUserDefinition, specifiedType: _type); - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Delete Item From Table - /// - /// - /// Parameters: - /// * [tableName] - /// * [columnConditionCompat] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> deleteItemFromTableItemsTableNamePost({ - required String tableName, - required BuiltList columnConditionCompat, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/items/{tableName}/-' - .replaceAll('{' r'tableName' '}', tableName.toString()); - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(BuiltList, [FullType(ColumnConditionCompat)]); - _bodyData = - _serializers.serialize(columnConditionCompat, specifiedType: _type); - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Drop Table - /// - /// - /// Parameters: - /// * [tableName] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> dropTableApiDropTableTableNamePost({ - required String tableName, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/api/dropTable/{tableName}' - .replaceAll('{' r'tableName' '}', tableName.toString()); - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Get Access Token - /// - /// - /// Parameters: - /// * [authModel] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [AccessTokenResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> getAccessTokenApiGetAccessTokenPost({ - required AuthModel authModel, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/api/getAccessToken'; - final _options = Options( - method: r'POST', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(AuthModel); - _bodyData = _serializers.serialize(authModel, specifiedType: _type); - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - AccessTokenResponse _responseData; - - try { - const _responseType = FullType(AccessTokenResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as AccessTokenResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Get Asset - /// - /// - /// Parameters: - /// * [fid] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [JsonObject] as data - /// Throws [DioError] if API call or serialization fails - Future> getAssetAssetsFidGet({ - required String fid, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/assets/{fid}'.replaceAll('{' r'fid' '}', fid.toString()); - final _options = Options( - method: r'GET', - headers: { - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - JsonObject _responseData; - - try { - const _responseType = FullType(JsonObject); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as JsonObject; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Get Items From Table - /// - /// - /// Parameters: - /// * [tableName] - /// * [itemsFieldSelectorList] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [TableItemsResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> getItemsFromTableItemsTableNamePost({ - required String tableName, - required ItemsFieldSelectorList itemsFieldSelectorList, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/items/{tableName}' - .replaceAll('{' r'tableName' '}', tableName.toString()); - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(ItemsFieldSelectorList); - _bodyData = - _serializers.serialize(itemsFieldSelectorList, specifiedType: _type); - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - TableItemsResponse _responseData; - - try { - const _responseType = FullType(TableItemsResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as TableItemsResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// List Tables - /// - /// - /// Parameters: - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [BuiltList] as data - /// Throws [DioError] if API call or serialization fails - Future>> listTablesApiListTablesGet({ - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/api/listTables'; - final _options = Options( - method: r'GET', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _response = await _dio.request( - _path, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - BuiltList _responseData; - - try { - const _responseType = FullType(BuiltList, [FullType(TableDefinition)]); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as BuiltList; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response>( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Put Asset - /// - /// - /// Parameters: - /// * [asset] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [CreateAssetResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> putAssetAssetsPost({ - required MultipartFile asset, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/assets/+'; - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'multipart/form-data', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - _bodyData = FormData.fromMap({ - r'asset': asset, - }); - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - CreateAssetResponse _responseData; - - try { - const _responseType = FullType(CreateAssetResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as CreateAssetResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Remove Asset - /// - /// - /// Parameters: - /// * [assetId] - /// * [checkReferences] - /// * [deleteReferencing] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> removeAssetAssetsAssetIdPost({ - required int assetId, - bool? checkReferences = true, - bool? deleteReferencing = false, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/assets/{asset_id}/-' - .replaceAll('{' r'asset_id' '}', assetId.toString()); - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _queryParameters = { - if (checkReferences != null) - r'check_references': encodeQueryParameter( - _serializers, checkReferences, const FullType(bool)), - if (deleteReferencing != null) - r'delete_referencing': encodeQueryParameter( - _serializers, deleteReferencing, const FullType(bool)), - }; - - final _response = await _dio.request( - _path, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Remove User - /// - /// - /// Parameters: - /// * [userId] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> removeUserApiUsersPost({ - required int userId, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/api/users/-'; - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _queryParameters = { - r'user_id': - encodeQueryParameter(_serializers, userId, const FullType(int)), - }; - - final _response = await _dio.request( - _path, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update Asset Description - /// - /// - /// Parameters: - /// * [assetId] - /// * [assetDescription] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> updateAssetDescriptionAssetsAssetIdPost({ - required int assetId, - required String assetDescription, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/assets/{asset_id}/*' - .replaceAll('{' r'asset_id' '}', assetId.toString()); - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - validateStatus: validateStatus, - ); - - final _queryParameters = { - r'asset_description': encodeQueryParameter( - _serializers, assetDescription, const FullType(String)), - }; - - final _response = await _dio.request( - _path, - options: _options, - queryParameters: _queryParameters, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update Item In Table - /// - /// - /// Parameters: - /// * [tableName] - /// * [bodyUpdateItemInTableItemsTableNamePost] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> updateItemInTableItemsTableNamePost({ - required String tableName, - required BodyUpdateItemInTableItemsTableNamePost - bodyUpdateItemInTableItemsTableNamePost, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/items/{tableName}/*' - .replaceAll('{' r'tableName' '}', tableName.toString()); - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(BodyUpdateItemInTableItemsTableNamePost); - _bodyData = _serializers.serialize( - bodyUpdateItemInTableItemsTableNamePost, - specifiedType: _type); - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } - - /// Update User - /// - /// - /// Parameters: - /// * [userUpdateDefinition] - /// * [accessToken] - /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation - /// * [headers] - Can be used to add additional headers to the request - /// * [extras] - Can be used to add flags to the request - /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response - /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress - /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress - /// - /// Returns a [Future] containing a [Response] with a [OkResponse] as data - /// Throws [DioError] if API call or serialization fails - Future> updateUserApiUsersPost({ - required UserUpdateDefinition userUpdateDefinition, - String? accessToken, - CancelToken? cancelToken, - Map? headers, - Map? extra, - ValidateStatus? validateStatus, - ProgressCallback? onSendProgress, - ProgressCallback? onReceiveProgress, - }) async { - final _path = r'/api/users/*'; - final _options = Options( - method: r'POST', - headers: { - if (accessToken != null) r'access-token': accessToken, - ...?headers, - }, - extra: { - 'secure': >[], - ...?extra, - }, - contentType: 'application/json', - validateStatus: validateStatus, - ); - - dynamic _bodyData; - - try { - const _type = FullType(UserUpdateDefinition); - _bodyData = - _serializers.serialize(userUpdateDefinition, specifiedType: _type); - } catch (error, stackTrace) { - throw DioError( - requestOptions: _options.compose( - _dio.options, - _path, - ), - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - final _response = await _dio.request( - _path, - data: _bodyData, - options: _options, - cancelToken: cancelToken, - onSendProgress: onSendProgress, - onReceiveProgress: onReceiveProgress, - ); - - OkResponse _responseData; - - try { - const _responseType = FullType(OkResponse); - _responseData = _serializers.deserialize( - _response.data!, - specifiedType: _responseType, - ) as OkResponse; - } catch (error, stackTrace) { - throw DioError( - requestOptions: _response.requestOptions, - response: _response, - type: DioErrorType.unknown, - error: error, - stackTrace: stackTrace, - ); - } - - return Response( - data: _responseData, - headers: _response.headers, - isRedirect: _response.isRedirect, - requestOptions: _response.requestOptions, - redirects: _response.redirects, - statusCode: _response.statusCode, - statusMessage: _response.statusMessage, - extra: _response.extra, - ); - } -} diff --git a/lib/api_sub_project/src/api_util.dart b/lib/api_sub_project/src/api_util.dart deleted file mode 100644 index ed3bb12..0000000 --- a/lib/api_sub_project/src/api_util.dart +++ /dev/null @@ -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 encodeCollectionQueryParameter( - Serializers serializers, - dynamic value, - FullType type, { - ListFormat format = ListFormat.multi, -}) { - final serialized = serializers.serialize( - value as Object, - specifiedType: type, - ); - if (value is BuiltList || value is BuiltSet) { - return ListParam(List.of((serialized as Iterable).cast()), format); - } - throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); -} diff --git a/lib/api_sub_project/src/auth/api_key_auth.dart b/lib/api_sub_project/src/auth/api_key_auth.dart deleted file mode 100644 index 74996b0..0000000 --- a/lib/api_sub_project/src/auth/api_key_auth.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio/dio.dart'; -import 'package:tuuli_app/api_sub_project/src/auth/auth.dart'; - -class ApiKeyAuthInterceptor extends AuthInterceptor { - final Map apiKeys = {}; - - @override - void onRequest(RequestOptions options, RequestInterceptorHandler handler) { - final authInfo = - getAuthInfo(options, (secure) => secure['type'] == 'apiKey'); - for (final info in authInfo) { - final authName = info['name'] as String; - final authKeyName = info['keyName'] as String; - final authWhere = info['where'] as String; - final apiKey = apiKeys[authName]; - if (apiKey != null) { - if (authWhere == 'query') { - options.queryParameters[authKeyName] = apiKey; - } else { - options.headers[authKeyName] = apiKey; - } - } - } - super.onRequest(options, handler); - } -} diff --git a/lib/api_sub_project/src/auth/auth.dart b/lib/api_sub_project/src/auth/auth.dart deleted file mode 100644 index f7ae9bf..0000000 --- a/lib/api_sub_project/src/auth/auth.dart +++ /dev/null @@ -1,18 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio/dio.dart'; - -abstract class AuthInterceptor extends Interceptor { - /// Get auth information on given route for the given type. - /// Can return an empty list if type is not present on auth data or - /// if route doesn't need authentication. - List> getAuthInfo(RequestOptions route, bool Function(Map secure) handles) { - if (route.extra.containsKey('secure')) { - final auth = route.extra['secure'] as List>; - return auth.where((secure) => handles(secure)).toList(); - } - return []; - } -} diff --git a/lib/api_sub_project/src/auth/basic_auth.dart b/lib/api_sub_project/src/auth/basic_auth.dart deleted file mode 100644 index ad6906b..0000000 --- a/lib/api_sub_project/src/auth/basic_auth.dart +++ /dev/null @@ -1,42 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'dart:convert'; - -import 'package:dio/dio.dart'; -import 'package:tuuli_app/api_sub_project/src/auth/auth.dart'; - -class BasicAuthInfo { - final String username; - final String password; - - const BasicAuthInfo(this.username, this.password); -} - -class BasicAuthInterceptor extends AuthInterceptor { - final Map 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); - } -} diff --git a/lib/api_sub_project/src/auth/bearer_auth.dart b/lib/api_sub_project/src/auth/bearer_auth.dart deleted file mode 100644 index fadbc2b..0000000 --- a/lib/api_sub_project/src/auth/bearer_auth.dart +++ /dev/null @@ -1,27 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio/dio.dart'; -import 'package:tuuli_app/api_sub_project/src/auth/auth.dart'; - -class BearerAuthInterceptor extends AuthInterceptor { - final Map 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); - } -} diff --git a/lib/api_sub_project/src/auth/oauth.dart b/lib/api_sub_project/src/auth/oauth.dart deleted file mode 100644 index c8b6faa..0000000 --- a/lib/api_sub_project/src/auth/oauth.dart +++ /dev/null @@ -1,27 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:dio/dio.dart'; -import 'package:tuuli_app/api_sub_project/src/auth/auth.dart'; - -class OAuthInterceptor extends AuthInterceptor { - final Map 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); - } -} diff --git a/lib/api_sub_project/src/date_serializer.dart b/lib/api_sub_project/src/date_serializer.dart deleted file mode 100644 index f6cbf32..0000000 --- a/lib/api_sub_project/src/date_serializer.dart +++ /dev/null @@ -1,30 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/serializer.dart'; -import 'package:tuuli_app/api_sub_project/src/model/date.dart'; - -class DateSerializer implements PrimitiveSerializer { - const DateSerializer(); - - @override - Iterable 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(); - } -} diff --git a/lib/api_sub_project/src/model/access_token_response.dart b/lib/api_sub_project/src/model/access_token_response.dart deleted file mode 100644 index c7e4b29..0000000 --- a/lib/api_sub_project/src/model/access_token_response.dart +++ /dev/null @@ -1,106 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'access_token_response.g.dart'; - -/// AccessTokenResponse -/// -/// Properties: -/// * [accessToken] -@BuiltValue() -abstract class AccessTokenResponse implements Built { - @BuiltValueField(wireName: r'access_token') - String get accessToken; - - AccessTokenResponse._(); - - factory AccessTokenResponse([void updates(AccessTokenResponseBuilder b)]) = _$AccessTokenResponse; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(AccessTokenResponseBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AccessTokenResponseSerializer(); -} - -class _$AccessTokenResponseSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [AccessTokenResponse, _$AccessTokenResponse]; - - @override - final String wireName = r'AccessTokenResponse'; - - Iterable _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 serializedList, - required AccessTokenResponseBuilder result, - required List 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/access_token_response.g.dart b/lib/api_sub_project/src/model/access_token_response.g.dart deleted file mode 100644 index 8432dd4..0000000 --- a/lib/api_sub_project/src/model/access_token_response.g.dart +++ /dev/null @@ -1,98 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'access_token_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$AccessTokenResponse extends AccessTokenResponse { - @override - final String accessToken; - - factory _$AccessTokenResponse( - [void Function(AccessTokenResponseBuilder)? updates]) => - (new AccessTokenResponseBuilder()..update(updates))._build(); - - _$AccessTokenResponse._({required this.accessToken}) : super._() { - BuiltValueNullFieldError.checkNotNull( - accessToken, r'AccessTokenResponse', 'accessToken'); - } - - @override - AccessTokenResponse rebuild( - void Function(AccessTokenResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - AccessTokenResponseBuilder toBuilder() => - new AccessTokenResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is AccessTokenResponse && accessToken == other.accessToken; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, accessToken.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'AccessTokenResponse') - ..add('accessToken', accessToken)) - .toString(); - } -} - -class AccessTokenResponseBuilder - implements Builder { - _$AccessTokenResponse? _$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 diff --git a/lib/api_sub_project/src/model/auth_model.dart b/lib/api_sub_project/src/model/auth_model.dart deleted file mode 100644 index d1c736e..0000000 --- a/lib/api_sub_project/src/model/auth_model.dart +++ /dev/null @@ -1,122 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'auth_model.g.dart'; - -/// AuthModel -/// -/// Properties: -/// * [username] -/// * [password] -@BuiltValue() -abstract class AuthModel implements Built { - @BuiltValueField(wireName: r'username') - String get username; - - @BuiltValueField(wireName: r'password') - String get password; - - AuthModel._(); - - factory AuthModel([void updates(AuthModelBuilder b)]) = _$AuthModel; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(AuthModelBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$AuthModelSerializer(); -} - -class _$AuthModelSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [AuthModel, _$AuthModel]; - - @override - final String wireName = r'AuthModel'; - - Iterable _serializeProperties( - Serializers serializers, - AuthModel object, { - FullType specifiedType = FullType.unspecified, - }) sync* { - yield r'username'; - yield serializers.serialize( - object.username, - specifiedType: const FullType(String), - ); - yield r'password'; - yield serializers.serialize( - object.password, - specifiedType: const FullType(String), - ); - } - - @override - Object serialize( - Serializers serializers, - AuthModel object, { - FullType specifiedType = FullType.unspecified, - }) { - return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); - } - - void _deserializeProperties( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - required List serializedList, - required AuthModelBuilder result, - required List unhandled, - }) { - for (var i = 0; i < serializedList.length; i += 2) { - final key = serializedList[i] as String; - final value = serializedList[i + 1]; - switch (key) { - case r'username': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.username = valueDes; - break; - case r'password': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.password = valueDes; - break; - default: - unhandled.add(key); - unhandled.add(value); - break; - } - } - } - - @override - AuthModel deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = AuthModelBuilder(); - final serializedList = (serialized as Iterable).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/auth_model.g.dart b/lib/api_sub_project/src/model/auth_model.g.dart deleted file mode 100644 index f95dd71..0000000 --- a/lib/api_sub_project/src/model/auth_model.g.dart +++ /dev/null @@ -1,107 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'auth_model.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$AuthModel extends AuthModel { - @override - final String username; - @override - final String password; - - factory _$AuthModel([void Function(AuthModelBuilder)? updates]) => - (new AuthModelBuilder()..update(updates))._build(); - - _$AuthModel._({required this.username, required this.password}) : super._() { - BuiltValueNullFieldError.checkNotNull(username, r'AuthModel', 'username'); - BuiltValueNullFieldError.checkNotNull(password, r'AuthModel', 'password'); - } - - @override - AuthModel rebuild(void Function(AuthModelBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - AuthModelBuilder toBuilder() => new AuthModelBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is AuthModel && - username == other.username && - password == other.password; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, username.hashCode); - _$hash = $jc(_$hash, password.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'AuthModel') - ..add('username', username) - ..add('password', password)) - .toString(); - } -} - -class AuthModelBuilder implements Builder { - _$AuthModel? _$v; - - String? _username; - String? get username => _$this._username; - set username(String? username) => _$this._username = username; - - String? _password; - String? get password => _$this._password; - set password(String? password) => _$this._password = password; - - AuthModelBuilder() { - AuthModel._defaults(this); - } - - AuthModelBuilder get _$this { - final $v = _$v; - if ($v != null) { - _username = $v.username; - _password = $v.password; - _$v = null; - } - return this; - } - - @override - void replace(AuthModel other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$AuthModel; - } - - @override - void update(void Function(AuthModelBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - AuthModel build() => _build(); - - _$AuthModel _build() { - final _$result = _$v ?? - new _$AuthModel._( - username: BuiltValueNullFieldError.checkNotNull( - username, r'AuthModel', 'username'), - password: BuiltValueNullFieldError.checkNotNull( - password, r'AuthModel', 'password')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.dart b/lib/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.dart deleted file mode 100644 index 45b0d05..0000000 --- a/lib/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.dart +++ /dev/null @@ -1,123 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'body_update_item_in_table_items_table_name_post.g.dart'; - -/// BodyUpdateItemInTableItemsTableNamePost -/// -/// Properties: -/// * [item] -/// * [oldItem] -@BuiltValue() -abstract class BodyUpdateItemInTableItemsTableNamePost implements Built { - @BuiltValueField(wireName: r'item') - BuiltMap get item; - - @BuiltValueField(wireName: r'oldItem') - BuiltMap get oldItem; - - BodyUpdateItemInTableItemsTableNamePost._(); - - factory BodyUpdateItemInTableItemsTableNamePost([void updates(BodyUpdateItemInTableItemsTableNamePostBuilder b)]) = _$BodyUpdateItemInTableItemsTableNamePost; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(BodyUpdateItemInTableItemsTableNamePostBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$BodyUpdateItemInTableItemsTableNamePostSerializer(); -} - -class _$BodyUpdateItemInTableItemsTableNamePostSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [BodyUpdateItemInTableItemsTableNamePost, _$BodyUpdateItemInTableItemsTableNamePost]; - - @override - final String wireName = r'BodyUpdateItemInTableItemsTableNamePost'; - - Iterable _serializeProperties( - Serializers serializers, - BodyUpdateItemInTableItemsTableNamePost object, { - FullType specifiedType = FullType.unspecified, - }) sync* { - yield r'item'; - yield serializers.serialize( - object.item, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]), - ); - yield r'oldItem'; - yield serializers.serialize( - object.oldItem, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]), - ); - } - - @override - Object serialize( - Serializers serializers, - BodyUpdateItemInTableItemsTableNamePost object, { - FullType specifiedType = FullType.unspecified, - }) { - return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); - } - - void _deserializeProperties( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - required List serializedList, - required BodyUpdateItemInTableItemsTableNamePostBuilder result, - required List unhandled, - }) { - for (var i = 0; i < serializedList.length; i += 2) { - final key = serializedList[i] as String; - final value = serializedList[i + 1]; - switch (key) { - case r'item': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]), - ) as BuiltMap; - result.item.replace(valueDes); - break; - case r'oldItem': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(BuiltMap, [FullType(String), FullType(String)]), - ) as BuiltMap; - result.oldItem.replace(valueDes); - break; - default: - unhandled.add(key); - unhandled.add(value); - break; - } - } - } - - @override - BodyUpdateItemInTableItemsTableNamePost deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = BodyUpdateItemInTableItemsTableNamePostBuilder(); - final serializedList = (serialized as Iterable).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.g.dart b/lib/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.g.dart deleted file mode 100644 index 9f7fff4..0000000 --- a/lib/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.g.dart +++ /dev/null @@ -1,139 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'body_update_item_in_table_items_table_name_post.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$BodyUpdateItemInTableItemsTableNamePost - extends BodyUpdateItemInTableItemsTableNamePost { - @override - final BuiltMap item; - @override - final BuiltMap oldItem; - - factory _$BodyUpdateItemInTableItemsTableNamePost( - [void Function(BodyUpdateItemInTableItemsTableNamePostBuilder)? - updates]) => - (new BodyUpdateItemInTableItemsTableNamePostBuilder()..update(updates)) - ._build(); - - _$BodyUpdateItemInTableItemsTableNamePost._( - {required this.item, required this.oldItem}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - item, r'BodyUpdateItemInTableItemsTableNamePost', 'item'); - BuiltValueNullFieldError.checkNotNull( - oldItem, r'BodyUpdateItemInTableItemsTableNamePost', 'oldItem'); - } - - @override - BodyUpdateItemInTableItemsTableNamePost rebuild( - void Function(BodyUpdateItemInTableItemsTableNamePostBuilder) - updates) => - (toBuilder()..update(updates)).build(); - - @override - BodyUpdateItemInTableItemsTableNamePostBuilder toBuilder() => - new BodyUpdateItemInTableItemsTableNamePostBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is BodyUpdateItemInTableItemsTableNamePost && - item == other.item && - oldItem == other.oldItem; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, item.hashCode); - _$hash = $jc(_$hash, oldItem.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper( - r'BodyUpdateItemInTableItemsTableNamePost') - ..add('item', item) - ..add('oldItem', oldItem)) - .toString(); - } -} - -class BodyUpdateItemInTableItemsTableNamePostBuilder - implements - Builder { - _$BodyUpdateItemInTableItemsTableNamePost? _$v; - - MapBuilder? _item; - MapBuilder get item => - _$this._item ??= new MapBuilder(); - set item(MapBuilder? item) => _$this._item = item; - - MapBuilder? _oldItem; - MapBuilder get oldItem => - _$this._oldItem ??= new MapBuilder(); - set oldItem(MapBuilder? oldItem) => _$this._oldItem = oldItem; - - BodyUpdateItemInTableItemsTableNamePostBuilder() { - BodyUpdateItemInTableItemsTableNamePost._defaults(this); - } - - BodyUpdateItemInTableItemsTableNamePostBuilder get _$this { - final $v = _$v; - if ($v != null) { - _item = $v.item.toBuilder(); - _oldItem = $v.oldItem.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(BodyUpdateItemInTableItemsTableNamePost other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$BodyUpdateItemInTableItemsTableNamePost; - } - - @override - void update( - void Function(BodyUpdateItemInTableItemsTableNamePostBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - BodyUpdateItemInTableItemsTableNamePost build() => _build(); - - _$BodyUpdateItemInTableItemsTableNamePost _build() { - _$BodyUpdateItemInTableItemsTableNamePost _$result; - try { - _$result = _$v ?? - new _$BodyUpdateItemInTableItemsTableNamePost._( - item: item.build(), oldItem: oldItem.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'item'; - item.build(); - _$failedField = 'oldItem'; - oldItem.build(); - } catch (e) { - throw new BuiltValueNestedFieldError( - r'BodyUpdateItemInTableItemsTableNamePost', - _$failedField, - e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/api_sub_project/src/model/column_condition_compat.dart b/lib/api_sub_project/src/model/column_condition_compat.dart deleted file mode 100644 index 3c12118..0000000 --- a/lib/api_sub_project/src/model/column_condition_compat.dart +++ /dev/null @@ -1,179 +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 'column_condition_compat.g.dart'; - -/// ColumnConditionCompat -/// -/// Properties: -/// * [column] -/// * [operator_] -/// * [value] -@BuiltValue() -abstract class ColumnConditionCompat implements Built { - @BuiltValueField(wireName: r'column') - String get column; - - @BuiltValueField(wireName: r'operator') - ColumnConditionCompatOperator_Enum get operator_; - // enum operator_Enum { eq, ne, gt, lt, ge, le, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, }; - - @BuiltValueField(wireName: r'value') - JsonObject? get value; - - ColumnConditionCompat._(); - - factory ColumnConditionCompat([void updates(ColumnConditionCompatBuilder b)]) = _$ColumnConditionCompat; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ColumnConditionCompatBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ColumnConditionCompatSerializer(); -} - -class _$ColumnConditionCompatSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [ColumnConditionCompat, _$ColumnConditionCompat]; - - @override - final String wireName = r'ColumnConditionCompat'; - - Iterable _serializeProperties( - Serializers serializers, - ColumnConditionCompat object, { - FullType specifiedType = FullType.unspecified, - }) sync* { - yield r'column'; - yield serializers.serialize( - object.column, - specifiedType: const FullType(String), - ); - yield r'operator'; - yield serializers.serialize( - object.operator_, - specifiedType: const FullType(ColumnConditionCompatOperator_Enum), - ); - if (object.value != null) { - yield r'value'; - yield serializers.serialize( - object.value, - specifiedType: const FullType.nullable(JsonObject), - ); - } - } - - @override - Object serialize( - Serializers serializers, - ColumnConditionCompat object, { - FullType specifiedType = FullType.unspecified, - }) { - return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); - } - - void _deserializeProperties( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - required List serializedList, - required ColumnConditionCompatBuilder result, - required List unhandled, - }) { - for (var i = 0; i < serializedList.length; i += 2) { - final key = serializedList[i] as String; - final value = serializedList[i + 1]; - switch (key) { - case r'column': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.column = valueDes; - break; - case r'operator': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(ColumnConditionCompatOperator_Enum), - ) as ColumnConditionCompatOperator_Enum; - result.operator_ = valueDes; - break; - case r'value': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType.nullable(JsonObject), - ) as JsonObject?; - if (valueDes == null) continue; - result.value = valueDes; - break; - default: - unhandled.add(key); - unhandled.add(value); - break; - } - } - } - - @override - ColumnConditionCompat deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = ColumnConditionCompatBuilder(); - final serializedList = (serialized as Iterable).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - -class ColumnConditionCompatOperator_Enum extends EnumClass { - - @BuiltValueEnumConst(wireName: r'eq') - static const ColumnConditionCompatOperator_Enum eq = _$columnConditionCompatOperatorEnum_eq; - @BuiltValueEnumConst(wireName: r'ne') - static const ColumnConditionCompatOperator_Enum ne = _$columnConditionCompatOperatorEnum_ne; - @BuiltValueEnumConst(wireName: r'gt') - static const ColumnConditionCompatOperator_Enum gt = _$columnConditionCompatOperatorEnum_gt; - @BuiltValueEnumConst(wireName: r'lt') - static const ColumnConditionCompatOperator_Enum lt = _$columnConditionCompatOperatorEnum_lt; - @BuiltValueEnumConst(wireName: r'ge') - static const ColumnConditionCompatOperator_Enum ge = _$columnConditionCompatOperatorEnum_ge; - @BuiltValueEnumConst(wireName: r'le') - static const ColumnConditionCompatOperator_Enum le = _$columnConditionCompatOperatorEnum_le; - @BuiltValueEnumConst(wireName: r'contains') - static const ColumnConditionCompatOperator_Enum contains = _$columnConditionCompatOperatorEnum_contains; - @BuiltValueEnumConst(wireName: r'not_contains') - static const ColumnConditionCompatOperator_Enum notContains = _$columnConditionCompatOperatorEnum_notContains; - @BuiltValueEnumConst(wireName: r'starts_with') - static const ColumnConditionCompatOperator_Enum startsWith = _$columnConditionCompatOperatorEnum_startsWith; - @BuiltValueEnumConst(wireName: r'not_starts_with') - static const ColumnConditionCompatOperator_Enum notStartsWith = _$columnConditionCompatOperatorEnum_notStartsWith; - @BuiltValueEnumConst(wireName: r'ends_with') - static const ColumnConditionCompatOperator_Enum endsWith = _$columnConditionCompatOperatorEnum_endsWith; - @BuiltValueEnumConst(wireName: r'not_ends_with') - static const ColumnConditionCompatOperator_Enum notEndsWith = _$columnConditionCompatOperatorEnum_notEndsWith; - - static Serializer get serializer => _$columnConditionCompatOperatorEnumSerializer; - - const ColumnConditionCompatOperator_Enum._(String name): super(name); - - static BuiltSet get values => _$columnConditionCompatOperatorEnumValues; - static ColumnConditionCompatOperator_Enum valueOf(String name) => _$columnConditionCompatOperatorEnumValueOf(name); -} - diff --git a/lib/api_sub_project/src/model/column_condition_compat.g.dart b/lib/api_sub_project/src/model/column_condition_compat.g.dart deleted file mode 100644 index 1e50ab6..0000000 --- a/lib/api_sub_project/src/model/column_condition_compat.g.dart +++ /dev/null @@ -1,267 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'column_condition_compat.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_eq = - const ColumnConditionCompatOperator_Enum._('eq'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_ne = - const ColumnConditionCompatOperator_Enum._('ne'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_gt = - const ColumnConditionCompatOperator_Enum._('gt'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_lt = - const ColumnConditionCompatOperator_Enum._('lt'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_ge = - const ColumnConditionCompatOperator_Enum._('ge'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_le = - const ColumnConditionCompatOperator_Enum._('le'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_contains = - const ColumnConditionCompatOperator_Enum._('contains'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_notContains = - const ColumnConditionCompatOperator_Enum._('notContains'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_startsWith = - const ColumnConditionCompatOperator_Enum._('startsWith'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_notStartsWith = - const ColumnConditionCompatOperator_Enum._('notStartsWith'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_endsWith = - const ColumnConditionCompatOperator_Enum._('endsWith'); -const ColumnConditionCompatOperator_Enum - _$columnConditionCompatOperatorEnum_notEndsWith = - const ColumnConditionCompatOperator_Enum._('notEndsWith'); - -ColumnConditionCompatOperator_Enum _$columnConditionCompatOperatorEnumValueOf( - String name) { - switch (name) { - case 'eq': - return _$columnConditionCompatOperatorEnum_eq; - case 'ne': - return _$columnConditionCompatOperatorEnum_ne; - case 'gt': - return _$columnConditionCompatOperatorEnum_gt; - case 'lt': - return _$columnConditionCompatOperatorEnum_lt; - case 'ge': - return _$columnConditionCompatOperatorEnum_ge; - case 'le': - return _$columnConditionCompatOperatorEnum_le; - case 'contains': - return _$columnConditionCompatOperatorEnum_contains; - case 'notContains': - return _$columnConditionCompatOperatorEnum_notContains; - case 'startsWith': - return _$columnConditionCompatOperatorEnum_startsWith; - case 'notStartsWith': - return _$columnConditionCompatOperatorEnum_notStartsWith; - case 'endsWith': - return _$columnConditionCompatOperatorEnum_endsWith; - case 'notEndsWith': - return _$columnConditionCompatOperatorEnum_notEndsWith; - default: - throw new ArgumentError(name); - } -} - -final BuiltSet - _$columnConditionCompatOperatorEnumValues = new BuiltSet< - ColumnConditionCompatOperator_Enum>(const [ - _$columnConditionCompatOperatorEnum_eq, - _$columnConditionCompatOperatorEnum_ne, - _$columnConditionCompatOperatorEnum_gt, - _$columnConditionCompatOperatorEnum_lt, - _$columnConditionCompatOperatorEnum_ge, - _$columnConditionCompatOperatorEnum_le, - _$columnConditionCompatOperatorEnum_contains, - _$columnConditionCompatOperatorEnum_notContains, - _$columnConditionCompatOperatorEnum_startsWith, - _$columnConditionCompatOperatorEnum_notStartsWith, - _$columnConditionCompatOperatorEnum_endsWith, - _$columnConditionCompatOperatorEnum_notEndsWith, -]); - -Serializer - _$columnConditionCompatOperatorEnumSerializer = - new _$ColumnConditionCompatOperator_EnumSerializer(); - -class _$ColumnConditionCompatOperator_EnumSerializer - implements PrimitiveSerializer { - static const Map _toWire = const { - 'eq': 'eq', - 'ne': 'ne', - 'gt': 'gt', - 'lt': 'lt', - 'ge': 'ge', - 'le': 'le', - 'contains': 'contains', - 'notContains': 'not_contains', - 'startsWith': 'starts_with', - 'notStartsWith': 'not_starts_with', - 'endsWith': 'ends_with', - 'notEndsWith': 'not_ends_with', - }; - static const Map _fromWire = const { - 'eq': 'eq', - 'ne': 'ne', - 'gt': 'gt', - 'lt': 'lt', - 'ge': 'ge', - 'le': 'le', - 'contains': 'contains', - 'not_contains': 'notContains', - 'starts_with': 'startsWith', - 'not_starts_with': 'notStartsWith', - 'ends_with': 'endsWith', - 'not_ends_with': 'notEndsWith', - }; - - @override - final Iterable types = const [ColumnConditionCompatOperator_Enum]; - @override - final String wireName = 'ColumnConditionCompatOperator_Enum'; - - @override - Object serialize( - Serializers serializers, ColumnConditionCompatOperator_Enum object, - {FullType specifiedType = FullType.unspecified}) => - _toWire[object.name] ?? object.name; - - @override - ColumnConditionCompatOperator_Enum deserialize( - Serializers serializers, Object serialized, - {FullType specifiedType = FullType.unspecified}) => - ColumnConditionCompatOperator_Enum.valueOf( - _fromWire[serialized] ?? (serialized is String ? serialized : '')); -} - -class _$ColumnConditionCompat extends ColumnConditionCompat { - @override - final String column; - @override - final ColumnConditionCompatOperator_Enum operator_; - @override - final JsonObject? value; - - factory _$ColumnConditionCompat( - [void Function(ColumnConditionCompatBuilder)? updates]) => - (new ColumnConditionCompatBuilder()..update(updates))._build(); - - _$ColumnConditionCompat._( - {required this.column, required this.operator_, this.value}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - column, r'ColumnConditionCompat', 'column'); - BuiltValueNullFieldError.checkNotNull( - operator_, r'ColumnConditionCompat', 'operator_'); - } - - @override - ColumnConditionCompat rebuild( - void Function(ColumnConditionCompatBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ColumnConditionCompatBuilder toBuilder() => - new ColumnConditionCompatBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ColumnConditionCompat && - column == other.column && - operator_ == other.operator_ && - value == other.value; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, column.hashCode); - _$hash = $jc(_$hash, operator_.hashCode); - _$hash = $jc(_$hash, value.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ColumnConditionCompat') - ..add('column', column) - ..add('operator_', operator_) - ..add('value', value)) - .toString(); - } -} - -class ColumnConditionCompatBuilder - implements Builder { - _$ColumnConditionCompat? _$v; - - String? _column; - String? get column => _$this._column; - set column(String? column) => _$this._column = column; - - ColumnConditionCompatOperator_Enum? _operator_; - ColumnConditionCompatOperator_Enum? get operator_ => _$this._operator_; - set operator_(ColumnConditionCompatOperator_Enum? operator_) => - _$this._operator_ = operator_; - - JsonObject? _value; - JsonObject? get value => _$this._value; - set value(JsonObject? value) => _$this._value = value; - - ColumnConditionCompatBuilder() { - ColumnConditionCompat._defaults(this); - } - - ColumnConditionCompatBuilder get _$this { - final $v = _$v; - if ($v != null) { - _column = $v.column; - _operator_ = $v.operator_; - _value = $v.value; - _$v = null; - } - return this; - } - - @override - void replace(ColumnConditionCompat other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$ColumnConditionCompat; - } - - @override - void update(void Function(ColumnConditionCompatBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - ColumnConditionCompat build() => _build(); - - _$ColumnConditionCompat _build() { - final _$result = _$v ?? - new _$ColumnConditionCompat._( - column: BuiltValueNullFieldError.checkNotNull( - column, r'ColumnConditionCompat', 'column'), - operator_: BuiltValueNullFieldError.checkNotNull( - operator_, r'ColumnConditionCompat', 'operator_'), - value: value); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/api_sub_project/src/model/create_asset_response.dart b/lib/api_sub_project/src/model/create_asset_response.dart deleted file mode 100644 index ef2943a..0000000 --- a/lib/api_sub_project/src/model/create_asset_response.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'create_asset_response.g.dart'; - -/// CreateAssetResponse -/// -/// Properties: -/// * [ok] -/// * [fid] -@BuiltValue() -abstract class CreateAssetResponse implements Built { - @BuiltValueField(wireName: r'ok') - bool? get ok; - - @BuiltValueField(wireName: r'fid') - String get fid; - - CreateAssetResponse._(); - - factory CreateAssetResponse([void updates(CreateAssetResponseBuilder b)]) = _$CreateAssetResponse; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(CreateAssetResponseBuilder b) => b - ..ok = true; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CreateAssetResponseSerializer(); -} - -class _$CreateAssetResponseSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [CreateAssetResponse, _$CreateAssetResponse]; - - @override - final String wireName = r'CreateAssetResponse'; - - Iterable _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 serializedList, - required CreateAssetResponseBuilder result, - required List 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/create_asset_response.g.dart b/lib/api_sub_project/src/model/create_asset_response.g.dart deleted file mode 100644 index adfdeae..0000000 --- a/lib/api_sub_project/src/model/create_asset_response.g.dart +++ /dev/null @@ -1,107 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'create_asset_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CreateAssetResponse extends CreateAssetResponse { - @override - final bool? ok; - @override - final String fid; - - factory _$CreateAssetResponse( - [void Function(CreateAssetResponseBuilder)? updates]) => - (new CreateAssetResponseBuilder()..update(updates))._build(); - - _$CreateAssetResponse._({this.ok, required this.fid}) : super._() { - BuiltValueNullFieldError.checkNotNull(fid, r'CreateAssetResponse', 'fid'); - } - - @override - CreateAssetResponse rebuild( - void Function(CreateAssetResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CreateAssetResponseBuilder toBuilder() => - new CreateAssetResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CreateAssetResponse && ok == other.ok && fid == other.fid; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, ok.hashCode); - _$hash = $jc(_$hash, fid.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CreateAssetResponse') - ..add('ok', ok) - ..add('fid', fid)) - .toString(); - } -} - -class CreateAssetResponseBuilder - implements Builder { - _$CreateAssetResponse? _$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 diff --git a/lib/api_sub_project/src/model/create_user_definition.dart b/lib/api_sub_project/src/model/create_user_definition.dart deleted file mode 100644 index 92e0270..0000000 --- a/lib/api_sub_project/src/model/create_user_definition.dart +++ /dev/null @@ -1,122 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'create_user_definition.g.dart'; - -/// CreateUserDefinition -/// -/// Properties: -/// * [username] -/// * [password] -@BuiltValue() -abstract class CreateUserDefinition implements Built { - @BuiltValueField(wireName: r'username') - String get username; - - @BuiltValueField(wireName: r'password') - String get password; - - CreateUserDefinition._(); - - factory CreateUserDefinition([void updates(CreateUserDefinitionBuilder b)]) = _$CreateUserDefinition; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(CreateUserDefinitionBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$CreateUserDefinitionSerializer(); -} - -class _$CreateUserDefinitionSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [CreateUserDefinition, _$CreateUserDefinition]; - - @override - final String wireName = r'CreateUserDefinition'; - - Iterable _serializeProperties( - Serializers serializers, - CreateUserDefinition object, { - FullType specifiedType = FullType.unspecified, - }) sync* { - yield r'username'; - yield serializers.serialize( - object.username, - specifiedType: const FullType(String), - ); - yield r'password'; - yield serializers.serialize( - object.password, - specifiedType: const FullType(String), - ); - } - - @override - Object serialize( - Serializers serializers, - CreateUserDefinition object, { - FullType specifiedType = FullType.unspecified, - }) { - return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); - } - - void _deserializeProperties( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - required List serializedList, - required CreateUserDefinitionBuilder result, - required List unhandled, - }) { - for (var i = 0; i < serializedList.length; i += 2) { - final key = serializedList[i] as String; - final value = serializedList[i + 1]; - switch (key) { - case r'username': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.username = valueDes; - break; - case r'password': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.password = valueDes; - break; - default: - unhandled.add(key); - unhandled.add(value); - break; - } - } - } - - @override - CreateUserDefinition deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = CreateUserDefinitionBuilder(); - final serializedList = (serialized as Iterable).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/create_user_definition.g.dart b/lib/api_sub_project/src/model/create_user_definition.g.dart deleted file mode 100644 index 86be5d8..0000000 --- a/lib/api_sub_project/src/model/create_user_definition.g.dart +++ /dev/null @@ -1,114 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'create_user_definition.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$CreateUserDefinition extends CreateUserDefinition { - @override - final String username; - @override - final String password; - - factory _$CreateUserDefinition( - [void Function(CreateUserDefinitionBuilder)? updates]) => - (new CreateUserDefinitionBuilder()..update(updates))._build(); - - _$CreateUserDefinition._({required this.username, required this.password}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - username, r'CreateUserDefinition', 'username'); - BuiltValueNullFieldError.checkNotNull( - password, r'CreateUserDefinition', 'password'); - } - - @override - CreateUserDefinition rebuild( - void Function(CreateUserDefinitionBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - CreateUserDefinitionBuilder toBuilder() => - new CreateUserDefinitionBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is CreateUserDefinition && - username == other.username && - password == other.password; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, username.hashCode); - _$hash = $jc(_$hash, password.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'CreateUserDefinition') - ..add('username', username) - ..add('password', password)) - .toString(); - } -} - -class CreateUserDefinitionBuilder - implements Builder { - _$CreateUserDefinition? _$v; - - String? _username; - String? get username => _$this._username; - set username(String? username) => _$this._username = username; - - String? _password; - String? get password => _$this._password; - set password(String? password) => _$this._password = password; - - CreateUserDefinitionBuilder() { - CreateUserDefinition._defaults(this); - } - - CreateUserDefinitionBuilder get _$this { - final $v = _$v; - if ($v != null) { - _username = $v.username; - _password = $v.password; - _$v = null; - } - return this; - } - - @override - void replace(CreateUserDefinition other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$CreateUserDefinition; - } - - @override - void update(void Function(CreateUserDefinitionBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - CreateUserDefinition build() => _build(); - - _$CreateUserDefinition _build() { - final _$result = _$v ?? - new _$CreateUserDefinition._( - username: BuiltValueNullFieldError.checkNotNull( - username, r'CreateUserDefinition', 'username'), - password: BuiltValueNullFieldError.checkNotNull( - password, r'CreateUserDefinition', 'password')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/api_sub_project/src/model/date.dart b/lib/api_sub_project/src/model/date.dart deleted file mode 100644 index b21c7f5..0000000 --- a/lib/api_sub_project/src/model/date.dart +++ /dev/null @@ -1,70 +0,0 @@ -/// A gregorian calendar date generated by -/// OpenAPI generator to differentiate -/// between [DateTime] and [Date] formats. -class Date implements Comparable { - 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); -} diff --git a/lib/api_sub_project/src/model/error_response.dart b/lib/api_sub_project/src/model/error_response.dart deleted file mode 100644 index a11a492..0000000 --- a/lib/api_sub_project/src/model/error_response.dart +++ /dev/null @@ -1,106 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'error_response.g.dart'; - -/// ErrorResponse -/// -/// Properties: -/// * [error] -@BuiltValue() -abstract class ErrorResponse implements Built { - @BuiltValueField(wireName: r'error') - String get error; - - ErrorResponse._(); - - factory ErrorResponse([void updates(ErrorResponseBuilder b)]) = _$ErrorResponse; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ErrorResponseBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ErrorResponseSerializer(); -} - -class _$ErrorResponseSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [ErrorResponse, _$ErrorResponse]; - - @override - final String wireName = r'ErrorResponse'; - - Iterable _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 serializedList, - required ErrorResponseBuilder result, - required List 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/error_response.g.dart b/lib/api_sub_project/src/model/error_response.g.dart deleted file mode 100644 index 3d1df13..0000000 --- a/lib/api_sub_project/src/model/error_response.g.dart +++ /dev/null @@ -1,93 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'error_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ErrorResponse extends ErrorResponse { - @override - final String error; - - factory _$ErrorResponse([void Function(ErrorResponseBuilder)? updates]) => - (new ErrorResponseBuilder()..update(updates))._build(); - - _$ErrorResponse._({required this.error}) : super._() { - BuiltValueNullFieldError.checkNotNull(error, r'ErrorResponse', 'error'); - } - - @override - ErrorResponse rebuild(void Function(ErrorResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ErrorResponseBuilder toBuilder() => new ErrorResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ErrorResponse && error == other.error; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, error.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ErrorResponse')..add('error', error)) - .toString(); - } -} - -class ErrorResponseBuilder - implements Builder { - _$ErrorResponse? _$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 diff --git a/lib/api_sub_project/src/model/http_validation_error.dart b/lib/api_sub_project/src/model/http_validation_error.dart deleted file mode 100644 index 3917b2d..0000000 --- a/lib/api_sub_project/src/model/http_validation_error.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_collection/built_collection.dart'; -import 'package:tuuli_app/api_sub_project/src/model/validation_error.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'http_validation_error.g.dart'; - -/// HTTPValidationError -/// -/// Properties: -/// * [detail] -@BuiltValue() -abstract class HTTPValidationError - implements Built { - @BuiltValueField(wireName: r'detail') - BuiltList? get detail; - - HTTPValidationError._(); - - factory HTTPValidationError([void updates(HTTPValidationErrorBuilder b)]) = - _$HTTPValidationError; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(HTTPValidationErrorBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => - _$HTTPValidationErrorSerializer(); -} - -class _$HTTPValidationErrorSerializer - implements PrimitiveSerializer { - @override - final Iterable types = const [ - HTTPValidationError, - _$HTTPValidationError - ]; - - @override - final String wireName = r'HTTPValidationError'; - - Iterable _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 serializedList, - required HTTPValidationErrorBuilder result, - required List 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; - 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} diff --git a/lib/api_sub_project/src/model/http_validation_error.g.dart b/lib/api_sub_project/src/model/http_validation_error.g.dart deleted file mode 100644 index 40ab1a8..0000000 --- a/lib/api_sub_project/src/model/http_validation_error.g.dart +++ /dev/null @@ -1,106 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'http_validation_error.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$HTTPValidationError extends HTTPValidationError { - @override - final BuiltList? detail; - - factory _$HTTPValidationError( - [void Function(HTTPValidationErrorBuilder)? updates]) => - (new HTTPValidationErrorBuilder()..update(updates))._build(); - - _$HTTPValidationError._({this.detail}) : super._(); - - @override - HTTPValidationError rebuild( - void Function(HTTPValidationErrorBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - HTTPValidationErrorBuilder toBuilder() => - new HTTPValidationErrorBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is HTTPValidationError && detail == other.detail; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, detail.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'HTTPValidationError') - ..add('detail', detail)) - .toString(); - } -} - -class HTTPValidationErrorBuilder - implements Builder { - _$HTTPValidationError? _$v; - - ListBuilder? _detail; - ListBuilder get detail => - _$this._detail ??= new ListBuilder(); - set detail(ListBuilder? 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 diff --git a/lib/api_sub_project/src/model/items_field_selector_list.dart b/lib/api_sub_project/src/model/items_field_selector_list.dart deleted file mode 100644 index 9d04644..0000000 --- a/lib/api_sub_project/src/model/items_field_selector_list.dart +++ /dev/null @@ -1,110 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_collection/built_collection.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'items_field_selector_list.g.dart'; - -/// ItemsFieldSelectorList -/// -/// Properties: -/// * [fields] -@BuiltValue() -abstract class ItemsFieldSelectorList implements Built { - @BuiltValueField(wireName: r'fields') - BuiltList? get fields; - - ItemsFieldSelectorList._(); - - factory ItemsFieldSelectorList([void updates(ItemsFieldSelectorListBuilder b)]) = _$ItemsFieldSelectorList; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ItemsFieldSelectorListBuilder b) => b - ..fields = ListBuilder(); - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$ItemsFieldSelectorListSerializer(); -} - -class _$ItemsFieldSelectorListSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [ItemsFieldSelectorList, _$ItemsFieldSelectorList]; - - @override - final String wireName = r'ItemsFieldSelectorList'; - - Iterable _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 serializedList, - required ItemsFieldSelectorListBuilder result, - required List 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; - 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/items_field_selector_list.g.dart b/lib/api_sub_project/src/model/items_field_selector_list.g.dart deleted file mode 100644 index 18d1543..0000000 --- a/lib/api_sub_project/src/model/items_field_selector_list.g.dart +++ /dev/null @@ -1,107 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'items_field_selector_list.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ItemsFieldSelectorList extends ItemsFieldSelectorList { - @override - final BuiltList? fields; - - factory _$ItemsFieldSelectorList( - [void Function(ItemsFieldSelectorListBuilder)? updates]) => - (new ItemsFieldSelectorListBuilder()..update(updates))._build(); - - _$ItemsFieldSelectorList._({this.fields}) : super._(); - - @override - ItemsFieldSelectorList rebuild( - void Function(ItemsFieldSelectorListBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ItemsFieldSelectorListBuilder toBuilder() => - new ItemsFieldSelectorListBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ItemsFieldSelectorList && fields == other.fields; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, fields.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ItemsFieldSelectorList') - ..add('fields', fields)) - .toString(); - } -} - -class ItemsFieldSelectorListBuilder - implements Builder { - _$ItemsFieldSelectorList? _$v; - - ListBuilder? _fields; - ListBuilder get fields => - _$this._fields ??= new ListBuilder(); - set fields(ListBuilder? 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 diff --git a/lib/api_sub_project/src/model/location_inner.dart b/lib/api_sub_project/src/model/location_inner.dart deleted file mode 100644 index 5a96d05..0000000 --- a/lib/api_sub_project/src/model/location_inner.dart +++ /dev/null @@ -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 { - /// 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 get serializer => _$LocationInnerSerializer(); -} - -class _$LocationInnerSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [LocationInner, _$LocationInner]; - - @override - final String wireName = r'LocationInner'; - - Iterable _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(); - } -} - diff --git a/lib/api_sub_project/src/model/location_inner.g.dart b/lib/api_sub_project/src/model/location_inner.g.dart deleted file mode 100644 index 0cbf218..0000000 --- a/lib/api_sub_project/src/model/location_inner.g.dart +++ /dev/null @@ -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? _$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 diff --git a/lib/api_sub_project/src/model/ok_response.dart b/lib/api_sub_project/src/model/ok_response.dart deleted file mode 100644 index 9450d1a..0000000 --- a/lib/api_sub_project/src/model/ok_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'ok_response.g.dart'; - -/// OkResponse -/// -/// Properties: -/// * [ok] -@BuiltValue() -abstract class OkResponse implements Built { - @BuiltValueField(wireName: r'ok') - bool? get ok; - - OkResponse._(); - - factory OkResponse([void updates(OkResponseBuilder b)]) = _$OkResponse; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(OkResponseBuilder b) => b - ..ok = true; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$OkResponseSerializer(); -} - -class _$OkResponseSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [OkResponse, _$OkResponse]; - - @override - final String wireName = r'OkResponse'; - - Iterable _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 serializedList, - required OkResponseBuilder result, - required List 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/ok_response.g.dart b/lib/api_sub_project/src/model/ok_response.g.dart deleted file mode 100644 index 10a1287..0000000 --- a/lib/api_sub_project/src/model/ok_response.g.dart +++ /dev/null @@ -1,87 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'ok_response.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$OkResponse extends OkResponse { - @override - final bool? ok; - - factory _$OkResponse([void Function(OkResponseBuilder)? updates]) => - (new OkResponseBuilder()..update(updates))._build(); - - _$OkResponse._({this.ok}) : super._(); - - @override - OkResponse rebuild(void Function(OkResponseBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - OkResponseBuilder toBuilder() => new OkResponseBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is OkResponse && ok == other.ok; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, ok.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'OkResponse')..add('ok', ok)) - .toString(); - } -} - -class OkResponseBuilder implements Builder { - _$OkResponse? _$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 diff --git a/lib/api_sub_project/src/model/table_definition.dart b/lib/api_sub_project/src/model/table_definition.dart deleted file mode 100644 index 0356392..0000000 --- a/lib/api_sub_project/src/model/table_definition.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'table_definition.g.dart'; - -/// TableDefinition -/// -/// Properties: -/// * [tableId] -/// * [tableName] -/// * [columns] -/// * [system] -/// * [hidden] -@BuiltValue() -abstract class TableDefinition implements Built { - @BuiltValueField(wireName: r'table_id') - String get tableId; - - @BuiltValueField(wireName: r'table_name') - String get tableName; - - @BuiltValueField(wireName: r'columns') - String get columns; - - @BuiltValueField(wireName: r'system') - bool get system; - - @BuiltValueField(wireName: r'hidden') - bool get hidden; - - TableDefinition._(); - - factory TableDefinition([void updates(TableDefinitionBuilder b)]) = _$TableDefinition; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(TableDefinitionBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$TableDefinitionSerializer(); -} - -class _$TableDefinitionSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [TableDefinition, _$TableDefinition]; - - @override - final String wireName = r'TableDefinition'; - - Iterable _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 serializedList, - required TableDefinitionBuilder result, - required List 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/table_definition.g.dart b/lib/api_sub_project/src/model/table_definition.g.dart deleted file mode 100644 index be971e9..0000000 --- a/lib/api_sub_project/src/model/table_definition.g.dart +++ /dev/null @@ -1,157 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'table_definition.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$TableDefinition extends TableDefinition { - @override - final String tableId; - @override - final String tableName; - @override - final String columns; - @override - final bool system; - @override - final bool hidden; - - factory _$TableDefinition([void Function(TableDefinitionBuilder)? updates]) => - (new TableDefinitionBuilder()..update(updates))._build(); - - _$TableDefinition._( - {required this.tableId, - required this.tableName, - required this.columns, - required this.system, - required this.hidden}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - tableId, r'TableDefinition', 'tableId'); - BuiltValueNullFieldError.checkNotNull( - tableName, r'TableDefinition', 'tableName'); - BuiltValueNullFieldError.checkNotNull( - columns, r'TableDefinition', 'columns'); - BuiltValueNullFieldError.checkNotNull(system, r'TableDefinition', 'system'); - BuiltValueNullFieldError.checkNotNull(hidden, r'TableDefinition', 'hidden'); - } - - @override - TableDefinition rebuild(void Function(TableDefinitionBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - TableDefinitionBuilder toBuilder() => - new TableDefinitionBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is TableDefinition && - tableId == other.tableId && - tableName == other.tableName && - columns == other.columns && - system == other.system && - hidden == other.hidden; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, tableId.hashCode); - _$hash = $jc(_$hash, tableName.hashCode); - _$hash = $jc(_$hash, columns.hashCode); - _$hash = $jc(_$hash, system.hashCode); - _$hash = $jc(_$hash, hidden.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'TableDefinition') - ..add('tableId', tableId) - ..add('tableName', tableName) - ..add('columns', columns) - ..add('system', system) - ..add('hidden', hidden)) - .toString(); - } -} - -class TableDefinitionBuilder - implements Builder { - _$TableDefinition? _$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 diff --git a/lib/api_sub_project/src/model/table_items_response.dart b/lib/api_sub_project/src/model/table_items_response.dart deleted file mode 100644 index fabf448..0000000 --- a/lib/api_sub_project/src/model/table_items_response.dart +++ /dev/null @@ -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 { - @BuiltValueField(wireName: r'items') - BuiltList get items; - - TableItemsResponse._(); - - factory TableItemsResponse([void updates(TableItemsResponseBuilder b)]) = _$TableItemsResponse; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(TableItemsResponseBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$TableItemsResponseSerializer(); -} - -class _$TableItemsResponseSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [TableItemsResponse, _$TableItemsResponse]; - - @override - final String wireName = r'TableItemsResponse'; - - Iterable _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 serializedList, - required TableItemsResponseBuilder result, - required List 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; - 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/table_items_response.g.dart b/lib/api_sub_project/src/model/table_items_response.g.dart deleted file mode 100644 index d104f56..0000000 --- a/lib/api_sub_project/src/model/table_items_response.g.dart +++ /dev/null @@ -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 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? _$v; - - ListBuilder? _items; - ListBuilder get items => - _$this._items ??= new ListBuilder(); - set items(ListBuilder? 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 diff --git a/lib/api_sub_project/src/model/user_update_definition.dart b/lib/api_sub_project/src/model/user_update_definition.dart deleted file mode 100644 index c1ba572..0000000 --- a/lib/api_sub_project/src/model/user_update_definition.dart +++ /dev/null @@ -1,138 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'user_update_definition.g.dart'; - -/// UserUpdateDefinition -/// -/// Properties: -/// * [userId] -/// * [password] -/// * [accessToken] -@BuiltValue() -abstract class UserUpdateDefinition implements Built { - @BuiltValueField(wireName: r'user_id') - int get userId; - - @BuiltValueField(wireName: r'password') - String get password; - - @BuiltValueField(wireName: r'access_token') - String get accessToken; - - UserUpdateDefinition._(); - - factory UserUpdateDefinition([void updates(UserUpdateDefinitionBuilder b)]) = _$UserUpdateDefinition; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(UserUpdateDefinitionBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => _$UserUpdateDefinitionSerializer(); -} - -class _$UserUpdateDefinitionSerializer implements PrimitiveSerializer { - @override - final Iterable types = const [UserUpdateDefinition, _$UserUpdateDefinition]; - - @override - final String wireName = r'UserUpdateDefinition'; - - Iterable _serializeProperties( - Serializers serializers, - UserUpdateDefinition object, { - FullType specifiedType = FullType.unspecified, - }) sync* { - yield r'user_id'; - yield serializers.serialize( - object.userId, - specifiedType: const FullType(int), - ); - yield r'password'; - yield serializers.serialize( - object.password, - specifiedType: const FullType(String), - ); - yield r'access_token'; - yield serializers.serialize( - object.accessToken, - specifiedType: const FullType(String), - ); - } - - @override - Object serialize( - Serializers serializers, - UserUpdateDefinition object, { - FullType specifiedType = FullType.unspecified, - }) { - return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); - } - - void _deserializeProperties( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - required List serializedList, - required UserUpdateDefinitionBuilder result, - required List unhandled, - }) { - for (var i = 0; i < serializedList.length; i += 2) { - final key = serializedList[i] as String; - final value = serializedList[i + 1]; - switch (key) { - case r'user_id': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(int), - ) as int; - result.userId = valueDes; - break; - case r'password': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.password = valueDes; - break; - case r'access_token': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.accessToken = valueDes; - break; - default: - unhandled.add(key); - unhandled.add(value); - break; - } - } - } - - @override - UserUpdateDefinition deserialize( - Serializers serializers, - Object serialized, { - FullType specifiedType = FullType.unspecified, - }) { - final result = UserUpdateDefinitionBuilder(); - final serializedList = (serialized as Iterable).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} - diff --git a/lib/api_sub_project/src/model/user_update_definition.g.dart b/lib/api_sub_project/src/model/user_update_definition.g.dart deleted file mode 100644 index 3db2653..0000000 --- a/lib/api_sub_project/src/model/user_update_definition.g.dart +++ /dev/null @@ -1,129 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'user_update_definition.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$UserUpdateDefinition extends UserUpdateDefinition { - @override - final int userId; - @override - final String password; - @override - final String accessToken; - - factory _$UserUpdateDefinition( - [void Function(UserUpdateDefinitionBuilder)? updates]) => - (new UserUpdateDefinitionBuilder()..update(updates))._build(); - - _$UserUpdateDefinition._( - {required this.userId, required this.password, required this.accessToken}) - : super._() { - BuiltValueNullFieldError.checkNotNull( - userId, r'UserUpdateDefinition', 'userId'); - BuiltValueNullFieldError.checkNotNull( - password, r'UserUpdateDefinition', 'password'); - BuiltValueNullFieldError.checkNotNull( - accessToken, r'UserUpdateDefinition', 'accessToken'); - } - - @override - UserUpdateDefinition rebuild( - void Function(UserUpdateDefinitionBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - UserUpdateDefinitionBuilder toBuilder() => - new UserUpdateDefinitionBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is UserUpdateDefinition && - userId == other.userId && - password == other.password && - accessToken == other.accessToken; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, userId.hashCode); - _$hash = $jc(_$hash, password.hashCode); - _$hash = $jc(_$hash, accessToken.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'UserUpdateDefinition') - ..add('userId', userId) - ..add('password', password) - ..add('accessToken', accessToken)) - .toString(); - } -} - -class UserUpdateDefinitionBuilder - implements Builder { - _$UserUpdateDefinition? _$v; - - int? _userId; - int? get userId => _$this._userId; - set userId(int? userId) => _$this._userId = userId; - - String? _password; - String? get password => _$this._password; - set password(String? password) => _$this._password = password; - - String? _accessToken; - String? get accessToken => _$this._accessToken; - set accessToken(String? accessToken) => _$this._accessToken = accessToken; - - UserUpdateDefinitionBuilder() { - UserUpdateDefinition._defaults(this); - } - - UserUpdateDefinitionBuilder get _$this { - final $v = _$v; - if ($v != null) { - _userId = $v.userId; - _password = $v.password; - _accessToken = $v.accessToken; - _$v = null; - } - return this; - } - - @override - void replace(UserUpdateDefinition other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$UserUpdateDefinition; - } - - @override - void update(void Function(UserUpdateDefinitionBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - UserUpdateDefinition build() => _build(); - - _$UserUpdateDefinition _build() { - final _$result = _$v ?? - new _$UserUpdateDefinition._( - userId: BuiltValueNullFieldError.checkNotNull( - userId, r'UserUpdateDefinition', 'userId'), - password: BuiltValueNullFieldError.checkNotNull( - password, r'UserUpdateDefinition', 'password'), - accessToken: BuiltValueNullFieldError.checkNotNull( - accessToken, r'UserUpdateDefinition', 'accessToken')); - replace(_$result); - return _$result; - } -} - -// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/api_sub_project/src/model/validation_error.dart b/lib/api_sub_project/src/model/validation_error.dart deleted file mode 100644 index 94c5428..0000000 --- a/lib/api_sub_project/src/model/validation_error.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -// ignore_for_file: unused_element -import 'package:built_collection/built_collection.dart'; -import 'package:tuuli_app/api_sub_project/src/model/location_inner.dart'; -import 'package:built_value/built_value.dart'; -import 'package:built_value/serializer.dart'; - -part 'validation_error.g.dart'; - -/// ValidationError -/// -/// Properties: -/// * [loc] -/// * [msg] -/// * [type] -@BuiltValue() -abstract class ValidationError - implements Built { - @BuiltValueField(wireName: r'loc') - BuiltList get loc; - - @BuiltValueField(wireName: r'msg') - String get msg; - - @BuiltValueField(wireName: r'type') - String get type; - - ValidationError._(); - - factory ValidationError([void updates(ValidationErrorBuilder b)]) = - _$ValidationError; - - @BuiltValueHook(initializeBuilder: true) - static void _defaults(ValidationErrorBuilder b) => b; - - @BuiltValueSerializer(custom: true) - static Serializer get serializer => - _$ValidationErrorSerializer(); -} - -class _$ValidationErrorSerializer - implements PrimitiveSerializer { - @override - final Iterable types = const [ValidationError, _$ValidationError]; - - @override - final String wireName = r'ValidationError'; - - Iterable _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 serializedList, - required ValidationErrorBuilder result, - required List 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; - 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).toList(); - final unhandled = []; - _deserializeProperties( - serializers, - serialized, - specifiedType: specifiedType, - serializedList: serializedList, - unhandled: unhandled, - result: result, - ); - return result.build(); - } -} diff --git a/lib/api_sub_project/src/model/validation_error.g.dart b/lib/api_sub_project/src/model/validation_error.g.dart deleted file mode 100644 index ff3d21b..0000000 --- a/lib/api_sub_project/src/model/validation_error.g.dart +++ /dev/null @@ -1,137 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'validation_error.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -class _$ValidationError extends ValidationError { - @override - final BuiltList loc; - @override - final String msg; - @override - final String type; - - factory _$ValidationError([void Function(ValidationErrorBuilder)? updates]) => - (new ValidationErrorBuilder()..update(updates))._build(); - - _$ValidationError._( - {required this.loc, required this.msg, required this.type}) - : super._() { - BuiltValueNullFieldError.checkNotNull(loc, r'ValidationError', 'loc'); - BuiltValueNullFieldError.checkNotNull(msg, r'ValidationError', 'msg'); - BuiltValueNullFieldError.checkNotNull(type, r'ValidationError', 'type'); - } - - @override - ValidationError rebuild(void Function(ValidationErrorBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - ValidationErrorBuilder toBuilder() => - new ValidationErrorBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is ValidationError && - loc == other.loc && - msg == other.msg && - type == other.type; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, loc.hashCode); - _$hash = $jc(_$hash, msg.hashCode); - _$hash = $jc(_$hash, type.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'ValidationError') - ..add('loc', loc) - ..add('msg', msg) - ..add('type', type)) - .toString(); - } -} - -class ValidationErrorBuilder - implements Builder { - _$ValidationError? _$v; - - ListBuilder? _loc; - ListBuilder get loc => - _$this._loc ??= new ListBuilder(); - set loc(ListBuilder? 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 diff --git a/lib/api_sub_project/src/serializers.dart b/lib/api_sub_project/src/serializers.dart deleted file mode 100644 index 238151e..0000000 --- a/lib/api_sub_project/src/serializers.dart +++ /dev/null @@ -1,72 +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_app/api_sub_project/src/date_serializer.dart'; -import 'package:tuuli_app/api_sub_project/src/model/date.dart'; - -import 'package:tuuli_app/api_sub_project/src/model/access_token_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/auth_model.dart'; -import 'package:tuuli_app/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.dart'; -import 'package:tuuli_app/api_sub_project/src/model/column_condition_compat.dart'; -import 'package:tuuli_app/api_sub_project/src/model/create_asset_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/create_user_definition.dart'; -import 'package:tuuli_app/api_sub_project/src/model/error_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/http_validation_error.dart'; -import 'package:tuuli_app/api_sub_project/src/model/items_field_selector_list.dart'; -import 'package:tuuli_app/api_sub_project/src/model/location_inner.dart'; -import 'package:tuuli_app/api_sub_project/src/model/ok_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/table_definition.dart'; -import 'package:tuuli_app/api_sub_project/src/model/table_items_response.dart'; -import 'package:tuuli_app/api_sub_project/src/model/user_update_definition.dart'; -import 'package:tuuli_app/api_sub_project/src/model/validation_error.dart'; - -part 'serializers.g.dart'; - -@SerializersFor([ - AccessTokenResponse, - AuthModel, - BodyUpdateItemInTableItemsTableNamePost, - ColumnConditionCompat, - CreateAssetResponse, - CreateUserDefinition, - ErrorResponse, - HTTPValidationError, - ItemsFieldSelectorList, - LocationInner, - OkResponse, - TableDefinition, - TableItemsResponse, - UserUpdateDefinition, - ValidationError, -]) -Serializers serializers = (_$serializers.toBuilder() - ..addBuilderFactory( - const FullType(BuiltList, [FullType(ColumnConditionCompat)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(String)]), - () => ListBuilder(), - ) - ..addBuilderFactory( - const FullType(BuiltList, [FullType(TableDefinition)]), - () => ListBuilder(), - ) - ..add(const OneOfSerializer()) - ..add(const AnyOfSerializer()) - ..add(const DateSerializer()) - ..add(Iso8601DateTimeSerializer())) - .build(); - -Serializers standardSerializers = - (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/lib/api_sub_project/src/serializers.g.dart b/lib/api_sub_project/src/serializers.g.dart deleted file mode 100644 index 2333d1c..0000000 --- a/lib/api_sub_project/src/serializers.g.dart +++ /dev/null @@ -1,48 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'serializers.dart'; - -// ************************************************************************** -// BuiltValueGenerator -// ************************************************************************** - -Serializers _$serializers = (new Serializers().toBuilder() - ..add(AccessTokenResponse.serializer) - ..add(AuthModel.serializer) - ..add(BodyUpdateItemInTableItemsTableNamePost.serializer) - ..add(ColumnConditionCompat.serializer) - ..add(ColumnConditionCompatOperator_Enum.serializer) - ..add(CreateAssetResponse.serializer) - ..add(CreateUserDefinition.serializer) - ..add(ErrorResponse.serializer) - ..add(HTTPValidationError.serializer) - ..add(ItemsFieldSelectorList.serializer) - ..add(LocationInner.serializer) - ..add(OkResponse.serializer) - ..add(TableDefinition.serializer) - ..add(TableItemsResponse.serializer) - ..add(UserUpdateDefinition.serializer) - ..add(ValidationError.serializer) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(JsonObject)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(LocationInner)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(String)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType(BuiltList, const [const FullType(ValidationError)]), - () => new ListBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder()) - ..addBuilderFactory( - const FullType( - BuiltMap, const [const FullType(String), const FullType(String)]), - () => new MapBuilder())) - .build(); - -// ignore_for_file: deprecated_member_use_from_same_package,type=lint diff --git a/lib/api_sub_project/tuuli_api.dart b/lib/api_sub_project/tuuli_api.dart deleted file mode 100644 index edb941b..0000000 --- a/lib/api_sub_project/tuuli_api.dart +++ /dev/null @@ -1,28 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// - -export 'package:tuuli_app/api_sub_project/src/api.dart'; -export 'package:tuuli_app/api_sub_project/src/auth/api_key_auth.dart'; -export 'package:tuuli_app/api_sub_project/src/auth/basic_auth.dart'; -export 'package:tuuli_app/api_sub_project/src/auth/oauth.dart'; -export 'package:tuuli_app/api_sub_project/src/serializers.dart'; -export 'package:tuuli_app/api_sub_project/src/model/date.dart'; - -export 'package:tuuli_app/api_sub_project/src/api/default_api.dart'; - -export 'package:tuuli_app/api_sub_project/src/model/access_token_response.dart'; -export 'package:tuuli_app/api_sub_project/src/model/auth_model.dart'; -export 'package:tuuli_app/api_sub_project/src/model/body_update_item_in_table_items_table_name_post.dart'; -export 'package:tuuli_app/api_sub_project/src/model/column_condition_compat.dart'; -export 'package:tuuli_app/api_sub_project/src/model/create_asset_response.dart'; -export 'package:tuuli_app/api_sub_project/src/model/create_user_definition.dart'; -export 'package:tuuli_app/api_sub_project/src/model/error_response.dart'; -export 'package:tuuli_app/api_sub_project/src/model/http_validation_error.dart'; -export 'package:tuuli_app/api_sub_project/src/model/items_field_selector_list.dart'; -export 'package:tuuli_app/api_sub_project/src/model/location_inner.dart'; -export 'package:tuuli_app/api_sub_project/src/model/ok_response.dart'; -export 'package:tuuli_app/api_sub_project/src/model/table_definition.dart'; -export 'package:tuuli_app/api_sub_project/src/model/table_items_response.dart'; -export 'package:tuuli_app/api_sub_project/src/model/user_update_definition.dart'; -export 'package:tuuli_app/api_sub_project/src/model/validation_error.dart';