// ignore_for_file: camel_case_types // ignore_for_file: public_member_api_docs 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 { String body; try { body = await response.body; } 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; // coverage:ignore-start 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-end final response = await doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end queryParameters['keepalive'] = keepalive.toString(); final response = await doRequest( 'put', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end queryParameters['deviceName'] = deviceName; final response = await doRequest( 'put', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end path = path.replaceAll('{deviceId}', Uri.encodeQueryComponent(deviceId)); final response = await doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end path = path.replaceAll('{deviceId}', Uri.encodeQueryComponent(deviceId)); final response = await doRequest( 'delete', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end queryParameters['deviceId'] = deviceId; queryParameters['appName'] = appName; final response = await doRequest( 'put', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); final response = await doRequest( 'delete', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); final response = await doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end path = path.replaceAll('{token}', Uri.encodeQueryComponent(token)); final response = await doRequest( 'post', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end final response = await doRequest( 'get', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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; // coverage:ignore-start 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-end final response = await doRequest( 'post', Uri(path: path, queryParameters: queryParameters.isNotEmpty ? queryParameters : null), 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 } } @BuiltValue(instantiable: false) abstract interface class UppushCheckResponse200ApplicationJsonInterface { bool get success; UppushCheckResponse200ApplicationJsonInterface rebuild( final void Function(UppushCheckResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushCheckResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushCheckResponse200ApplicationJson implements UppushCheckResponse200ApplicationJsonInterface, Built { factory UppushCheckResponse200ApplicationJson([ final void Function(UppushCheckResponse200ApplicationJsonBuilder)? b, ]) = _$UppushCheckResponse200ApplicationJson; // coverage:ignore-start const UppushCheckResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushCheckResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushCheckResponse200ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushSetKeepaliveResponse200ApplicationJsonInterface { bool get success; UppushSetKeepaliveResponse200ApplicationJsonInterface rebuild( final void Function(UppushSetKeepaliveResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushSetKeepaliveResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushSetKeepaliveResponse200ApplicationJson implements UppushSetKeepaliveResponse200ApplicationJsonInterface, Built { factory UppushSetKeepaliveResponse200ApplicationJson([ final void Function(UppushSetKeepaliveResponse200ApplicationJsonBuilder)? b, ]) = _$UppushSetKeepaliveResponse200ApplicationJson; // coverage:ignore-start const UppushSetKeepaliveResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushSetKeepaliveResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushSetKeepaliveResponse200ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushCreateDeviceResponse200ApplicationJsonInterface { bool get success; String get deviceId; UppushCreateDeviceResponse200ApplicationJsonInterface rebuild( final void Function(UppushCreateDeviceResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushCreateDeviceResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushCreateDeviceResponse200ApplicationJson implements UppushCreateDeviceResponse200ApplicationJsonInterface, Built { factory UppushCreateDeviceResponse200ApplicationJson([ final void Function(UppushCreateDeviceResponse200ApplicationJsonBuilder)? b, ]) = _$UppushCreateDeviceResponse200ApplicationJson; // coverage:ignore-start const UppushCreateDeviceResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushCreateDeviceResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushCreateDeviceResponse200ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushSyncDeviceResponse401ApplicationJsonInterface { bool get success; UppushSyncDeviceResponse401ApplicationJsonInterface rebuild( final void Function(UppushSyncDeviceResponse401ApplicationJsonInterfaceBuilder) updates, ); UppushSyncDeviceResponse401ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushSyncDeviceResponse401ApplicationJson implements UppushSyncDeviceResponse401ApplicationJsonInterface, Built { factory UppushSyncDeviceResponse401ApplicationJson([ final void Function(UppushSyncDeviceResponse401ApplicationJsonBuilder)? b, ]) = _$UppushSyncDeviceResponse401ApplicationJson; // coverage:ignore-start const UppushSyncDeviceResponse401ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushSyncDeviceResponse401ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushSyncDeviceResponse401ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushDeleteDeviceResponse200ApplicationJsonInterface { bool get success; UppushDeleteDeviceResponse200ApplicationJsonInterface rebuild( final void Function(UppushDeleteDeviceResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushDeleteDeviceResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushDeleteDeviceResponse200ApplicationJson implements UppushDeleteDeviceResponse200ApplicationJsonInterface, Built { factory UppushDeleteDeviceResponse200ApplicationJson([ final void Function(UppushDeleteDeviceResponse200ApplicationJsonBuilder)? b, ]) = _$UppushDeleteDeviceResponse200ApplicationJson; // coverage:ignore-start const UppushDeleteDeviceResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushDeleteDeviceResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushDeleteDeviceResponse200ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushCreateAppResponse200ApplicationJsonInterface { bool get success; String get token; UppushCreateAppResponse200ApplicationJsonInterface rebuild( final void Function(UppushCreateAppResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushCreateAppResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushCreateAppResponse200ApplicationJson implements UppushCreateAppResponse200ApplicationJsonInterface, Built { factory UppushCreateAppResponse200ApplicationJson([ final void Function(UppushCreateAppResponse200ApplicationJsonBuilder)? b, ]) = _$UppushCreateAppResponse200ApplicationJson; // coverage:ignore-start const UppushCreateAppResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushCreateAppResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushCreateAppResponse200ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushDeleteAppResponse200ApplicationJsonInterface { bool get success; UppushDeleteAppResponse200ApplicationJsonInterface rebuild( final void Function(UppushDeleteAppResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushDeleteAppResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushDeleteAppResponse200ApplicationJson implements UppushDeleteAppResponse200ApplicationJsonInterface, Built { factory UppushDeleteAppResponse200ApplicationJson([ final void Function(UppushDeleteAppResponse200ApplicationJsonBuilder)? b, ]) = _$UppushDeleteAppResponse200ApplicationJson; // coverage:ignore-start const UppushDeleteAppResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushDeleteAppResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushDeleteAppResponse200ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushUnifiedpushDiscoveryResponse200ApplicationJson_UnifiedpushInterface { int get version; UppushUnifiedpushDiscoveryResponse200ApplicationJson_UnifiedpushInterface rebuild( final void Function(UppushUnifiedpushDiscoveryResponse200ApplicationJson_UnifiedpushInterfaceBuilder) updates, ); UppushUnifiedpushDiscoveryResponse200ApplicationJson_UnifiedpushInterfaceBuilder toBuilder(); } abstract class UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush implements UppushUnifiedpushDiscoveryResponse200ApplicationJson_UnifiedpushInterface, Built { factory UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush([ final void Function(UppushUnifiedpushDiscoveryResponse200ApplicationJson_UnifiedpushBuilder)? b, ]) = _$UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush; // coverage:ignore-start const UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush._(); // coverage:ignore-end // coverage:ignore-start factory UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushUnifiedpushDiscoveryResponse200ApplicationJsonUnifiedpushSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushUnifiedpushDiscoveryResponse200ApplicationJsonInterface { UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush get unifiedpush; UppushUnifiedpushDiscoveryResponse200ApplicationJsonInterface rebuild( final void Function(UppushUnifiedpushDiscoveryResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushUnifiedpushDiscoveryResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushUnifiedpushDiscoveryResponse200ApplicationJson implements UppushUnifiedpushDiscoveryResponse200ApplicationJsonInterface, Built { factory UppushUnifiedpushDiscoveryResponse200ApplicationJson([ final void Function(UppushUnifiedpushDiscoveryResponse200ApplicationJsonBuilder)? b, ]) = _$UppushUnifiedpushDiscoveryResponse200ApplicationJson; // coverage:ignore-start const UppushUnifiedpushDiscoveryResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushUnifiedpushDiscoveryResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushUnifiedpushDiscoveryResponse200ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushPushResponse201ApplicationJsonInterface { bool get success; UppushPushResponse201ApplicationJsonInterface rebuild( final void Function(UppushPushResponse201ApplicationJsonInterfaceBuilder) updates, ); UppushPushResponse201ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushPushResponse201ApplicationJson implements UppushPushResponse201ApplicationJsonInterface, Built { factory UppushPushResponse201ApplicationJson([final void Function(UppushPushResponse201ApplicationJsonBuilder)? b]) = _$UppushPushResponse201ApplicationJson; // coverage:ignore-start const UppushPushResponse201ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushPushResponse201ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushPushResponse201ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushGatewayMatrixDiscoveryResponse200ApplicationJson_UnifiedpushInterface { String get gateway; UppushGatewayMatrixDiscoveryResponse200ApplicationJson_UnifiedpushInterface rebuild( final void Function(UppushGatewayMatrixDiscoveryResponse200ApplicationJson_UnifiedpushInterfaceBuilder) updates, ); UppushGatewayMatrixDiscoveryResponse200ApplicationJson_UnifiedpushInterfaceBuilder toBuilder(); } abstract class UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush implements UppushGatewayMatrixDiscoveryResponse200ApplicationJson_UnifiedpushInterface, Built { factory UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush([ final void Function(UppushGatewayMatrixDiscoveryResponse200ApplicationJson_UnifiedpushBuilder)? b, ]) = _$UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush; // coverage:ignore-start const UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush._(); // coverage:ignore-end // coverage:ignore-start factory UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush.fromJson( final Map json, ) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushGatewayMatrixDiscoveryResponse200ApplicationJsonUnifiedpushSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushGatewayMatrixDiscoveryResponse200ApplicationJsonInterface { UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush get unifiedpush; UppushGatewayMatrixDiscoveryResponse200ApplicationJsonInterface rebuild( final void Function(UppushGatewayMatrixDiscoveryResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushGatewayMatrixDiscoveryResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushGatewayMatrixDiscoveryResponse200ApplicationJson implements UppushGatewayMatrixDiscoveryResponse200ApplicationJsonInterface, Built { factory UppushGatewayMatrixDiscoveryResponse200ApplicationJson([ final void Function(UppushGatewayMatrixDiscoveryResponse200ApplicationJsonBuilder)? b, ]) = _$UppushGatewayMatrixDiscoveryResponse200ApplicationJson; // coverage:ignore-start const UppushGatewayMatrixDiscoveryResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushGatewayMatrixDiscoveryResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushGatewayMatrixDiscoveryResponse200ApplicationJsonSerializer; } @BuiltValue(instantiable: false) abstract interface class UppushGatewayMatrixResponse200ApplicationJsonInterface { BuiltList get rejected; UppushGatewayMatrixResponse200ApplicationJsonInterface rebuild( final void Function(UppushGatewayMatrixResponse200ApplicationJsonInterfaceBuilder) updates, ); UppushGatewayMatrixResponse200ApplicationJsonInterfaceBuilder toBuilder(); } abstract class UppushGatewayMatrixResponse200ApplicationJson implements UppushGatewayMatrixResponse200ApplicationJsonInterface, Built { factory UppushGatewayMatrixResponse200ApplicationJson([ final void Function(UppushGatewayMatrixResponse200ApplicationJsonBuilder)? b, ]) = _$UppushGatewayMatrixResponse200ApplicationJson; // coverage:ignore-start const UppushGatewayMatrixResponse200ApplicationJson._(); // coverage:ignore-end // coverage:ignore-start factory UppushGatewayMatrixResponse200ApplicationJson.fromJson(final Map json) => _jsonSerializers.deserializeWith(serializer, json)!; // coverage:ignore-end // coverage:ignore-start Map toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map; // coverage:ignore-end static Serializer get serializer => _$uppushGatewayMatrixResponse200ApplicationJsonSerializer; } // coverage:ignore-start final Serializers _serializers = (Serializers().toBuilder() ..addBuilderFactory( const FullType(UppushCheckResponse200ApplicationJson), UppushCheckResponse200ApplicationJson.new, ) ..add(UppushCheckResponse200ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushSetKeepaliveResponse200ApplicationJson), UppushSetKeepaliveResponse200ApplicationJson.new, ) ..add(UppushSetKeepaliveResponse200ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushCreateDeviceResponse200ApplicationJson), UppushCreateDeviceResponse200ApplicationJson.new, ) ..add(UppushCreateDeviceResponse200ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushSyncDeviceResponse401ApplicationJson), UppushSyncDeviceResponse401ApplicationJson.new, ) ..add(UppushSyncDeviceResponse401ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushDeleteDeviceResponse200ApplicationJson), UppushDeleteDeviceResponse200ApplicationJson.new, ) ..add(UppushDeleteDeviceResponse200ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushCreateAppResponse200ApplicationJson), UppushCreateAppResponse200ApplicationJson.new, ) ..add(UppushCreateAppResponse200ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushDeleteAppResponse200ApplicationJson), UppushDeleteAppResponse200ApplicationJson.new, ) ..add(UppushDeleteAppResponse200ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushUnifiedpushDiscoveryResponse200ApplicationJson), UppushUnifiedpushDiscoveryResponse200ApplicationJson.new, ) ..add(UppushUnifiedpushDiscoveryResponse200ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush), UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush.new, ) ..add(UppushUnifiedpushDiscoveryResponse200ApplicationJson_Unifiedpush.serializer) ..addBuilderFactory( const FullType(UppushPushResponse201ApplicationJson), UppushPushResponse201ApplicationJson.new, ) ..add(UppushPushResponse201ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushGatewayMatrixDiscoveryResponse200ApplicationJson), UppushGatewayMatrixDiscoveryResponse200ApplicationJson.new, ) ..add(UppushGatewayMatrixDiscoveryResponse200ApplicationJson.serializer) ..addBuilderFactory( const FullType(UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush), UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush.new, ) ..add(UppushGatewayMatrixDiscoveryResponse200ApplicationJson_Unifiedpush.serializer) ..addBuilderFactory( const FullType(UppushGatewayMatrixResponse200ApplicationJson), UppushGatewayMatrixResponse200ApplicationJson.new, ) ..add(UppushGatewayMatrixResponse200ApplicationJson.serializer) ..addBuilderFactory(const FullType(BuiltList, [FullType(String)]), ListBuilder.new)) .build(); Serializers get uppushSerializers => _serializers; final Serializers _jsonSerializers = (_serializers.toBuilder() ..addPlugin(StandardJsonPlugin()) ..addPlugin(const ContentStringPlugin())) .build(); 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