// ignore_for_file: camel_case_types // ignore_for_file: public_member_api_docs import 'dart:convert'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; import 'package:built_value/built_value.dart'; import 'package:built_value/serializer.dart'; import 'package:built_value/standard_json_plugin.dart'; import 'package:dynamite_runtime/content_string.dart'; import 'package:dynamite_runtime/http_client.dart'; import 'package:universal_io/io.dart'; export 'package:dynamite_runtime/http_client.dart'; part 'uppush.openapi.g.dart'; class UppushResponse extends DynamiteResponse { UppushResponse( super.data, super.headers, ); @override String toString() => 'UppushResponse(data: $data, headers: $headers)'; } class UppushApiException extends DynamiteApiException { UppushApiException( super.statusCode, super.headers, super.body, ); static Future fromResponse(final HttpClientResponse response) async { final data = await response.bodyBytes; String body; try { body = utf8.decode(data); } on FormatException { body = 'binary'; } return UppushApiException( response.statusCode, response.responseHeaders, body, ); } @override String toString() => 'UppushApiException(statusCode: $statusCode, headers: $headers, body: $body)'; } class UppushClient extends DynamiteClient { UppushClient( super.baseURL, { super.baseHeaders, super.userAgent, super.httpClient, super.cookieJar, super.authentications, }); UppushClient.fromClient(final DynamiteClient client) : super( client.baseURL, baseHeaders: client.baseHeaders, httpClient: client.httpClient, cookieJar: client.cookieJar, authentications: client.authentications, ); /// Check if the UnifiedPush provider is present Future check() async { const path = '/index.php/apps/uppush'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } final response = await doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushCheckResponse200ApplicationJson), )! as UppushCheckResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Set keepalive interval /// /// This endpoint requires admin access Future setKeepalive({required final int keepalive}) async { const path = '/index.php/apps/uppush/keepalive'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } queryParameters['keepalive'] = keepalive.toString(); final response = await doRequest( 'put', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushSetKeepaliveResponse200ApplicationJson), )! as UppushSetKeepaliveResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Request to create a new deviceId Future createDevice({required final String deviceName}) async { const path = '/index.php/apps/uppush/device'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } queryParameters['deviceName'] = deviceName; final response = await doRequest( 'put', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushCreateDeviceResponse200ApplicationJson), )! as UppushCreateDeviceResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Request to get push messages /// /// This is a public page since it has to be handle by the non-connected app (NextPush app and not Nextcloud-app) Future syncDevice({required final String deviceId}) async { var path = '/index.php/apps/uppush/device/{deviceId}'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } path = path.replaceAll('{deviceId}', Uri.encodeQueryComponent(deviceId)); final response = await doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 401) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushSyncDeviceResponse401ApplicationJson), )! as UppushSyncDeviceResponse401ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Delete a device Future deleteDevice({required final String deviceId}) async { var path = '/index.php/apps/uppush/device/{deviceId}'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } path = path.replaceAll('{deviceId}', Uri.encodeQueryComponent(deviceId)); final response = await doRequest( 'delete', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushDeleteDeviceResponse200ApplicationJson), )! as UppushDeleteDeviceResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Create an authorization token for a new 3rd party service Future createApp({ required final String deviceId, required final String appName, }) async { const path = '/index.php/apps/uppush/app'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } queryParameters['deviceId'] = deviceId; queryParameters['appName'] = appName; final response = await doRequest( 'put', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushCreateAppResponse200ApplicationJson), )! as UppushCreateAppResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Delete an authorization token Future deleteApp({required final String token}) async { var path = '/index.php/apps/uppush/app/{token}'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); final response = await doRequest( 'delete', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushDeleteAppResponse200ApplicationJson), )! as UppushDeleteAppResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Unifiedpush discovery Following specifications Future unifiedpushDiscovery({ required final String token, }) async { var path = '/index.php/apps/uppush/push/{token}'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); final response = await doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushUnifiedpushDiscoveryResponse200ApplicationJson), )! as UppushUnifiedpushDiscoveryResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Receive notifications from 3rd parties Future push({required final String token}) async { var path = '/index.php/apps/uppush/push/{token}'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); final response = await doRequest( 'post', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 201) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushPushResponse201ApplicationJson), )! as UppushPushResponse201ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Matrix Gateway discovery Future gatewayMatrixDiscovery() async { const path = '/index.php/apps/uppush/gateway/matrix'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } final response = await doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushGatewayMatrixDiscoveryResponse200ApplicationJson), )! as UppushGatewayMatrixDiscoveryResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } /// Matrix Gateway Future gatewayMatrix() async { const path = '/index.php/apps/uppush/gateway/matrix'; final queryParameters = {}; final headers = { 'Accept': 'application/json', }; Uint8List? body; if (authentications.where((final a) => a.type == 'http' && a.scheme == 'basic').isNotEmpty) { headers.addAll(authentications.singleWhere((final a) => a.type == 'http' && a.scheme == 'basic').headers); } else { throw Exception('Missing authentication for basic_auth'); // coverage:ignore-line } final response = await doRequest( 'post', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null).toString(), headers, body, ); if (response.statusCode == 200) { return _jsonSerializers.deserialize( await response.jsonBody, specifiedType: const FullType(UppushGatewayMatrixResponse200ApplicationJson), )! as UppushGatewayMatrixResponse200ApplicationJson; } throw await UppushApiException.fromResponse(response); // coverage:ignore-line } } abstract class UppushCheckResponse200ApplicationJson implements Built { factory UppushCheckResponse200ApplicationJson([ final void Function(UppushCheckResponse200ApplicationJsonBuilder)? b, ]) = _$UppushCheckResponse200ApplicationJson; const UppushCheckResponse200ApplicationJson._(); factory UppushCheckResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; bool get success; static Serializer get serializer => _$uppushCheckResponse200ApplicationJsonSerializer; } abstract class UppushSetKeepaliveResponse200ApplicationJson implements Built { factory UppushSetKeepaliveResponse200ApplicationJson([ final void Function(UppushSetKeepaliveResponse200ApplicationJsonBuilder)? b, ]) = _$UppushSetKeepaliveResponse200ApplicationJson; const UppushSetKeepaliveResponse200ApplicationJson._(); factory UppushSetKeepaliveResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; bool get success; static Serializer get serializer => _$uppushSetKeepaliveResponse200ApplicationJsonSerializer; } abstract class UppushCreateDeviceResponse200ApplicationJson implements Built { factory UppushCreateDeviceResponse200ApplicationJson([ final void Function(UppushCreateDeviceResponse200ApplicationJsonBuilder)? b, ]) = _$UppushCreateDeviceResponse200ApplicationJson; const UppushCreateDeviceResponse200ApplicationJson._(); factory UppushCreateDeviceResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; bool get success; String get deviceId; static Serializer get serializer => _$uppushCreateDeviceResponse200ApplicationJsonSerializer; } abstract class UppushSyncDeviceResponse401ApplicationJson implements Built { factory UppushSyncDeviceResponse401ApplicationJson([ final void Function(UppushSyncDeviceResponse401ApplicationJsonBuilder)? b, ]) = _$UppushSyncDeviceResponse401ApplicationJson; const UppushSyncDeviceResponse401ApplicationJson._(); factory UppushSyncDeviceResponse401ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; bool get success; static Serializer get serializer => _$uppushSyncDeviceResponse401ApplicationJsonSerializer; } abstract class UppushDeleteDeviceResponse200ApplicationJson implements Built { factory UppushDeleteDeviceResponse200ApplicationJson([ final void Function(UppushDeleteDeviceResponse200ApplicationJsonBuilder)? b, ]) = _$UppushDeleteDeviceResponse200ApplicationJson; const UppushDeleteDeviceResponse200ApplicationJson._(); factory UppushDeleteDeviceResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; bool get success; static Serializer get serializer => _$uppushDeleteDeviceResponse200ApplicationJsonSerializer; } abstract class UppushCreateAppResponse200ApplicationJson implements Built { factory UppushCreateAppResponse200ApplicationJson([ final void Function(UppushCreateAppResponse200ApplicationJsonBuilder)? b, ]) = _$UppushCreateAppResponse200ApplicationJson; const UppushCreateAppResponse200ApplicationJson._(); factory UppushCreateAppResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; bool get success; String get token; static Serializer get serializer => _$uppushCreateAppResponse200ApplicationJsonSerializer; } abstract class UppushDeleteAppResponse200ApplicationJson implements Built { factory UppushDeleteAppResponse200ApplicationJson([ final void Function(UppushDeleteAppResponse200ApplicationJsonBuilder)? b, ]) = _$UppushDeleteAppResponse200ApplicationJson; const UppushDeleteAppResponse200ApplicationJson._(); factory UppushDeleteAppResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; bool get success; static Serializer get serializer => _$uppushDeleteAppResponse200ApplicationJsonSerializer; } abstract class UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush implements Built { factory UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush([ final void Function(UppushUnifiedpushDiscoveryResponse200ApplicationJson_UnifiedpushBuilder)? b, ]) = _$UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush; const UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush._(); factory UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; int get version; static Serializer get serializer => _$uppushUnifiedpushDiscoveryResponse200ApplicationJsonUnifiedpushSerializer; } abstract class UppushUnifiedpushDiscoveryResponse200ApplicationJson implements Built { factory UppushUnifiedpushDiscoveryResponse200ApplicationJson([ final void Function(UppushUnifiedpushDiscoveryResponse200ApplicationJsonBuilder)? b, ]) = _$UppushUnifiedpushDiscoveryResponse200ApplicationJson; const UppushUnifiedpushDiscoveryResponse200ApplicationJson._(); factory UppushUnifiedpushDiscoveryResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush get unifiedpush; static Serializer get serializer => _$uppushUnifiedpushDiscoveryResponse200ApplicationJsonSerializer; } abstract class UppushPushResponse201ApplicationJson implements Built { factory UppushPushResponse201ApplicationJson([final void Function(UppushPushResponse201ApplicationJsonBuilder)? b]) = _$UppushPushResponse201ApplicationJson; const UppushPushResponse201ApplicationJson._(); factory UppushPushResponse201ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; bool get success; static Serializer get serializer => _$uppushPushResponse201ApplicationJsonSerializer; } abstract class UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush implements Built { factory UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush([ final void Function(UppushGatewayMatrixDiscoveryResponse200ApplicationJson_UnifiedpushBuilder)? b, ]) = _$UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush; const UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush._(); factory UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush.fromJson( final Map json, ) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; String get gateway; static Serializer get serializer => _$uppushGatewayMatrixDiscoveryResponse200ApplicationJsonUnifiedpushSerializer; } abstract class UppushGatewayMatrixDiscoveryResponse200ApplicationJson implements Built { factory UppushGatewayMatrixDiscoveryResponse200ApplicationJson([ final void Function(UppushGatewayMatrixDiscoveryResponse200ApplicationJsonBuilder)? b, ]) = _$UppushGatewayMatrixDiscoveryResponse200ApplicationJson; const UppushGatewayMatrixDiscoveryResponse200ApplicationJson._(); factory UppushGatewayMatrixDiscoveryResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush get unifiedpush; static Serializer get serializer => _$uppushGatewayMatrixDiscoveryResponse200ApplicationJsonSerializer; } abstract class UppushGatewayMatrixResponse200ApplicationJson implements Built { factory UppushGatewayMatrixResponse200ApplicationJson([ final void Function(UppushGatewayMatrixResponse200ApplicationJsonBuilder)? b, ]) = _$UppushGatewayMatrixResponse200ApplicationJson; const UppushGatewayMatrixResponse200ApplicationJson._(); factory UppushGatewayMatrixResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; BuiltList get rejected; static Serializer get serializer => _$uppushGatewayMatrixResponse200ApplicationJsonSerializer; } @SerializersFor([ UppushCheckResponse200ApplicationJson, UppushSetKeepaliveResponse200ApplicationJson, UppushCreateDeviceResponse200ApplicationJson, UppushSyncDeviceResponse401ApplicationJson, UppushDeleteDeviceResponse200ApplicationJson, UppushCreateAppResponse200ApplicationJson, UppushDeleteAppResponse200ApplicationJson, UppushUnifiedpushDiscoveryResponse200ApplicationJson, UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush, UppushPushResponse201ApplicationJson, UppushGatewayMatrixDiscoveryResponse200ApplicationJson, UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush, UppushGatewayMatrixResponse200ApplicationJson, ]) final Serializers _serializers = (_$_serializers.toBuilder() ..addBuilderFactory( const FullType(UppushCheckResponse200ApplicationJson), UppushCheckResponse200ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushSetKeepaliveResponse200ApplicationJson), UppushSetKeepaliveResponse200ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushCreateDeviceResponse200ApplicationJson), UppushCreateDeviceResponse200ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushSyncDeviceResponse401ApplicationJson), UppushSyncDeviceResponse401ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushDeleteDeviceResponse200ApplicationJson), UppushDeleteDeviceResponse200ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushCreateAppResponse200ApplicationJson), UppushCreateAppResponse200ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushDeleteAppResponse200ApplicationJson), UppushDeleteAppResponse200ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushUnifiedpushDiscoveryResponse200ApplicationJson), UppushUnifiedpushDiscoveryResponse200ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushPushResponse201ApplicationJson), UppushPushResponse201ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushGatewayMatrixDiscoveryResponse200ApplicationJson), UppushGatewayMatrixDiscoveryResponse200ApplicationJson.new, ) ..addBuilderFactory( const FullType(UppushGatewayMatrixResponse200ApplicationJson), UppushGatewayMatrixResponse200ApplicationJson.new, )) .build(); Serializers get uppushSerializers => _serializers; final Serializers _jsonSerializers = (_serializers.toBuilder() ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); // coverage:ignore-start T deserializeUppush(final Object data) => _serializers.deserialize(data, specifiedType: FullType(T))! as T; Object? serializeUppush(final T data) => _serializers.serialize(data, specifiedType: FullType(T)); // coverage:ignore-end